Compiling gcc-7-20170212 on Windows 7-64 with cygwin, ==> wopen error

I get the following error when compiling gcc on Windows7-64 under cygwin.

./../zlib/libz.a(libz_a-gzlib.o):gzlib.c:(.text+0x646): undefined reference to `_wopen'
./../zlib/libz.a(libz_a-gzlib.o):gzlib.c:(.text+0x646): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_wopen'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/fortran/Make-lang.in:97: f951.exe] Error 1

What's happening?

This does not happen with gcc-6 or gcc-5.

Thank.

+4
source share
1 answer

This is not a problem with building gcc as much as with the zlib building, from which gcc includes a copy with the version.

You may not need to create a zlib with the manufacturer if a package is installed in your Cygwin zlib-devel. You may also need to configure some flags in gcc ./configure, but admittedly I haven't looked very carefully.

, zlib Cygwin : https://github.com/Alexpux/MSYS2-packages/raw/master/zlib/1.2.11-cygwin-no-widechar.patch
https://github.com/Alexpux/MSYS2-packages/blob/master/zlib/1.2.7-zlib-symbols.patch

( 1.2.11.) - gzopen_w Cygwin , Cygwin _wopen.

+2

Source: https://habr.com/ru/post/1671162/


All Articles