wineftd2xx icon indicating copy to clipboard operation
wineftd2xx copied to clipboard

Wine with ATDH1150USB Atmel CPLD Programming Cable

Open peterzieba opened this issue 1 year ago • 28 comments

Hi,

Trying to get this to work with a programming adapter which is a pretty basic FTDI adapter on Ubuntu 22.04.2 LTS with Wine.

FTDID=0403:6010 wine ~/.wine/drive_c/ATMISP7/ATMISP.exe 0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\ATMISP7\ATMISP.exe") failed (error c000012f). 0024:err:module:LdrInitializeThunk Importing dlls for L"C:\ATMISP7\ATMISP.exe" failed, status c0000135

It's very possible I'm missing something basic, however, "make" and "make install" seemed to be successful.

I'm running a 64-bit Distribution, however, the software is 32-bit executable. Do I need to do anything special in these circumstances, or is it possible the problem I am experiencing is elsewhere?

Any help would be greatly appreciated.

Regards, Peter

peterzieba avatar May 24 '23 21:05 peterzieba

I have not used this in quite a while. When I build, (on my Debian 64-bit system), I see a lot (>20) of these warnings:

xftd2xx.h:xxx:y: warning: ‘dllimport’ attribute directive ignored [-Wattributes]

I suspect this is the core of the problem. Could you could confirm you see these warnings as well?

brentr avatar May 25 '23 15:05 brentr

Hi,

Yes, I confirm this is what I am seeing.

$ make
WINEDLLPATH=/usr/lib/wine
Link with libftd2xx1.4.22/build/libftd2xx.a
wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz
--2023-05-25 10:52:41--  https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz
Resolving www.ftdichip.com (www.ftdichip.com)... 217.160.0.88, 2001:8d8:100f:f000::2e7
Connecting to www.ftdichip.com (www.ftdichip.com)|217.160.0.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 580578 (567K) [application/x-gtar-compressed]
Saving to: ‘libftd2xx-x86_64-1.4.22.tgz’

libftd2xx-x86_64-1.4.22.tgz                                          100%[====================================================================================================================================================================>] 566.97K   555KB/s    in 1.0s    

2023-05-25 10:52:43 (555 KB/s) - ‘libftd2xx-x86_64-1.4.22.tgz’ saved [580578/580578]

touch -t `date +"%Y%m%d%H%M"` libftd2xx-x86_64-1.4.22.tgz
tar xzf libftd2xx-x86_64-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.4.22/ftd2xx.h >xftd2xx.h
sed -i "/^#include <windows\.h>.*/a typedef const char \*LPCTSTR;" xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -g -O0 -Wall -m64 \
          -Ilibftd2xx1.4.22 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
In file included from ftd2xx.c:10:
xftd2xx.h:338:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  338 |                 );
      |                 ^
xftd2xx.h:345:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  345 |                 );
      |                 ^
xftd2xx.h:352:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  352 |                 );
      |                 ^
xftd2xx.h:357:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  357 |                 );
      |                 ^
xftd2xx.h:365:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  365 |                 );
      |                 ^
xftd2xx.h:373:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  373 |                 );
      |                 ^
xftd2xx.h:385:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  385 |                 );
      |                 ^
xftd2xx.h:391:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  391 |                 );
      |                 ^
xftd2xx.h:397:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  397 |                 );
      |                 ^
xftd2xx.h:405:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  405 |                 );
      |                 ^
xftd2xx.h:413:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  413 |                 );
      |                 ^
xftd2xx.h:418:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  418 |                 );
      |                 ^
xftd2xx.h:423:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  423 |                 );
      |                 ^
xftd2xx.h:428:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  428 |                 );
      |                 ^
xftd2xx.h:433:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  433 |                 );
      |                 ^
xftd2xx.h:438:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  438 |                 );
      |                 ^
xftd2xx.h:444:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  444 |                 );
      |                 ^
xftd2xx.h:453:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  453 |                 );
      |                 ^
xftd2xx.h:459:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  459 |                 );
      |                 ^
xftd2xx.h:466:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  466 |                 );
      |                 ^
xftd2xx.h:472:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  472 |                 );
      |                 ^
xftd2xx.h:479:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  479 |                 );
      |                 ^
xftd2xx.h:487:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  487 |                 );
      |                 ^
xftd2xx.h:492:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  492 |                 );
      |                 ^
xftd2xx.h:497:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  497 |                 );
      |                 ^
xftd2xx.h:503:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  503 |                 );
      |                 ^
xftd2xx.h:509:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  509 |                 );
      |                 ^
xftd2xx.h:515:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  515 |                 );
      |                 ^
xftd2xx.h:522:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  522 |                 );
      |                 ^
xftd2xx.h:529:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  529 |                 );
      |                 ^
xftd2xx.h:534:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  534 |                 );
      |                 ^
xftd2xx.h:704:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  704 |                 );
      |                 ^
xftd2xx.h:714:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  714 |                 );
      |                 ^
