Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error x86_64-linux-gnu #2090

Open
iGwkang opened this issue Jan 22, 2024 · 9 comments
Open

build error x86_64-linux-gnu #2090

iGwkang opened this issue Jan 22, 2024 · 9 comments

Comments

@iGwkang
Copy link

iGwkang commented Jan 22, 2024

  • crosstool-NG version 1.26.0
  • host OS : Ubuntu 22.04 , gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
  • .config with build.log ct-ng.zip

[ALL ] /home/gwkang/code/crosstool-ng/prefix/bin/build/x86_64-ffbuild-linux-gnu/buildtools/lib/gcc/x86_64-ffbuild-linux-gnu/6.5.0/../../../../x86_64-ffbuild-linux-gnu/bin/ld: cannot find -lgcc_eh
[ERROR] collect2: error: ld returned 1 exit status
[ERROR] make[3]: *** [../Rules:140: /home/gwkang/code/crosstool-ng/prefix/bin/build/x86_64-ffbuild-linux-gnu/build/build-libc/multilib/iconv/iconvconfig] Error 1
[ERROR] make[3]: *** Waiting for unfinished jobs....
[ALL ] /home/gwkang/code/crosstool-ng/prefix/bin/build/x86_64-ffbuild-linux-gnu/buildtools/lib/gcc/x86_64-ffbuild-linux-gnu/6.5.0/../../../../x86_64-ffbuild-linux-gnu/bin/ld: cannot find -lgcc_eh
[ERROR] collect2: error: ld returned 1 exit status
[ERROR] make[3]: *** [../Rules:140: /home/gwkang/code/crosstool-ng/prefix/bin/build/x86_64-ffbuild-linux-gnu/build/build-libc/multilib/iconv/iconv_prog] Error 1
[ALL ] make[3]: Leaving directory '/home/gwkang/code/crosstool-ng/prefix/bin/build/src/glibc-2.17/iconv'
[ERROR] make[2]: *** [Makefile:233: iconv/others] Error 2
[ALL ] make[2]: Leaving directory '/home/gwkang/code/crosstool-ng/prefix/bin/build/src/glibc-2.17'
[ERROR] make[1]: *** [Makefile:9: all] Error 2
[ALL ] make[1]: Leaving directory '/home/gwkang/code/crosstool-ng/prefix/bin/build/x86_64-ffbuild-linux-gnu/build/build-libc/multilib'
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Building for multilib 1/1: '''
[ERROR] >> called in step 'Installing C library'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@377]
[ERROR] >> called from: glibc_backend_once[scripts/build/libc/glibc.sh@268]
[ERROR] >> called from: CT_IterateMultilibs[scripts/functions@1608]
[ERROR] >> called from: glibc_main[scripts/build/libc/glibc.sh@26]
[ERROR] >> called from: do_libc_main[scripts/build/libc.sh@33]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@697]
[ERROR] >>
[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: 4:01.82)
gmake: *** [ct-ng:261: build] Error 2

@QBos07
Copy link
Contributor

QBos07 commented Jan 23, 2024

Possibly similar to rust-lang/rust#76984

libgcc_eh is the exeption handling library by gcc

@iGwkang
Copy link
Author

iGwkang commented Jan 24, 2024

Possibly similar to rust-lang/rust#76984

libgcc_eh is the exeption handling library by gcc

It may not be the same as this question. I am using gnu gcc, not TDM-GCC and MinGW. You can take a look at the .config file I uploaded. And when I use gcc 7.5.0, this error will be reported, but gcc 13.2.0 will not report an error.

@QBos07
Copy link
Contributor

QBos07 commented Jan 24, 2024

TDM-GCC and MinGW both use gcc. gcc in itself sands for gnu compiler collection or gnu c compiler.

@iGwkang
Copy link
Author

iGwkang commented Jan 25, 2024

So is there a solution to this?

@cpackham
Copy link
Contributor

The best solution would be to use a newer version of GCC.

@iGwkang
Copy link
Author

iGwkang commented Feb 20, 2024

The best solution would be to use a newer version of GCC.

However, other dependencies in my project are compiled using gcc7. If compiled with a newer version of gcc, it will not be compatible with the previous library. Recompiling all dependencies is very labor intensive.

@QBos07
Copy link
Contributor

QBos07 commented Feb 20, 2024

AFAIK the only library (libgcc) that comes with gcc is staticly linked and abi compatible to never versions.
There shoudn't be a problem with using a newer compiler. Have you tried it?

@iGwkang
Copy link
Author

iGwkang commented Feb 20, 2024

AFAIK the only library (libgcc) that comes with gcc is staticly linked and abi compatible to never versions. There shoudn't be a problem with using a newer compiler. Have you tried it?

I've experimented with compiling using GCC 13. In my project, I'm using static libraries. When attempting to compile with a higher version of GCC, I encounter LTO (Link Time Optimization) linking errors. Even when disabling LTO optimization, other errors persist. Therefore, it's crucial to maintain consistency in the GCC version throughout the project.

@QBos07
Copy link
Contributor

QBos07 commented Feb 23, 2024

IMO recompiling everything using gcc 13 is more future proof. I know something like this can take a while but it schoudn't be more than 3-2 days. Build servers can minimize the downtime of not compiling in the night or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants