<code>Alright, I&#39;m stumped and everyone else is too. Few years ago we did everything we are doing now and it all worked fine. Now using wine 1.2rc2 we can&#39;t get a wrapper I compiled to work. What this wrapper does is it translates/wraps the calls made to the cuda runtime dll (cudart.dll or nvcuda.dll, same file different names) and sends it to the linux library. The linux library and windows are identical except for some missing dx functions in the linux library. My sources can be found here. <a href="http://shelnutt2.host56.com/cudart/">http://shelnutt2.host56.com/cudart/</a> and <a href="http://shelnutt2.host56.com/cufft/">http://shelnutt2.host56.com/cufft/</a> (However we aren&#39;t even getting to the second dll yet). Anytime we try to run folding at home in wine, we are getting the following. FAH checks for nvcuda.dll first because that comes with the driver installs on windows, if it doesn&#39;t find it, it defaults to cudart.dll which is packaged with fah, or can be installed separately. We have replaced all the cuda dlls with the compiled wrapper or sum linked to the compiled wrapper, just like we use to with the original cuda wrapper that we came up with.<br>

<br><br>err:module:import_dll Loading library nvcuda.dll (which is needed 
by L&quot;Z:\\home\\sidicas\\.FAHGPU3\\FahCore_11.exe&quot;) failed (error 
c0000020).<br>err:module:import_dll Loading library cudart.dll (which is
 needed by L&quot;Z:\\home\\sidicas\\.FAHGPU3\\FahCore_11.exe&quot;) failed (error
 c0000020).<br><br><br></code><dl class="codebox"><dd><code>sidicas@Belldandy:~/.FAHGPU3$ ls -al *.dll<br>-rw-r--r-- 1 
sidicas sidicas 1617920 2010-06-03 01:48 amdcalcl.dll<br>-rw-r--r-- 1 
sidicas sidicas 2486272 2010-06-03 01:48 amdcalrt.dll<br>-rw-r--r-- 1 
sidicas sidicas� 124540 2010-06-02 07:50 cudart32_30_14.dll<br>-rw-r--r--
 1 sidicas sidicas� 124540 2010-06-02 07:50 cudart.dll<br>-rw-r--r-- 1 
sidicas sidicas� �82699 2010-06-01 21:39 cufft32_30_14.dll<br>-rw-r--r--
 1 sidicas sidicas� �82699 2010-06-01 21:39 cufft.dll<br>lrwxrwxrwx 1 
sidicas sidicas� � � 10 2010-06-03 02:12 nvcuda.dll -&gt; cudart.dll<br>sidicas@Belldandy:~/.FAHGPU3$�
 � � � � � � � � � � � � � � </code></dd></dl><br><dl class="codebox"><dd><code>sidicas@Belldandy:~/.FAHGPU3$ uname -a<br>Linux Belldandy 
2.6.26-2-amd64 #1 SMP Sun Jun 21 04:47:08 UTC 2009 x86_64 GNU/Linux<br>sidicas@Belldandy:~/.FAHGPU3$
 nvcc --version<br>nvcc: NVIDIA (R) Cuda compiler driver<br>Copyright 
(c) 2005-2009 NVIDIA Corporation<br>Built on 
Fri_Feb_19_18:18:31_PST_2010<br>Cuda compilation tools, release 3.0, 
V0.2.1221<br>sidicas@Belldandy:~/.FAHGPU3$ ldd ./cudart.dll<br>� � � � 
linux-gate.so.1 =&gt;� (0xf7ee3000)<br>� � � � libcudart.so.3 =&gt; 
/usr/local/cuda/lib/libcudart.so.3 (0xf7e83000)<br>� � � � libwine.so.1 
=&gt; /usr/lib/libwine.so.1 (0xf7d2d000)<br>� � � � libm.so.6 =&gt; 
/lib32/libm.so.6 (0xf7d09000)<br>� � � � libc.so.6 =&gt; 
/lib32/libc.so.6 (0xf7bb6000)<br>� � � � libdl.so.2 =&gt; 
/lib32/libdl.so.2 (0xf7bb2000)<br>� � � � libpthread.so.0 =&gt; 
/lib32/libpthread.so.0 (0xf7b9b000)<br>� � � � librt.so.1 =&gt; 
/lib32/librt.so.1 (0xf7b92000)<br>� � � � libstdc++.so.6 =&gt; 
/usr/lib32/libstdc++.so.6 (0xf7aa4000)<br>� � � � libgcc_s.so.1 =&gt; 
/usr/lib32/libgcc_s.so.1 (0xf7a97000)<br>� � � � /lib/ld-linux.so.2 
(0xf7ee4000)<br>sidicas@Belldandy:~/.FAHGPU3$<br>sidicas@Belldandy:~/.FAHGPU3$
 ldd ./cufft.dll<br>� � � � linux-gate.so.1 =&gt;� (0xf7f29000)<br>� � �
 � libcufft.so.3 =&gt; /usr/local/cuda/lib/libcufft.so.3 (0xf7308000)<br>�
 � � � libwine.so.1 =&gt; /usr/lib/libwine.so.1 (0xf71b2000)<br>� � � � 