xftd2xx.h:720:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  720 |                 );
      |                 ^
xftd2xx.h:730:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  730 |                 );
      |                 ^
xftd2xx.h:736:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  736 |                 );
      |                 ^
xftd2xx.h:743:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  743 |                 );
      |                 ^
xftd2xx.h:751:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  751 |                 );
      |                 ^
xftd2xx.h:977:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  977 |                 );
      |                 ^
xftd2xx.h:989:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  989 |                 );
      |                 ^
xftd2xx.h:996:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
  996 |                 );
      |                 ^
xftd2xx.h:1002:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1002 |                 );
      |                 ^
xftd2xx.h:1009:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1009 |                 );
      |                 ^
xftd2xx.h:1015:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1015 |                 );
      |                 ^
xftd2xx.h:1022:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1022 |                 );
      |                 ^
xftd2xx.h:1028:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1028 |                 );
      |                 ^
xftd2xx.h:1061:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1061 |                 );
      |                 ^
xftd2xx.h:1066:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1066 |                 );
      |                 ^
xftd2xx.h:1071:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1071 |                 );
      |                 ^
xftd2xx.h:1077:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1077 |                 );
      |                 ^
xftd2xx.h:1082:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1082 |                 );
      |                 ^
xftd2xx.h:1087:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1087 |                 );
      |                 ^
xftd2xx.h:1103:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1103 |                 );
      |                 ^
xftd2xx.h:1108:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1108 |                 );
      |                 ^
xftd2xx.h:1117:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1117 |                 );
      |                 ^
xftd2xx.h:1126:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1126 |                 );
      |                 ^
xftd2xx.h:1131:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1131 |                 );
      |                 ^
xftd2xx.h:1139:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1139 |                 );
      |                 ^
xftd2xx.h:1144:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1144 |                 );
      |                 ^
xftd2xx.h:1206:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1206 |                 );
      |                 ^
xftd2xx.h:1213:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1213 |                 );
      |                 ^
xftd2xx.h:1219:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1219 |                 );
      |                 ^
xftd2xx.h:1225:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1225 |                 );
      |                 ^
xftd2xx.h:1231:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1231 |                 );
      |                 ^
xftd2xx.h:1237:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1237 |                 );
      |                 ^
xftd2xx.h:1243:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1243 |                 );
      |                 ^
xftd2xx.h:1248:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1248 |                 );
      |                 ^
xftd2xx.h:1254:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1254 |                 );
      |                 ^
xftd2xx.h:1260:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1260 |                 );
      |                 ^
xftd2xx.h:1266:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1266 |                 );
      |                 ^
xftd2xx.h:1272:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1272 |                 );
      |                 ^
xftd2xx.h:1279:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1279 |                 );
      |                 ^
xftd2xx.h:1286:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1286 |                 );
      |                 ^
xftd2xx.h:1313:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1313 |                 );
      |                 ^
xftd2xx.h:1319:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1319 |                 );
      |                 ^
xftd2xx.h:1331:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1331 |                 );
      |                 ^
xftd2xx.h:1342:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1342 |                 );
      |                 ^
xftd2xx.h:1347:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1347 |                 );
      |                 ^
xftd2xx.h:1353:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1353 |                 );
      |                 ^
xftd2xx.h:1359:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1359 |                 );
      |                 ^
xftd2xx.h:1365:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1365 |                 );
      |                 ^
xftd2xx.h:1377:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1377 |                 );
      |                 ^
xftd2xx.h:1384:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1384 |                 );
      |                 ^
xftd2xx.h:1391:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1391 |                 );
      |                 ^
xftd2xx.h:1397:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1397 |                 );
      |                 ^
xftd2xx.h:1402:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1402 |                 );
      |                 ^
xftd2xx.h:1407:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1407 |                 );
      |                 ^
xftd2xx.h:1415:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1415 |                 );
      |                 ^
xftd2xx.h:1423:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1423 |                 );
      |                 ^
xftd2xx.h:1431:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1431 |                 );
      |                 ^
xftd2xx.h:1439:17: warning: ‘dllimport’ attribute directive ignored [-Wattributes]
 1439 |                 );
      |                 ^
ftd2xx.c: In function ‘DllMain’:
ftd2xx.c:40:13: warning: implicit declaration of function ‘FT_SetVIDPID’ [-Wimplicit-function-declaration]
   40 |         if (FT_SetVIDPID(vendor, product))
      |             ^~~~~~~~~~~~
In file included from ftd2xx.c:11:
ftd2xx.c:42:15: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
   42 |         TRACE("Seeking vendor:product 0x%04x:0x%04x\n", vendor, product);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          ~~~~~~~
      |                                                                 |
      |                                                                 long unsigned int
/usr/lib/wine/../../include/wine/wine/debug.h:89:49: note: in definition of macro ‘__WINE_DBG_LOG’
   89 |     wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
      |                                                 ^~~~
/usr/lib/wine/../../include/wine/wine/debug.h:476:36: note: in expansion of macro ‘__WINE_DPRINTF’
  476 | #define WINE_TRACE                 __WINE_DPRINTF(_TRACE,__wine_dbch___default)
      |                                    ^~~~~~~~~~~~~~
/usr/lib/wine/../../include/wine/wine/debug.h:519:36: note: in expansion of macro ‘WINE_TRACE’
  519 | #define TRACE                      WINE_TRACE
      |                                    ^~~~~~~~~~
ftd2xx.c:42:9: note: in expansion of macro ‘TRACE’
   42 |         TRACE("Seeking vendor:product 0x%04x:0x%04x\n", vendor, product);
      |         ^~~~~
ftd2xx.c:42:51: note: format string is defined here
   42 |         TRACE("Seeking vendor:product 0x%04x:0x%04x\n", vendor, product);
      |                                                ~~~^
      |                                                   |
      |                                                   unsigned int
      |                                                %04lx
tar xzf libftd2xx-x86_64-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
objcopy --redefine-syms=xFTsyms.objcopy libftd2xx1.4.22/build/libftd2xx.a libxftd2xx.a
winegcc -g -O0 -Wall -m64 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
winebuild -m64 -w --def -o libftd2xx.def --export ftd2xx.spec

peterzieba avatar May 25 '23 15:05 peterzieba

Try checking out the new suppressImportDLL branch. If builds without warnings. I don't have ready access to the hardware to test this. If it works for you, I'll merge this into the main branch.

brentr avatar May 26 '23 06:05 brentr

Hi,

The warnings went away, however, Wine still has trouble loading the DLL. Is it possible that this would have worked before despite the warnings in the previous compilation? I'm wondering if the problem has to do with where wine is looking for the files or a 32-bit/64-bit problem.

On the off chance, I saw another issue mention copying the file to ftd2xx.dll, but that didn't seem to work either. I'm out of my element here so I'm reaching, but the error "(error c000012f)" seems non-specific.

In any event, I can't say enough how much I appreciate this -- I'm fairly certain there is a lot of diverse hardware that would be able to work under Wine with something like this.

peter@laptop:~$ git clone --branch suppressImportDLL https://github.com/brentr/wineftd2xx.git
Cloning into 'wineftd2xx'...
remote: Enumerating objects: 71, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 71 (delta 4), reused 6 (delta 3), pack-reused 57
Receiving objects: 100% (71/71), 20.00 KiB | 1.25 MiB/s, done.
Resolving deltas: 100% (30/30), done.
peter@laptop:~$ cd wineftd2xx
peter@laptop:~/wineftd2xx$ make
WINEDLLPATH=/usr/lib/wine
Link with libftd2xx1.4.22/build/libftd2xx.a
wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz
--2023-05-26 09:53:35--  https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.22.tgz
Resolving www.ftdichip.com (www.ftdichip.com)... 2001:8d8:100f:f000::2e7, 217.160.0.88
Connecting to www.ftdichip.com (www.ftdichip.com)|2001:8d8:100f:f000::2e7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 580578 (567K) [application/x-gtar-compressed]
Saving to: ‘libftd2xx-x86_64-1.4.22.tgz’

libftd2xx-x86_64-1.4.22.tgz       100%[=============================================================>] 566.97K   717KB/s    in 0.8s    

2023-05-26 09:53:36 (717 KB/s) - ‘libftd2xx-x86_64-1.4.22.tgz’ saved [580578/580578]

touch -t 1201010000 libftd2xx-x86_64-1.4.22.tgz  #we want this file to look old!
tar xzf libftd2xx-x86_64-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.4.22/ftd2xx.h >xftd2xx.h
sed -i "/^#include <windows\.h>.*/a typedef const char \*LPCTSTR;" xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -g -O0 -Wall -m64 \
          -Ilibftd2xx1.4.22 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
objcopy --redefine-syms=xFTsyms.objcopy libftd2xx1.4.22/build/libftd2xx.a libxftd2xx.a
winegcc -g -O0 -Wall -m64 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
winebuild -m64 -w --def -o libftd2xx.def --export ftd2xx.spec

peter@laptop:~/wineftd2xx$ sudo make install
[sudo] password for owner: 
WINEDLLPATH=/usr/lib/wine
Link with libftd2xx1.4.22/build/libftd2xx.a
cp ftd2xx.dll.so libftd2xx.def  /usr/lib/wine
FTDID=0403:6010 wine ~/.wine/drive_c/ATMISP7/ATMISP.exe
0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\\ATMISP7\\ATMISP.exe") failed (error c000012f).
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\ATMISP7\\ATMISP.exe" failed, status c0000135

peterzieba avatar May 26 '23 16:05 peterzieba

There were some problems due to changes in Wine over the last 8 years or so.

I've just finished testing with my hardware on both 32-bit and 64-bit Debian systems running recent versions of Wine. As far as I can tell, it's all working again. See if you don't agree...

Remember that you must follow the instructions in the README to: Build and install the 32-bit version of the library Specify the product number of the FTDI device your app is attempting to control

Good luck!

brentr avatar May 27 '23 05:05 brentr

So, here is what I'm starting with:

  • Ubuntu 22.04.2 LTS on x86_64 with wine-6.0.3 (Ubuntu 6.0.3~repack-1)
  • I'm using the version of Wine that comes with the distribution, however, I'm happy to try to newer versions from their website if that makes more sense.
  • I'm also still using the suppressImportDLL branch.

Initially I was getting lots of stuff missing (as below), but this was resolved with apt-get install libwine-dev:i386 :

winegcc -Os -Wall -m32 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
/usr/bin/ld: cannot find -lntdll: No such file or directory
/usr/bin/ld: cannot find -lkernel32: No such file or directory
/usr/bin/ld: cannot find -lshell32: No such file or directory
/usr/bin/ld: cannot find -lcomdlg32: No such file or directory
/usr/bin/ld: cannot find -lgdi32: No such file or directory
/usr/bin/ld: cannot find -ladvapi32: No such file or directory
/usr/bin/ld: cannot find -luser32: No such file or directory
/usr/bin/ld: cannot find -lwinecrt0: No such file or directory
/usr/bin/ld: cannot find -lkernel32: No such file or directory
/usr/bin/ld: cannot find -lntdll: No such file or directory
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc failed
make: *** [Makefile:64: ftd2xx.dll.so] Error 2

Anyway, so after resolving the package dep, here's what I did (I'm assuming I set the path correctly, as the autodetect failed.):

make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine

At which point I got:

...
touch -t  libftd2xx-i386-1.4.22.tgz
touch: invalid date format ‘libftd2xx-i386-1.4.22.tgz’
make: *** [Makefile:45: libftd2xx-i386-1.4.22.tgz] Error 1

I think the ${CUR_DATETIME} variable is empty. So, I just removed that whole line in the Makefile.

Finally, here is what I ultimately ran:

make clean ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine
make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine
sudo make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine install

And here's what I got:

WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
rm -f *.o *xftd2xx.* *.so *.def libftd2xx1.4.22/build/libftd2xx.a
WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.4.22/ftd2xx.h >xftd2xx.h
sed -i "/^#include <windows\.h>.*/a typedef const char \*LPCTSTR;" xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -Os -Wall -m32 \
          -Ilibftd2xx1.4.22 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
In file included from ftd2xx.c:13:
/usr/lib/wine/../../include/wine/wine/debug.h:501:48: warning: ‘__wine_dbch___default’ defined but not used [-Wunused-const-variable=]
  501 |     static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
      |                                                ^~~~~~~~~~~~~~~~~~~~~
ftd2xx.c:14:1: note: in expansion of macro ‘WINE_DEFAULT_DEBUG_CHANNEL’
   14 | WINE_DEFAULT_DEBUG_CHANNEL(ftd2xx);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
objcopy --redefine-syms=xFTsyms.objcopy libftd2xx1.4.22/build/libftd2xx.a libxftd2xx.a
winegcc -Os -Wall -m32 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
chmod -x ftd2xx.dll.so
winebuild -m32 -w --def -o libftd2xx.def --export ftd2xx.spec
[sudo] password for owner: 
WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
cp ftd2xx.dll.so /usr/lib/i386-linux-gnu/wine

When trying to use it:

FTDID=0403:6010 wine ~/.wine/drive_c/ATMISP7/ATMISP.exe
0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\\ATMISP7\\ATMISP.exe") failed (error c000012f).
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\ATMISP7\\ATMISP.exe" failed, status c0000135

Is there something different I should try? Should I try the master branch?

peterzieba avatar May 27 '23 17:05 peterzieba

You're making progress. Yes, switch back to the master branch. The $CUR_DATETIME issue was caused by my accepting a buggy patch request years ago without reviewing it well. I think I've gotten rid of the remaining references to that bogus variable. Just git pull for the latest.

The main problem you're having is that the ftd2xx.dll.so is not being installed in the correct directory for your wine installation. My systems are running Debian 11 with wine version 8 from winehq. You're on version 6 packaged by Ubuntu. If you want to install the latest from WineHQ on Ubuntu, see: https://wiki.winehq.org/Ubuntu

The directory where wine puts its dll.so files seems to depend on the version and the packager. My 'winelibdir' script attempts to figure out the correct directory, but I can't find a simple way that works with all these variants.

On my WineHQ packaged systems: $ winelibdir i386 /opt/wine-devel/lib/wine/i386-unix $ winelibdir x86_64 /opt/wine-devel/lib64/wine/x86_64-unix

It's quite likely that this winelibdir script is not working properly on your system. Do you have directories called i386-unix or x86_64-unix as part of your wine installation? If so, where are they? If not, what is the output of:

$ find [top directory of wine install] -name libwinmm.a

