Closed Neumann-A closed 3 years ago
Can you show the entire cccl command executed? I suspect it has -link
in the list of command line options, which means link against the ink library, so cccl is doing the right thing. All you have shown is what is passed to libtool.
I've stumbled upon the same issue.
Here's the output of make V=1
:
/bin/sh ../libtool --tag=CC --mode=link cccl /DIXML_HAVE_SCRIPTSUPPORT /DUPNP_USE_MSVCPP /DLIBUPNP_EXPORTS /FS --cccl-verbose /DWIN32 /D_WINDOWS /W3 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -g -Wall -Wextra -Wpedantic -version-info 11:0:0 -export-symbols-regex '^ixml.*' -no-undefined --cccl-verbose -o libixml.la -rpath D:/Projects/GitHub/vcpkg/packages/pupnp_x64-windows/debug/lib src/attr.lo src/document.lo src/element.lo src/ixml.lo src/ixmldebug.lo src/ixmlparser.lo src/ixmlmembuf.lo src/namedNodeMap.lo src/node.lo src/nodeList.lo pthreadVC3.lib iphlpapi.lib ws2_32.lib
libtool: link: dumpbin -symbols -headers src/.libs/attr.obj src/.libs/document.obj src/.libs/element.obj src/.libs/ixml.obj src/.libs/ixmldebug.obj src/.libs/ixmlparser.obj src/.libs/ixmlmembuf.obj src/.libs/namedNodeMap.obj src/.libs/node.obj src/.libs/nodeList.obj | gawk ' {last_section=section; section=$ 3}; /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]}; /Section length .*#relocs.*(pick any)/{hide[last_section]=1}; /^ *Symbol name *: /{split($ 0,sn,":"); si=substr(sn[2],2)}; /^ *Type *: code/{print "T",si,substr(si,length(prfx))}; /^ *Type *: data/{print "I",si,substr(si,length(prfx))}; $ 0!~/External *\|/{next}; / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next}; {if(hide[section]) next}; {f="D"}; $ 0~/\(\).*\|/{f="T"}; {split($ 0,a,/\||\r/); split(a[2],s)}; s[1]~/^[@?]/{print f,s[1],s[1]; next}; s[1]~prfx {split(s[1],t,"@"); print f,t[1],substr(t[1],length(prfx))} ' prfx=^ | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libixml.exp
libtool: link: /usr/bin/grep -E -e "^ixml.*" ".libs/libixml.exp" > ".libs/libixml.expT"
libtool: link: mv -f ".libs/libixml.expT" ".libs/libixml.exp"
libtool: link: cccl -o .libs/libixml-11.dll src/.libs/attr.obj src/.libs/document.obj src/.libs/element.obj src/.libs/ixml.obj src/.libs/ixmldebug.obj src/.libs/ixmlparser.obj src/.libs/ixmlmembuf.obj src/.libs/namedNodeMap.obj src/.libs/node.obj src/.libs/nodeList.obj -g `func_echo_all "" | /usr/bin/sed 's/ -lc$//'` -link -dll
cl "-nologo" "-Fe.libs/libixml-11.dll" "src/.libs/attr.obj" "src/.libs/document.obj" "src/.libs/element.obj" "src/.libs/ixml.obj" "src/.libs/ixmldebug.obj" "src/.libs/ixmlparser.obj" "src/.libs/ixmlmembuf.obj" "src/.libs/namedNodeMap.obj" "src/.libs/node.obj" "src/.libs/nodeList.obj" "-Zi" "ink.lib" "-dll"
LINK : fatal error LNK1104: cannot open file 'ink.lib'
I believe the arguments -link -dll
originate from here:
https://github.com/autotools-mirror/libtool/blob/544fc0e2c2a03129a540aebef41ad32bfb5c06b8/m4/libtool.m4#L5627-L5642
libtool should be passing /link
not -link
as it is adding options for cl not cc. However, I suspect under msys the options only work when being passed as -
not /
, so I'll make a change for cccl to handle -link' the same as it does
/link'. It does mean that it will not be possible to convert -link
into linking with the ink.lib. Unfortunate tradeoff.
Closed by 9634702
Before this case: https://github.com/swig/cccl/blob/ac88ffd2bfe3bfced62d36359e70d19d1445c655/cccl#L129
must be a case which handles the
-link
option case.