libm.so.6 =&gt; /lib32/libm.so.6 (0xf718e000)<br>� � � � libc.so.6 =&gt;
 /lib32/libc.so.6 (0xf703b000)<br>� � � � libdl.so.2 =&gt; 
/lib32/libdl.so.2 (0xf7037000)<br>� � � � libpthread.so.0 =&gt; 
/lib32/libpthread.so.0 (0xf7020000)<br>� � � � libcudart.so.3 =&gt; 
/usr/local/cuda/lib/libcudart.so.3 (0xf6fdf000)<br>� � � � 
libstdc++.so.6 =&gt; /usr/lib32/libstdc++.so.6 (0xf6ef1000)<br>� � � � 
libgcc_s.so.1 =&gt; /usr/lib32/libgcc_s.so.1 (0xf6ee4000)<br>� � � � 
/lib/ld-linux.so.2 (0xf7f2a000)<br>� � � � librt.so.1 =&gt; 
/lib32/librt.so.1 (0xf6eda000)<br>sidicas@Belldandy:~/.FAHGPU3$<br>sidicas@Belldandy:~/.FAHGPU3$�
 � � �� <br></code></dd></dl><br>More thorugh testing has been done, <a href="http://foldingforum.org/viewtopic.php?f=54&amp;t=14673&amp;start=105#p146177">http://foldingforum.org/viewtopic.php?f=54&amp;t=14673&amp;start=105#p146177</a> . When we makes reference to gpu2 wrapper, that is our original cuda wrapper designed for cuda 2.0-2.2 built couple years ago. The GPU3 wrapper is what we are having problems with. It is our cuda 3.0 wrapper. The .dll files are in the folder (we even tried in system32), ldd shows they are properly linked, yet it does not work. If we use the old wrapper compile before it works fine with cuda 2.x or with cuda 3.0 we just have to sym link the cuda lib to the old name it&#39;s expecting.<br>

<br>I&#39;ve tried compiling the old wrapper and linking it to cuda 2.3 however this fails. So I am thinking that if when I compile the old wrapper which is shown to work (when an old compiled version is used) but does not work when I compile on my funtoo box it must be some weird compiling issue. I have wine installed (without 64bit support), and I installed cuda runtime from nvidia&#39;s site as the one in portage installs to /opt/ and I wanted to make sure there wasn&#39;t any weird issues linking with that.<br>

<br>I do get a few warnings when I compile but they aren&#39;t anything that would effect this.<br><br>s.shelnutt@funtoo-64 ~/gpu3/wrapper/cudart $ make<br>winegcc -c� -mno-cygwin -m32 -I/usr/local/cuda/include/�� -o cudart.o cudart.c<br>

In file included from /usr/local/cuda/include/cuda_runtime_api.h:53,<br>���������������� from /usr/local/cuda/include/crt/host_runtime.h:108,<br>���������������� from cudart.c:7:<br>/usr/local/cuda/include/host_defines.h:57:1: warning: &quot;__cdecl&quot; redefined<br>

&lt;command-line&gt;: warning: this is the location of the previous definition<br>cudart.c: In function &#39;wine_cudaGetTextureReference&#39;:<br>cudart.c:430: warning: passing argument 1 of &#39;cudaGetTextureReference&#39; from incompatible pointer type<br>

/usr/local/cuda/include/cuda_runtime_api.h:189: note: expected &#39;const struct textureReference **&#39; but argument is of type &#39;struct textureReference **&#39;<br>cudart.c: In function &#39;wine_cudaRegisterFatBinary&#39;:<br>

cudart.c:800: warning: return makes pointer from integer without a cast<br>cudart.c: In function &#39;wine_cudaUnregisterFatBinary&#39;:<br>cudart.c:805: warning: &#39;return&#39; with a value, in function returning void<br>

cudart.c: In function &#39;wine_cudaRegisterVar&#39;:<br>cudart.c:810: warning: &#39;return&#39; with a value, in function returning void<br>cudart.c: In function &#39;wine_cudaRegisterTexture&#39;:<br>cudart.c:815: warning: &#39;return&#39; with a value, in function returning void<br>

cudart.c: In function &#39;wine_cudaRegisterShared&#39;:<br>cudart.c:820: warning: &#39;return&#39; with a value, in function returning void<br>cudart.c: In function &#39;wine_cudaRegisterSharedVar&#39;:<br>cudart.c:825: warning: &#39;return&#39; with a value, in function returning void<br>

cudart.c: In function &#39;wine_cudaRegisterFunction&#39;:<br>cudart.c:831: warning: &#39;return&#39; with a value, in function returning void<br>winegcc -shared cudart.dll.spec -mno-cygwin -o <a href="http://cudart.dll.so">cudart.dll.so</a> cudart.o��� -L/usr/local/cuda/lib/ -lcudart�� -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid<br>

<br><br>If anyone has any ideas about why this doesn&#39;t work, that would be great. I&#39;ve exhausted everything I could think of.<br><br>Thanks,<br><br>Seth Shelnutt<br>