We're looking for the directory containing the unix libraries supporting windows executables. All "make install" really does is to copy ftd2xx.dll.so into that directory.

I'll try to update winelibdir to automate this better once I hear back from you.

brentr avatar May 27 '23 18:05 brentr

Ok, using the master branch I still have trouble, however, considering you are using Wine 8, I'm happy enough to move to Wine 8 from Wine HQ.

I was hesitant because I didn't want to create a mess of packages, but I don't rely on it heavily and it sounded like the new Wine was fairly compelling. Having this working is more than enough reason to move. It might take me a moment to switch but I'll let you know as soon as I have it up.

Below is what happened with the master branch on the current setup with v6 wine:

Cloning into 'wineftd2xx'...
remote: Enumerating objects: 102, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 102 (delta 23), reused 26 (delta 10), pack-reused 57
Receiving objects: 100% (102/102), 24.80 KiB | 907.00 KiB/s, done.
Resolving deltas: 100% (49/49), done.
WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
rm -f *.o *xftd2xx.* *.so *.def libftd2xx1.4.22/build/libftd2xx.a
WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-i386-1.4.22.tgz
--2023-05-27 13:48:36--  https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-i386-1.4.22.tgz
Resolving www.ftdichip.com (www.ftdichip.com)... 217.160.0.88, 2001:8d8:100f:f000::2e7
Connecting to www.ftdichip.com (www.ftdichip.com)|217.160.0.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 572451 (559K) [application/x-gtar-compressed]
Saving to: ‘libftd2xx-i386-1.4.22.tgz’

libftd2xx-i386-1.4.22.tgz                   100%[===========================================================================================>] 559.03K   854KB/s    in 0.7s    

2023-05-27 13:48:38 (854 KB/s) - ‘libftd2xx-i386-1.4.22.tgz’ saved [572451/572451]

touch -t 1201010000 libftd2xx-i386-1.4.22.tgz  #we want this file to look old!
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.4.22/ftd2xx.h >xftd2xx.h
sed -i "/^#include <windows\.h>.*/a typedef const char \*LPCTSTR;" xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -Os -Wall -m32 \
          -Ilibftd2xx1.4.22 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
In file included from ftd2xx.c:13:
/usr/lib/wine/../../include/wine/wine/debug.h:501:48: warning: ‘__wine_dbch___default’ defined but not used [-Wunused-const-variable=]
  501 |     static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
      |                                                ^~~~~~~~~~~~~~~~~~~~~
ftd2xx.c:14:1: note: in expansion of macro ‘WINE_DEFAULT_DEBUG_CHANNEL’
   14 | WINE_DEFAULT_DEBUG_CHANNEL(ftd2xx);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
objcopy --redefine-syms=xFTsyms.objcopy libftd2xx1.4.22/build/libftd2xx.a libxftd2xx.a
winegcc -Os -Wall -m32 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
chmod -x ftd2xx.dll.so
winebuild -m32 -w --def -o libftd2xx.def --export ftd2xx.spec
[sudo] password for owner: 
WINELIBDIR=/usr/lib/i386-linux-gnu/wine
Linked with libftd2xx1.4.22/build/libftd2xx.a
cp ftd2xx.dll.so /usr/lib/i386-linux-gnu/wine

owner@dl1p1:~$ ./atmisp.sh 
0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\\ATMISP7\\ATMISP.exe") failed (error c000012f).
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\ATMISP7\\ATMISP.exe" failed, status c0000135
owner@dl1p1:~$ 00a0:err:rpc:I_RpcReceive we got fault packet with status 0x1c010003

peterzieba avatar May 27 '23 19:05 peterzieba

Before you switch to the Wine HQ package, could you try to locate the directory containing the windows support libraries in the Ubuntu packaged version of Wine you already have installed?

Do you have directories called i386-unix or x86_64-unix as part of your wine installation? If so, where are they? If not, what is the output of:

$ find [top directory of wine install] -name libwinmm.a

Another way would be to set the WINEDLLPATH env variable to the directory containing the libftd2xx.dll.so file. This worked for me even after I deleted the .dll.so file from the system directory.

Just after you build the 32-bit version, do not install it. Instead:

$ export WINEDLLPATH=$(pwd) $ cd [whereever atmisp.sh is located] $ ./atmisp.sh

brentr avatar May 27 '23 19:05 brentr

see https://wiki.winehq.org/Man_Pages/wine for an explanation of its environment variables

brentr avatar May 27 '23 19:05 brentr

Hi,

So I have the following directories:

/usr/lib/x86_64-linux-gnu/wine
/usr/lib/i386-linux-gnu/wine

This is what I ran that produced the previous output against the master branch:

make clean ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine
make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine
sudo make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine install

Searching the entire filesystem from root, I do not have the file you mention, but I do have: /usr/lib/i386-linux-gnu/wine/libwinmm.def

peterzieba avatar May 27 '23 19:05 peterzieba

As far as not doing a make install so as to point WINELIBDIR directly here is what I've done:

make clean ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine
make ARCH=i386 WINELIBDIR=/usr/lib/i386-linux-gnu/wine

The file you mention (libftd2xx.dll.so) doesn't exist. I assume you mean ftd2xx.dll.so Here's what I have after building:

~/wineftd2xx$ find . -iname "lib*"
./libxftd2xx.a
./libftd2xx.def
./libftd2xx-i386-1.4.22.tgz
./libftd2xx1.4.22
./libftd2xx1.4.22/libusb
./libftd2xx1.4.22/libusb/libusb
./libftd2xx1.4.22/libusb/libusb/libusbi.h
./libftd2xx1.4.22/libusb/libusb/libusb-1.0.def
./libftd2xx1.4.22/libusb/libusb/libusb.h
./libftd2xx1.4.22/libusb/libusb/libusb-1.0.rc
./libftd2xx1.4.22/build/libftd2xx.so.1.4.22
./libftd2xx1.4.22/build/libusb
./libftd2xx1.4.22/build/libusb/libusb
./libftd2xx1.4.22/build/libftd2xx
./libftd2xx1.4.22/build/libftd2xx.txt
./libftd2xx1.4.22/build/libftd2xx.a

Investigating that file, I have:

~/wineftd2xx$ file ftd2xx.dll.so 
ftd2xx.dll.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=e5eb5a749855cb128eff2dee395fc98e01615f68, not stripped

Finally, trying to use it by running:

export WINEDLLPATH=/home/owner/wineftd2xx
stat $WINEDLLPATH/ftd2xx.dll.so
FTDID=0403:6010 wine ~/.wine/drive_c/ATMISP7/ATMISP.exe

Here's the output:

./atmisp.sh
  File: /home/owner/wineftd2xx/ftd2xx.dll.so
  Size: 375448    	Blocks: 736        IO Block: 4096   regular file
Device: fd00h/64768d	Inode: 67899858    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/   owner)   Gid: ( 1000/   owner)
Access: 2023-05-27 15:14:01.720981754 -0500
Modify: 2023-05-27 15:11:15.286153894 -0500
Change: 2023-05-27 15:11:15.286153894 -0500
 Birth: 2023-05-27 15:11:15.258154029 -0500
0024:err:module:import_dll Loading library FTD2XX.dll (which is needed by L"C:\\ATMISP7\\ATMISP.exe") failed (error c000012f).
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\ATMISP7\\ATMISP.exe" failed, status c0000135

peterzieba avatar May 27 '23 20:05 peterzieba

Sorry about getting the dll file name wrong. You fixed that. You seem to have found the correct directory. The location conforms to the Debian multi-arch standard. So, I'm at a loss at this point. I'll still revise the winelibdir script to find this dir, but that won't help you.

I found this post that claims: https://forum.winehq.org/viewtopic.php?t=36023

Error c000012f means Wine can't load the DLL (nnn.dll) because the he required Microsoft Visual C++ Redistributables files can't be found or there is a 64 - 32 bit mismatch.

I'd test this by removing all copies of ftd2xx.dll.so then rerun your atmisp7 app and note whether or not the error message changes. (would it kill the devs to create readable error messages?)

When I run: file ftd2xx.dll.so ftd2xx.dll.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=748ad59a5804a485eeb7faf8bbfe5b2647aaa506, not stripped

You should see (nearly) the same. Is your atmisp7.exe app 64-bit? !

brentr avatar May 27 '23 22:05 brentr

No, this is old-school 32-bit stuff:

owner@dl1p1:~/.wine/drive_c/ATMISP7$ file ATMISP.exe 
ATMISP.exe: PE32 executable (GUI) Intel 80386, for MS Windows

peterzieba avatar May 27 '23 22:05 peterzieba

Well designed apps would start even if the ftd2xx support were not present. They run in a demo mode or complain that they cannot access required hardware, but they do start. Do other non-trivial apps work for you in this Wine environment?

brentr avatar May 27 '23 22:05 brentr

Yeah, I searched for lingering copies and removed them.

Yes, I have WinCUPL working just fine. Wine itself works without issue.

I'm onto installing Wine HQ version 8.0

peterzieba avatar May 27 '23 22:05 peterzieba

After removal, you get the same cryptic c000012f error message? I don't get that from my app when I remove the ftd2xxdll.dll.so files

brentr avatar May 27 '23 22:05 brentr

So, it looks like I had some utter nonsense inside of ./home/owner/.wine/drive_c/windows/syswow64/ftd2xx.dll, which actually contained HTML of all things. How/why that ended up in there is beyond me.

Thanks for pointing out that the message should have disappeared. I thought I scoured the filesystem pretty closely, but once I started broadening my search to anything containing 'ftd' that showed up and I looked inside.

Now I'm on Wine 8, however, so it might take me a sec to get going again.

peterzieba avatar May 27 '23 22:05 peterzieba

