crosstool-ng / crosstool-ng

A versatile (cross-)toolchain generator.
Other
2.13k stars 665 forks source link

crosstool-ng-1.24.0 build fails on cygwin for armv8-rpi3-linux-gnueabihf #1654

Open visansi opened 2 years ago

visansi commented 2 years ago

ctosstool-ng-1.24.0 build fails on cygwin for armv8-rpi3-linux-gnueabihf consistently at the libc_start_files step with a flurry of

[ERROR] /usr/include/sys/features.h:322:5: error: "_FORTIFY_SOURCE" is not defined, evaluates to 0 [-Werror=undef] followed by

[EXTRA]      Installing C library start files
[ERROR]      ../include/link.h:43:57: error: unknown type name 'Lmid_t'; did you mean 'pid_t'?
[ERROR]      ../sysdeps/posix/dl-fileid.h:27:5: error: unknown type name 'ino64_t'
[ERROR]      ../sysdeps/posix/dl-fileid.h:35:17: error: storage size of 'st' isn't known
[ERROR]      ../sysdeps/posix/dl-fileid.h:37:37: error: '_STAT_VER' undeclared (first use in this function)
[ERROR]      /usr/include/cygwin/core_dump.h:19:10: fatal error: windows.h: No such file or directory
[ERROR]      /usr/include/cygwin/core_dump.h:19:10: fatal error: windows.h: No such file or directory
[ERROR]      make[3]: *** [../Makerules:287: /cygdrive/c/repo/ctng124/bld/.build/arm-unknown-linux-gnueabihf/build/build-libc-startfiles/multilib/tlsdesc.h] Error 1
[ERROR]      make[3]: *** Waiting for unfinished jobs....
[ERROR]      make[3]: *** [../Makerules:287: /cygdrive/c/repo/ctng124/bld/.build/arm-unknown-linux-gnueabihf/build/build-libc-startfiles/multilib/tcb-offsets.h] Error 1
[ERROR]      /usr/include/cygwin/core_dump.h:19:10: fatal error: windows.h: No such file or directory
[ERROR]      make[3]: *** [../Makerules:287: /cygdrive/c/repo/ctng124/bld/.build/arm-unknown-linux-gnueabihf/build/build-libc-startfiles/multilib/rtld-global-offsets.h] Error 1
[ERROR]      make[2]: *** [Makefile:258: csu/subdir_lib] Error 2
[ERROR]      make[1]: *** [Makefile:9: csu/subdir_lib] Error 2
[ERROR]  /
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Building for multilib 1/1: '''
[ERROR]  >>        called in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@376]
[ERROR]  >>        called from: glibc_backend_once[scripts/build/libc/glibc.sh@374]
[ERROR]  >>        called from: CT_IterateMultilibs[scripts/functions@1586]
[ERROR]  >>        called from: glibc_backend[scripts/build/libc/glibc.sh@74]
[ERROR]  >>        called from: glibc_start_files[scripts/build/libc/glibc.sh@38]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc.sh@28]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@696]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      https://crosstool-ng.github.io/docs/known-issues/
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]  /
[ERROR]  (elapsed: 130:50.55)
[131:02] / make: *** [ct-ng:261: build] Error 2

BUILD INFO BUILD changes tried expat-2.4.1 isl-0.24 linux-4.20.17.tar : based on crosstool-ng/issues/1540

The same exact files builds fine on Ubuntu 20.04 and generates armv8-rpi3-linux-gnueabihf compilers and toolchain

Posted the same issue here too : ctosstool-ng build fails on cygwin for armv8-rpi3-linux-gnueabihf

I am not able to tell whether this is a CYGWIN issue or glib/gcc patch issue.

[UPDATE ] I ran the baseline ctosstool-ng-1.24.0 fails with identical compile errors above -

In addition the issue reported in #1625 is still present in the baseline

[EXTRA]    Retrieving 'isl-0.20'
[ERROR]    isl: download failed

and

[EXTRA]    Retrieving 'expat-2.2.6'
[ERROR]    expat: download failed

so I had to manually download isl-0.20.tar.bz2 expat-2.2.6.tar.bz2 - after which the build failed exactly with same compile errors at the libc_start_files step as the reported build baseline-fail.zip

TommyMurphyTM1234 commented 2 years ago

so I had to manually download isl-0.20.tar.bz2 expat-2.2.6.tar.bz2

That specific issue seems to be the same as the one mentioned here:

https://github.com/crosstool-ng/crosstool-ng/issues/1625

visansi commented 2 years ago

@TommyMurphyTM1234 yep - looks like isl-0.20.tar.bz2 issue has been there since the release download site "http://isl.gforge.inria.fr/" in /packages/isl/package.desc is out of reach. replacing it with "https://libisl.sourceforge.io" should work -

but I just downloaded the isl-0.20.tar.bz2 expat-2.2.6.tar.bz2 tarballs and put it into .build/tarballs manually.