|
From: ralph e. <ral...@gm...> - 2019-09-24 04:21:16
|
i686-w64-mingw32-gcc -pipe -Wl,--dynamicbase,--nxcompat -s -o python.exe \ Modules/python.o \ -L. -lpython2.7 -lm ./python.exe -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /bin/sh: linje 6: 22707 Segmentation fault CC='i686-w64-mingw32-gcc' LDSHARED='i686-w64-mingw32-gcc -shared -Wl,--enable-auto-image-base -pipe -Wl,--dynamicbase,--nxcompat -s ' OPT='-DNDEBUG ' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python.exe -E ../Python-2.7.16/setup.py $quiet build make: *** [Makefile:548: sharedmods] Error 139 this. Den 17-09-2019 kl. 06:31 skrev Liu Hao: > As GCC sets `-D_FORTIFY_SOURCE=2` (maybe it's MSYS2 or `makepkg` well I > don't really care about which one it is), those `__*_chk()` functions > are now required when building GCC and its libraries. Unfortunately, > mingw-w64 does not provide these (it relies libssp to provide them), so > the build now fails with undefined references. > > I tried adding `-fstack-protector` into `LDFLAGS` and adding `-lssp` > into `LIBS` when configuring GCC, but neither worked for me. The build > process errorred out when building either libiberty or libcpp. > > Tampering with GCC builtin specs may be a solution, but I am not sure > whether libtool likes that. It ignores default libraries and always > attempts to link against everything at its own disposal. > > I am not sure whether libssp is (rather, can be made) available when > building libiberty. Or this _FORTIFY_SOURCE thing should be disabled > when building GCC for mingw-w64. > > Any suggestions will be appreciated. > > > Build logs: > > ``` > libtool: link: > /e/GitHub/MINGW-packages/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/./prev-gcc/xgcc > -B/e/GitHub/MINGW-packages/mingw-w64-gcc-git/src/build-x86_64-w64-mingw32/./prev-gcc/ > -B/mingw64/x86_64-w64-mingw32/bin/ -L/mingw64/x86_64-w64-mingw32/lib > -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem > /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/ > -B/mingw64/x86_64-w64-mingw32/lib/ -isystem > /mingw64/x86_64-w64-mingw32/include -isystem > /mingw64/x86_64-w64-mingw32/sys-include -fno-checking -shared > .libs/lto-plugin.o -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib > -static-libgcc ../libiberty/libiberty.a -static-libstdc++ -static-libgcc > -Wl,--stack -Wl,12582912 -o .libs/liblto_plugin-0.dll > -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker > .libs/liblto_plugin.dll.a > C:\MinGW\MSYS2\mingw64\x86_64-w64-mingw32\bin\ld.exe: > ../libiberty/libiberty.a(simple-object-coff.o):simple-object-coff.c:(.text+0xb3a): > undefined reference to `__memcpy_chk' > C:\MinGW\MSYS2\mingw64\x86_64-w64-mingw32\bin\ld.exe: > ../libiberty/libiberty.a(simple-object-mach-o.o):simple-object-mach-o.c:(.text+0xc91): > undefined reference to `__strncpy_chk' > C:\MinGW\MSYS2\mingw64\x86_64-w64-mingw32\bin\ld.exe: > ../libiberty/libiberty.a(simple-object-xcoff.o):simple-object-xcoff.c:(.text+0x7b5): > undefined reference to `__memcpy_chk' > C:\MinGW\MSYS2\mingw64\x86_64-w64-mingw32\bin\ld.exe: > ../libiberty/libiberty.a(xstrerror.o):xstrerror.c:(.text+0x4a): > undefined reference to `__chk_fail' > > ``` > > > > > _______________________________________________ > Mingw-w64-public mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public |