StrawberryPerl / build-extlibs

16 stars 11 forks source link

libunistring failures with gcc-13 #43

Closed shawnlaffan closed 1 year ago

shawnlaffan commented 1 year ago

Error logs below. Looks like it is not linking to the correct threads?

Presumably this should be a configure argument.

FWIW, the build script does not have libunistring special cased so it uses the generic build: https://github.com/StrawberryPerl/build-extlibs/blob/eb611d53149a115e0f04a40e266fcecd3d013ca4/build.sh#L1688-L1698

Version 0.9.10:

libtool: link: x86_64-w64-mingw32-gcc -shared .libs\\libunistring.la.lnkscript  -L/z/extlib/_bgcc13__/lib -liconv  -O2 -
mms-bitfields -Wl,--export-all-symbols -Wl,--disable-auto-import   -o .libs/libunistring-2__.dll -Wl,--enable-auto-image
-base -Xlinker --out-implib -Xlinker .libs/libunistring.dll.a
C:/spbuild/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs\\localename
.o:localename.c:(.rdata$.refptr.pthread_mutexattr_gettype[.refptr.pthread_mutexattr_gettype]+0x0): undefined reference t
o `pthread_mutexattr_gettype'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [Makefile:4215: libunistring.la] Error 1
make[3]: Leaving directory '/z/extlib/_bgcc13__.src/libunistring-0.9.10/lib'
make[2]: *** [Makefile:3581: all] Error 2
make[2]: Leaving directory '/z/extlib/_bgcc13__.src/libunistring-0.9.10/lib'
make[1]: *** [Makefile:1559: all-recursive] Error 1
make[1]: Leaving directory '/z/extlib/_bgcc13__.src/libunistring-0.9.10'
make: *** [Makefile:1487: all] Error 2

Version 1.1:

libtool: link: rm -fr  .libs/libunistring.dll.a .libs/libunistring.la.lnkscript
libtool: link: x86_64-w64-mingw32-gcc -shared .libs\\libunistring.la.lnkscript  -L/z/extlib/_bgcc13__/lib -liconv  -O2 -
mms-bitfields -Wl,--export-all-symbols   -o .libs/libunistring-5__.dll -Wl,--enable-auto-image-base -Xlinker --out-impli
b -Xlinker .libs/libunistring.dll.a
C:/spbuild/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs\\libunistri
ng_la-localename.o:localename.c:(.rdata$.refptr.pthread_mutexattr_gettype[.refptr.pthread_mutexattr_gettype]+0x0): undef
ined reference to `pthread_mutexattr_gettype'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:5285: libunistring.la] Error 1
make[2]: Leaving directory '/z/extlib/_bgcc13__.src/libunistring-1.1/lib'
make[1]: *** [Makefile:7273: install] Error 2
make[1]: Leaving directory '/z/extlib/_bgcc13__.src/libunistring-1.1/lib'
make: *** [Makefile:2018: install-recursive] Error 1
shawnlaffan commented 1 year ago

MSYS2 has the solution again.
https://github.com/msys2/MINGW-packages/blob/f5f9b56586171daf40af49d51544ccd10a8de665/mingw-w64-libunistring/PKGBUILD#LL46C5-L46C29