So, I've moved everything over to WineHQ v8.0.1 and everything compiled cleanly, but no matter what I do I can't seem to get Wine to see the dll. I confirm that Wine is working for other programs (WinCUPL, etc.):

0024:err:module:import_dll Library FTD2XX.dll (which is needed by L"C:\\ATMISP7\\ATMISP.exe") not found
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\ATMISP7\\ATMISP.exe" failed, status c0000135

This is how I compiled things:

make ARCH=i386
sudo make ARCH=i386 install

The .dll appears to be as expected:

file /opt/wine-stable/lib/wine/i386-unix/ftd2xx.dll.so
/opt/wine-stable/lib/wine/i386-unix/ftd2xx.dll.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=58c69536e1082f038d4f8293d7fc73373e15bc3f, not stripped

Everything looks to have compiled cleanly:

Cloning into 'wineftd2xx'...
remote: Enumerating objects: 102, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 102 (delta 23), reused 26 (delta 10), pack-reused 57
Receiving objects: 100% (102/102), 24.80 KiB | 12.40 MiB/s, done.
Resolving deltas: 100% (49/49), done.
WINELIBDIR=/opt/wine-stable/lib/wine/i386-unix
Linked with libftd2xx1.4.22/build/libftd2xx.a
wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-i386-1.4.22.tgz
--2023-05-27 21:08:18--  https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-i386-1.4.22.tgz
Resolving www.ftdichip.com (www.ftdichip.com)... 217.160.0.88, 2001:8d8:100f:f000::2e7
Connecting to www.ftdichip.com (www.ftdichip.com)|217.160.0.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 572451 (559K) [application/x-gtar-compressed]
Saving to: ‘libftd2xx-i386-1.4.22.tgz’

libftd2xx-i386-1.4.22.tgz                  100%[=====================================================================================>] 559.03K   651KB/s    in 0.9s    

2023-05-27 21:08:20 (651 KB/s) - ‘libftd2xx-i386-1.4.22.tgz’ saved [572451/572451]

touch -t 1201010000 libftd2xx-i386-1.4.22.tgz  #we want this file to look old!
tar xzf libftd2xx-i386-1.4.22.tgz
rm -rf libftd2xx1.4.22
mv release libftd2xx1.4.22
sed "s/WINAPI FT_/xFT_/g" libftd2xx1.4.22/ftd2xx.h >xftd2xx.h
sed -i "/^#include <windows\.h>.*/a typedef const char \*LPCTSTR;" xftd2xx.h
winegcc -D_REENTRANT -D__WINESRC__ -c -Os -Wall -m32 \
          -Ilibftd2xx1.4.22 -fno-omit-frame-pointer -o ftd2xx.o ftd2xx.c
objcopy --redefine-syms=xFTsyms.objcopy libftd2xx1.4.22/build/libftd2xx.a libxftd2xx.a
winegcc -Os -Wall -m32 -mwindows -lntdll -lkernel32 \
          -o ftd2xx.dll ftd2xx.o libxftd2xx.a -shared ftd2xx.spec libxftd2xx.a -ldl -lrt -lpthread
chmod -x ftd2xx.dll.so
winebuild -m32 -w --def -o libftd2xx.def --export ftd2xx.spec
[sudo] password for owner: 
WINELIBDIR=/opt/wine-stable/lib/wine/i386-unix
Linked with libftd2xx1.4.22/build/libftd2xx.a
cp ftd2xx.dll.so /opt/wine-stable/lib/wine/i386-unix

peterzieba avatar May 28 '23 04:05 peterzieba

My ftd2xx.dll.so is 378680 bytes long.

If this matches yours, then the problem is likely elsewhere. I'd be willing to try to install your ATMISP windows app to test if you can tell me how to download it.

I assume you get the error message whether or not the FTDI USB device is plugged in.

brentr avatar May 28 '23 04:05 brentr

The filesize on this end for ftd2xx.dll.so is 378784 bytes.

Sure, the software is from: https://www.microchip.com/en-us/products/fpgas-and-plds/spld-cplds/pld-design-resources Specifically, ATMISP v7.3 http://ww1.microchip.com/downloads/en/DeviceDoc/ATMISP7.zip

In the previous version of wine, the software eventually managed to start but was unable to detect the unit so I figured I'd have better luck with V8. Now it fails to find the .dll all together, which is odd.

The software should start regardless of whether the hardware is plugged in, but will fail to load entirely if that .dll is not present.

I have tried making sure it is plugged in and taking note of udev rules as well nonetheless.

peterzieba avatar May 28 '23 05:05 peterzieba

Oh, one thing to add is that winelibdir returns /opt/wine-stable/lib64/wine/x86_64-unix so I am using the following to compile things:

make ARCH=i386 WINELIBDIR=/opt/wine-stable/lib/wine/i386-unix
sudo make ARCH=i386 WINELIBDIR=/opt/wine-stable/lib/wine/i386-unix install

The wine prefix was generated via the following:

WINEARCH=win32 WINEPREFIX="/home/owner/.wine/" winecfg

