Subject: | Not possible to link with microsoft import libraries since 5.22 |
Date: | Mon, 17 Apr 2017 17:58:01 +0200 |
To: | bug-Perl-Dist-Strawberry [...] rt.cpan.org |
From: | Simon Reinhardt <simon.reinhardt [...] stud.uni-regensburg.de> |
If I link XS code with a windows import library with SP 5.22 or 5.24, I
get the following error:
g++ Zhinst.def -o blib\arch\auto\Lab\Zhinst\Zhinst.xs.dll -mdll -s
-L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" Zhinst.o
"C:\STRAWB~1\perl\lib\CORE\libperl524.a" "C:\Program Files\Zurich
Instruments\LabOne\API\C\lib\ziAPI-win32.lib"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libmoldname.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libkernel32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libuser32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libgdi32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libwinspool.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomdlg32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libadvapi32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libshell32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libole32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\liboleaut32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libnetapi32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libuuid.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libws2_32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libmpr.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libwinmm.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libversion.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libodbc32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libodbccp32.a"
"C:\STRAWB~1\c\i686-w64-mingw32\lib\libcomctl32.a"
-Wl,--enable-auto-image-base
C:\Program Files\Zurich Instruments\LabOne\API\C\lib\ziAPI-win32.lib:
error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
dmake: Error code 129, while making
'blib\arch\auto\Lab\Zhinst\Zhinst.xs.dll'
It's working fine for 5.18 and 5.20:
https://ci.appveyor.com/project/amba/lab-zhinst/build/1.0.3
The reason seems to be bug 17910 in binutils 2.25:
https://sourceware.org/bugzilla/show_bug.cgi?id=17910
Moreover, If I use a 64bit version of perl, no version of SP seems to
work. Maybe this is related to bug 16598 in the binutils:
https://sourceware.org/bugzilla/show_bug.cgi?id=16598
This should all be fixed in recent (>= 2.26) binutils releases.
Message body not shown because it is not plain text.