Peter Caspers | 30 Mar 20:43 2013
Picon

install cuda

Hi,

I am trying to install the cuda package on a Windows 7 enviroment. 
However I run into an error and can not figure out, what it is.

Can someone help ?

Thanks a lot
Peter

C:\Users\Peter\_dev\haskell>cabal install cuda
Resolving dependencies...
[1 of 1] Compiling Main             ( 
C:\Users\Peter\AppData\Local\Temp\cuda-0.5.0.1-11856\cuda-0.5.0.1\Setup.hs, 
C:\Users\Peter\AppData\Local\Temp\cuda-0.5.0.1
-11856\cuda-0.5.0.1\dist\setup\Main.o )
Linking 
C:\Users\Peter\AppData\Local\Temp\cuda-0.5.0.1-11856\cuda-0.5.0.1\dist\setup\setup.exe 
...
Configuring cuda-0.5.0.1...
cygwin warning:
   MS-DOS style path detected: 
C:\Users\Peter\AppData\Roaming\cabal/share/config.site
   Preferred POSIX equivalent is: 
/cygdrive/c/Users/Peter/AppData/Roaming/cabal/share/config.site
   CYGWIN environment variable option "nodosfilewarning" turns off this 
warning.
   Consult the user's guide for more details about POSIX paths:
     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
checking for gcc... C:\Program Files (x86)\Haskell 
(Continue reading)

Henk-Jan van Tuyl | 31 Mar 00:56 2013
Picon

Re: install cuda

On Sat, 30 Mar 2013 20:43:58 +0100, Peter Caspers <pcaspers1973 <at> gmail.com>  
wrote:

> Hi,
>
> I am trying to install the cuda package on a Windows 7 enviroment.  
> However I run into an error and can not figure out, what it is.
:
:
> configure: error: C compiler cannot create executables
> See `config.log' for more details
:

The message says it all:
   See `config.log' for more details
The config.log file is probably in the directory where cabal-install  
unpacks it (%appdata%\cabal\cuda-<revision>); you can also use the  
commands:
   cabal unpack cuda
   cd cuda
   cabal install
   notepad config.log

I just had the same error message for another package; from the config.log  
file it became clear, that the linker could not find the necessary  
library. Make sure, that the libraries and header files  can be found by  
the compiler and linker, by setting the proper environment variables, see  
[0]

Regards,
(Continue reading)

Trevor L. McDonell | 31 Mar 04:01 2013
Picon
Picon

Re: install cuda

Hi,

CUDA package maintainer here. I don't have access to a Win7 box with compatible GPU, nor a lot of experience
writing packages for windows. If you do get it working please send me a pull request on github. I'd be great
to have this working for windows as well.

Cheers,
-Trevor

On 31/03/2013, at 10:56 AM, Henk-Jan van Tuyl <hjgtuyl <at> chello.nl> wrote:

> On Sat, 30 Mar 2013 20:43:58 +0100, Peter Caspers <pcaspers1973 <at> gmail.com> wrote:
> 
>> Hi,
>> 
>> I am trying to install the cuda package on a Windows 7 enviroment. However I run into an error and can not
figure out, what it is.
> :
> :
>> configure: error: C compiler cannot create executables
>> See `config.log' for more details
> :
> 
> The message says it all:
>  See `config.log' for more details
> The config.log file is probably in the directory where cabal-install unpacks it
(%appdata%\cabal\cuda-<revision>); you can also use the commands:
>  cabal unpack cuda
>  cd cuda
>  cabal install
(Continue reading)

Peter Caspers | 31 Mar 17:03 2013
Picon

Re: install cuda

Hi,

thank you. I could resolve some of the problems by removing spaces from 
the Cuda and Haskell platform installation paths. Now I am left wiht the 
following error:

configure:3596: checking for library containing cuDriverGetVersion
configure:3627: c:\HaskellPlatform\2012.4.0.0\mingw\bin\gcc.exe -o 
conftest.exe -Wl,--hash-size=31 -Wl,--reduce-memory-overheads 
-I/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/include 
-L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib  conftest.c >&5
C:\Users\Peter\AppData\Local\Temp\ccOsnsjD.o:conftest.c:(.text+0xc): 
undefined reference to `cuDriverGetVersion'
collect2: ld returned 1 exit status

In fact the library path 
-L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib is not correct 
(there are two subfolders x64 and Win32 containing the lib files) and I 
do not see where this path is actually taken from. I defined an 
enviroment variable LD_LIBRARY_PATH with the correct paths (separated by 
a colon), but it seems to be ignored.

Also copying the lib files to the path I see in the log does not help.

Do you have any hint for me concerning this ?

Peter

Am 31.03.2013 00:56, schrieb Henk-Jan van Tuyl:
> On Sat, 30 Mar 2013 20:43:58 +0100, Peter Caspers 
(Continue reading)

Henk-Jan van Tuyl | 31 Mar 17:59 2013
Picon

Re: install cuda

On Sun, 31 Mar 2013 17:03:22 +0200, Peter Caspers <pcaspers1973 <at> gmail.com>  
wrote:

> In fact the library path  
> -L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib is not correct  
> (there are two subfolders x64 and Win32 containing the lib files) and I  
> do not see where this path is actually taken from. I defined an  
> enviroment variable LD_LIBRARY_PATH with the correct paths (separated by  
> a colon), but it seems to be ignored.
>
> Also copying the lib files to the path I see in the log does not help.
>

The environment variable should probably be LIBRARY_PATH; I use a  
semicolon as separator.
See also LD_LIBRARY_PATH vs LIBRARY_PATH[0].

Regards,
Henk-Jan van Tuyl

[0]  
http://stackoverflow.com/questions/4250624/ld-library-path-vs-library-path

--

-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--
Peter Caspers | 31 Mar 18:55 2013
Picon

Re: install cuda

>
> The environment variable should probably be LIBRARY_PATH; I use a 
> semicolon as separator.
> See also LD_LIBRARY_PATH vs LIBRARY_PATH[0].
>

yes, it's LIBRARY_PATH. The x64 version of cuda.lib is not recognized at 
all (same error message as if the file was not existent). The Win32 
version "works", but results in

configure:3627: c:\HaskellPlatform\2012.4.0.0\mingw\bin\gcc.exe -o 
conftest.exe -Wl,--hash-size=31 -Wl,--reduce-memory-overheads 
-I/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/include 
-L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib  conftest.c 
-lcuda   >&5
C:\Users\Peter\AppData\Local\Temp\ccOwCQ6n.o:conftest.c:(.text+0xc): 
undefined reference to `cuDriverGetVersion'
collect2: ld returned 1 exit status

I ran nm on cuda.lib and got the entry

nvcuda.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
          U _IMPORT_DESCRIPTOR_nvcuda
00000000 I _imp__cuDriverGetVersion <at> 4
00000000 T cuDriverGetVersion <at> 4

(Continue reading)

Geoffrey Mainland | 31 Mar 20:17 2013
Picon

Re: install cuda