Also, one needs mfc42 for this software:

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
./winetricks mfc42

peterzieba avatar May 28 '23 05:05 peterzieba

Renaming to FTD2XX.dll and placing directly inside of ~/.wine/drive_c/ATMISP7/ did the trick, however, it does not seem to detect the device.

I have a strong suspicion that it has to do with the following error: 0084:fixme:wineusb:query_id Unhandled ID query type 0x5.

The full list of messages that comes up when starting is this:

owner@dl1p1:~$ ./atmisp.sh
0088:fixme:wineusb:query_id Unhandled ID query type 0x5.
0088:fixme:wineusb:query_id Unhandled ID query type 0x5.
0088:fixme:wineusb:query_id Unhandled ID query type 0x5.
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0088:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0078:fixme:imm:ImeSetActiveContext (00010026, 0): stub
0078:fixme:imm:ImmReleaseContext (00010020, 00010026): stub
0024:fixme:imm:ImeSetActiveContext (00010070, 1): stub
0024:fixme:imm:ImmReleaseContext (0001006A, 00010070): stub

However, it is very notable that 0084:fixme:wineusb:query_id Unhandled ID query type 0x5. comes up specifically when plugging the device in. I have a strong feeling the issue could be related to that message.

peterzieba avatar May 28 '23 06:05 peterzieba

I think I see the problem... The ATMISP7 app is offers to install version 2.x of the windows FTDI drivers. But, this winftd2xx project shim version 1.4.22 of the FTDI library. When I installed the ATMISP app, I hit the cancel button when it asked to install version 2.x of the FTDI drivers. The app ran fine, but, of course, didn't find any FTDI devices.

It's a long shot, but you might try installing the FTDI 1.4.22 windows drivers after removing the 2.x drivers. It's possible the ATMISP will work with the older version. Worth a try, anyway.

Note that the unix dll.so shared libraries do not normally live inside the windows .wine prefix. I would remove that renamed DLL.so before trying to use the older drivers. If all else fails, you can try installing it there again.

Note also that I never encountered the 'status c0000135' error with or without the library's presence. So, I think whats happening is that the 2.x driver is not finding the Unix shim library it needs.

This shim could be adapted for the 2.x FTDI driver, but it would be a new project. The 1.x shim would still be needed for older applications.

If this turns out to be the case, I'll update the project README so no one else needs to find this out the hard way. Sorry.

brentr avatar May 28 '23 06:05 brentr

FYI- I always get same wineusb:query_id Unhandled ID query type 0x5 messages when plugging in a USB device.

In addition, when the windftd2xx shim is working properly, I see these messages:

0090:fixme:ntoskrnl:IoIsWdmVersionAvailable unknown major 1 minor 0xA 0090:fixme:plugplay:PoSetPowerState device 006513E8, type 1, state 1, stub! 0090:fixme:ntoskrnl:KeInitializeDpc dpc 006519C4, deferred_routine 02B744E0, deferred_context 006513E8 semi-stub. 0090:fixme:ntoskrnl:KeInitializeDpc dpc 00651A0C, deferred_routine 02B72ED2, deferred_context 006513E8 semi-stub. 0120:fixme:ntoskrnl:KeSetPriorityThread (00650390 16) 0090:fixme:wineusb:usb_submit_urb Unhandled function 0x17. 0090:fixme:plugplay:IoGetDeviceProperty Unhandled property 7.

brentr avatar May 28 '23 06:05 brentr

Do you have a place I might be able to pull the recommended version of the FTDI driver from?

There is also an older version of ATMISP, however, it doesn't seem to install in Wine for me.

Peter

peterzieba avatar May 28 '23 19:05 peterzieba

Not at my computer. You can download the 1.4 2xx drivers from FTDI's website. Can provide link this evening.

On May 28, 2023 12:33:01 PM PDT, peterzieba @.***> wrote:

Do you have a place I might be able to pull the recommended version of the FTDI driver from?

There is also an older version of ATMISP, however, it doesn't seem to install in Wine for me.

Peter

-- Reply to this email directly or view it on GitHub: https://github.com/brentr/wineftd2xx/issues/15#issuecomment-1566238047 You are receiving this because you commented.

Message ID: @.***>

  • brent

brentr avatar May 28 '23 19:05 brentr

I couldn't install the ATMISP67 either. (Kept getting error 1603 near the end of the install)

A few weeks ago, I set up an older MacBook Air to dual boot Debian and Windows 10. I brought a Win 10 Pro OEM license from Ebay. Like this item: (digital key for $12.84)

https://www.ebay.com/itm/325670376430

This is legit. I believe OEMs buy blocks of Win 10 licenses and, at least in Germany, they are free to resell those they don't use. The license is valid for only a single computer. All I can say is that it worked for me.

I don't see why you couldn't run this windows in VirtualBox or some other VM, but I opted to dual boot on physical hardware.

brentr avatar May 29 '23 03:05 brentr