MINGW-packages: libxmlsec1 static linking error
I have a couple of programs which link statically to libxml2. The first works fine. The second also uses libxmlsec1 but fails to link because it seems that libxmlsec1.a and libxmlsec1-openssl.a have been linked dynamically against libxml2.
Is this is a similar issue to: https://github.com/Alexpux/MINGW-packages/issues/3538#issuecomment-408016158? (where I temporarily fixed that by rebuilding using --without-nghttp2).
...
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x21f2): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x2259): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x2308): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x2398): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x2466): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1-openssl.a(libxmlsec1_openssl_la-x509.o):(.text+0x250f): more undefined references to `_imp__xmlFree' follow
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(base64.o):(.text+0x4f5): undefined reference to `_imp__xmlMalloc'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(base64.o):(.text+0x17dd): undefined reference to `_imp__xmlMalloc'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(base64.o):(.text+0x1885): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(base64.o):(.text+0x195d): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x1ae): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x235): undefined reference to `_imp__xmlFree'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x3fa): undefined reference to `_imp__xmlRealloc'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x441): undefined reference to `_imp__xmlMalloc'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x565): undefined reference to `_imp__xmlMalloc'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../lib\libxmlsec1.a(buffer.o):(.text+0x10ec): undefined reference to `_imp__xmlFree'
...
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (5 by maintainers)
Thanks for the hint. For testing, the new packages can be found here https://github.com/msys2/MINGW-packages/actions/runs/3645325714