On 03/31/2013 05:55 PM, Peter Caspers wrote:
>>
>> The environment variable should probably be LIBRARY_PATH; I use a
semicolon as separator.
>> See also LD_LIBRARY_PATH vs LIBRARY_PATH[0].
>>
>
> yes, it's LIBRARY_PATH. The x64 version of cuda.lib is not recognized
> at all (same error message as if the file was not existent). The Win32
> version "works", but results in
>
> configure:3627: c:\HaskellPlatform\2012.4.0.0\mingw\bin\gcc.exe -o
conftest.exe -Wl,--hash-size=31 -Wl,--reduce-memory-overheads
-I/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/include
-L/c/CUDA/NVIDIA_GPU_Computing_Toolkit/CUDA/v4.1/lib  conftest.c
-lcuda   >&5
> C:\Users\Peter\AppData\Local\Temp\ccOwCQ6n.o:conftest.c:(.text+0xc):
undefined reference to `cuDriverGetVersion'
> collect2: ld returned 1 exit status
>
> I ran nm on cuda.lib and got the entry
>
> nvcuda.dll:
> 00000000 I .idata$4
> 00000000 I .idata$5
> 00000000 I .idata$6
> 00000000 T .text
>          U _IMPORT_DESCRIPTOR_nvcuda
> 00000000 I _imp__cuDriverGetVersion <at> 4
> 00000000 T cuDriverGetVersion <at> 4
(Continue reading)

Peter Caspers | 31 Mar 20:32 2013
Picon

Re: install cuda

yes I more or less saw this in the meantime, too. Actually modifying the 
source code on which the error is reported from

configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Haskell CUDA bindings"
| #define PACKAGE_TARNAME "cuda"
...
| #ifdef __cplusplus
| extern "C"
| #endif
| char cuDriverGetVersion ();
| int
| main ()
| {
| return cuDriverGetVersion ();
|   ;
|   return 0;
| }

to (for example)

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <cuda.h>

int
main( int argc, char** argv)
(Continue reading)

Peter Caspers | 31 Mar 21:27 2013
Picon

Re: install cuda

Hmm, I get

Configuring cuda-0.5.0.0...
setup.exe: configure script not found.

can you help ?

Peter

> I was able to install the cuda package under 32-bit GHC 7.4.2 using the
> 5.0 SDK and use it from within ghci. This required using my fork of the
> cuda repo and following the instructions in my WINDOWS.md. Make sure
> nvcc is in your path (the CUDA installer should have made this so) and
> try 'cabal configure'.
Geoffrey Mainland | 31 Mar 21:48 2013
Picon

Re: install cuda

You need to generate the configure script using autoconf:

https://www.gnu.org/software/autoconf/manual/autoconf.html#autoconf-Invocation

On 03/31/2013 08:27 PM, Peter Caspers wrote:
> Hmm, I get
>
> Configuring cuda-0.5.0.0...
> setup.exe: configure script not found.
>
> can you help ?
>
> Peter
>
>> I was able to install the cuda package under 32-bit GHC 7.4.2 using the
>> 5.0 SDK and use it from within ghci. This required using my fork of the
>> cuda repo and following the instructions in my WINDOWS.md. Make sure
>> nvcc is in your path (the CUDA installer should have made this so) and
>> try 'cabal configure'.
>
Peter Caspers | 1 Apr 11:33 2013
Picon

Re: install cuda

yes, the installation seems to work fine now. However, doing the 
following test in ghci

Prelude> :m +Foreign.CUDA
Prelude Foreign.CUDA> props 0
Loading package bytestring-0.9.2.1 ... linking ... done.
Loading package cuda-0.5.0.0 ... linking ... done.

results in a crash. The CUDA version I am using is 4.1.28. You think 
there is something I could try to analyze this further ?

Thanks a lot for your help
Peter

Am 31.03.2013 21:48, schrieb Geoffrey Mainland:
> You need to generate the configure script using autoconf:
>
> https://www.gnu.org/software/autoconf/manual/autoconf.html#autoconf-Invocation
>
> On 03/31/2013 08:27 PM, Peter Caspers wrote:
>> Hmm, I get
>>
>> Configuring cuda-0.5.0.0...
>> setup.exe: configure script not found.
>>
>> can you help ?
>>
>> Peter
>>
>>> I was able to install the cuda package under 32-bit GHC 7.4.2 using the
(Continue reading)

Geoffrey Mainland | 1 Apr 12:25 2013
Picon

Re: install cuda

That is not a very elucidating crash message, so I don't see how to
proceed. After ghci print "Loading package cuda-0.5.0.0 ... linking
... done." it just exits? No error dialog, nothing? Did you try building
any of the examples in the cuda package that don't require ghci?

Is your graphics card incompatible with CUDA 5.0, or do you just not
want to update your driver?

Geoff

On 04/01/2013 10:33 AM, Peter Caspers wrote:
> yes, the installation seems to work fine now. However, doing the following test in ghci
>
> Prelude> :m +Foreign.CUDA
> Prelude Foreign.CUDA> props 0
> Loading package bytestring-0.9.2.1 ... linking ... done.
> Loading package cuda-0.5.0.0 ... linking ... done.
>
> results in a crash. The CUDA version I am using is 4.1.28. You think
there is something I could try to analyze this further ?
>
> Thanks a lot for your help
> Peter
>
> Am 31.03.2013 21:48, schrieb Geoffrey Mainland:
>> You need to generate the configure script using autoconf:
>>
>>
https://www.gnu.org/software/autoconf/manual/autoconf.html#autoconf-Invocation
>>
(Continue reading)

Peter Caspers | 1 Apr 17:27 2013
Picon

Re: install cuda

indeed, not very helpful ...

When I installed Cuda the latest driver (296.0) that was running on my 
laptop (a W520 ThinkPad) was not sufficient for version 5.0. However as 
I noticed today in February Lenovo released a driver update (311.0) and 
with that 5.0 is in fact running. :-)

With that the Haskell bindings work well.

Thanks again very much, Geoff
Peter

Am 01.04.2013 12:25, schrieb Geoffrey Mainland:
> That is not a very elucidating crash message, so I don't see how to
> proceed. After ghci print "Loading package cuda-0.5.0.0 ... linking
> ... done." it just exits? No error dialog, nothing? Did you try building
> any of the examples in the cuda package that don't require ghci?
>
> Is your graphics card incompatible with CUDA 5.0, or do you just not
> want to update your driver?
>
> Geoff
>
> On 04/01/2013 10:33 AM, Peter Caspers wrote:
>> yes, the installation seems to work fine now. However, doing the following test in ghci
>>
>> Prelude> :m +Foreign.CUDA
>> Prelude Foreign.CUDA> props 0
>> Loading package bytestring-0.9.2.1 ... linking ... done.
>> Loading package cuda-0.5.0.0 ... linking ... done.
(Continue reading)

Geoffrey Mainland | 1 Apr 18:01 2013
Picon

Re: install cuda

Fantastic, glad you got it working! Maybe it's time for me to send
Trevor a pull request...

Geoff

On 04/01/2013 04:27 PM, Peter Caspers wrote:
> indeed, not very helpful ...
>
> When I installed Cuda the latest driver (296.0) that was running on my
> laptop (a W520 ThinkPad) was not sufficient for version 5.0. However
> as I noticed today in February Lenovo released a driver update (311.0)
> and with that 5.0 is in fact running. :-)
>
> With that the Haskell bindings work well.
>
> Thanks again very much, Geoff
> Peter
>
>
>
> Am 01.04.2013 12:25, schrieb Geoffrey Mainland:
>> That is not a very elucidating crash message, so I don't see how to
>> proceed. After ghci print "Loading package cuda-0.5.0.0 ... linking
>> ... done." it just exits? No error dialog, nothing? Did you try building
>> any of the examples in the cuda package that don't require ghci?
>>
>> Is your graphics card incompatible with CUDA 5.0, or do you just not
>> want to update your driver?
>>
>> Geoff
(Continue reading)

Manuel M T Chakravarty | 4 Apr 04:05 2013
Picon
Picon

Re: install cuda

Geoffrey Mainland <mainland <at> apeiron.net>:
> Fantastic, glad you got it working! Maybe it's time for me to send
> Trevor a pull request...

That sounds like an excellent idea!

Manuel

> On 04/01/2013 04:27 PM, Peter Caspers wrote:
>> indeed, not very helpful ...
>> 
>> When I installed Cuda the latest driver (296.0) that was running on my
>> laptop (a W520 ThinkPad) was not sufficient for version 5.0. However
>> as I noticed today in February Lenovo released a driver update (311.0)
>> and with that 5.0 is in fact running. :-)
>> 
>> With that the Haskell bindings work well.
>> 
>> Thanks again very much, Geoff
>> Peter
>> 
>> 
>> 
>> Am 01.04.2013 12:25, schrieb Geoffrey Mainland:
>>> That is not a very elucidating crash message, so I don't see how to
>>> proceed. After ghci print "Loading package cuda-0.5.0.0 ... linking
>>> ... done." it just exits? No error dialog, nothing? Did you try building
>>> any of the examples in the cuda package that don't require ghci?
>>> 
>>> Is your graphics card incompatible with CUDA 5.0, or do you just not
(Continue reading)

Trevor L. McDonell | 4 Apr 04:37 2013
Picon
Picon

Re: install cuda

Hi Geoff,

Yes, please do!

-T

On 02/04/2013, at 3:01 AM, Geoffrey Mainland <mainland <at> apeiron.net> wrote:

> Fantastic, glad you got it working! Maybe it's time for me to send
> Trevor a pull request...
> 
> Geoff
> 
> On 04/01/2013 04:27 PM, Peter Caspers wrote:
>> indeed, not very helpful ...
>> 
>> When I installed Cuda the latest driver (296.0) that was running on my
>> laptop (a W520 ThinkPad) was not sufficient for version 5.0. However
>> as I noticed today in February Lenovo released a driver update (311.0)
>> and with that 5.0 is in fact running. :-)
>> 
>> With that the Haskell bindings work well.
>> 
>> Thanks again very much, Geoff
>> Peter
>> 
>> 
>> 
>> Am 01.04.2013 12:25, schrieb Geoffrey Mainland:
>>> That is not a very elucidating crash message, so I don't see how to
(Continue reading)

Stephen Tetley | 31 Mar 08:54 2013
Picon

Re: install cuda

It looks like you are using Cygwin for a Unix-alike environment. For
building Haskell bindings to C libraries you are better off with MinGW
+ MSYS.

On 30 March 2013 19:43, Peter Caspers <pcaspers1973 <at> gmail.com> wrote:

> I am trying to install the cuda package on a Windows 7 enviroment. However I
> run into an error and can not figure out, what it is.
>
> Can someone help ?
Geoffrey Mainland | 31 Mar 18:23 2013
Picon

Re: install cuda

Try my fork:

https://github.com/mainland/cuda

In particular, read WINDOWS.md.

Geoff

On 03/31/2013 07:54 AM, Stephen Tetley wrote:
> It looks like you are using Cygwin for a Unix-alike environment. For
> building Haskell bindings to C libraries you are better off with MinGW
> + MSYS.
> 
> On 30 March 2013 19:43, Peter Caspers <pcaspers1973 <at> gmail.com> wrote:
> 
>> I am trying to install the cuda package on a Windows 7 enviroment. However I
>> run into an error and can not figure out, what it is.
>>
>> Can someone help ?

Gmane