Summary: | sys-libs/ncurses-6.3_p20221203 broken compilation with clang | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Polozov <Apolozov> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 899582 | ||
Bug Blocks: | |||
Attachments: |
config.log
build.log emerge --info /etc/portage/package.env /etc/portage/env/compiler-clang-lto emerge --info build.log config.log |
Description
Alexander Polozov
2022-12-18 10:34:57 UTC
Please attach the full build.log, emerge --info, and /var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/cross/config.log. Created attachment 843389 [details]
config.log
Created attachment 843391 [details]
build.log
This doesn't appear to be ncurses' fault: ``` configure:1914: checking for C compiler default output configure:1917: clang -O2 -march=native -flto=thin -fdiagnostics-color=always -D_GNU_SOURCE -fuse-ld=lld -rtlib=compiler-rt -Wl,-O2 -Wl,--as-needed -static conftest.c >&5 ld.lld: error: undefined symbol: __unordtf2 >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced 1 more times ld.lld: error: undefined symbol: __letf2 >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a clang-15: [0;1;31merror: [0m[1mlinker command failed with exit code 1 (use -v to see invocation)[0m configure:1920: $? = 1 configure: failed program was: #line 1898 "configure" #include "confdefs.h" int main (void) { ; return 0; } configure:1943: error: C compiler cannot create executables ``` If you try to build a small C file at /tmp/foo.c with: ``` int main (void) { ; return 0; } ``` and clang -O2 -march=native -flto=thin -fdiagnostics-color=always -D_GNU_SOURCE -fuse-ld=lld -rtlib=compiler-rt -Wl,-O2 -Wl,--as-needed -static /tmp/foo.c -o /tmp/foo Does it build? Created attachment 843393 [details]
emerge --info
Strange thing, after updating (installing) with gcc rebuilding with clang was without errors. Created attachment 843395 [details]
/etc/portage/package.env
Created attachment 843397 [details]
/etc/portage/env/compiler-clang-lto
> If you try to build a small C file at /tmp/foo.c with: > ``` > int > main (void) > { > > ; > return 0; > } > ``` > > and > clang -O2 -march=native -flto=thin -fdiagnostics-color=always -D_GNU_SOURCE > -fuse-ld=lld -rtlib=compiler-rt -Wl,-O2 -Wl,--as-needed -static /tmp/foo.c > -o /tmp/foo > > Does it build? pan@pan-homlin /tmp $ clang -O2 -march=native -flto=thin -fdiagnostics-color=always -D_GNU_SOURCE -fuse-ld=lld -rtlib=compiler-rt -Wl,-O2 -Wl,--as-needed -static /tmp/foo.c -o /tmp/foo ld.lld: error: undefined symbol: __unordtf2 >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced 1 more times ld.lld: error: undefined symbol: __letf2 >>> referenced by printf_fphex.o:(__printf_fphex) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a >>> referenced by printf_fp.o:(__printf_fp_l) in archive /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../lib64/libc.a clang-15: error: linker command failed with exit code 1 (use -v to see invocation) I have the same problem:
>>> Configuring source in /var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/ncurses-6.3 ...
* econf: updating ncurses-6.3/config.guess with /usr/share/gnuconfig/config.guess
* econf: updating ncurses-6.3/config.sub with /usr/share/gnuconfig/config.sub
/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/ncurses-6.3/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --enable-pc-files --with-pkg-config-libdir=/usr/lib64/pkgconfig --with-shared --without-hashed-db --without-ada --with-cxx --with-cxx-binding --with-cxx-shared --without-debug --without-profile --without-gpm --disable-term-driver --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-hard-tabs --enable-echo --enable-warnings --without-assertions --enable-leaks --without-expanded --with-macros --with-progs --without-tests --without-trace --with-termlib --disable-stripping --disable-pkg-ldflags --disable-widec --without-pthread --without-reentrant --includedir=/usr/include/cross --without-shared --with-normal --with-progs
checking for ggrep... no
checking for grep... grep
checking for egrep... grep -E
Configuring NCURSES 6.3 ABI 6 (Tue Dec 20 03:39:05 CET 2022)
checking for package version... 6.3
checking for package patch date... 20221203
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
Configuring for linux-gnu
checking for fgrep... grep -F
checking for prefix... /usr
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/cross/config.log
* ERROR: sys-libs/ncurses-6.3_p20221203::local failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 136: Called src_configure
* environment, line 2193: Called do_configure 'cross' '--without-shared' '--with-normal' '--with-progs'
* environment, line 671: Called econf '--with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo' '--enable-pc-files' '--with-pkg-config-libdir=/usr/lib64/pkgconfig' '--with-shared' '--without-hashed-db' '--without-ada' '--with-cxx' '--with-cxx-binding' '--with-cxx-shared' '--without-debug' '--without-profile' '--without-gpm' '--disable-term-driver' '--disable-termcap' '--enable-symlinks' '--with-rcs-ids' '--with-manpage-format=normal' '--enable-const' '--enable-colorfgbg' '--enable-hard-tabs' '--enable-echo' '--enable-warnings' '--without-assertions' '--enable-leaks' '--without-expanded' '--with-macros' '--with-progs' '--without-tests' '--without-trace' '--with-termlib' '--disable-stripping' '--disable-pkg-ldflags' '--disable-widec' '--without-pthread' '--without-reentrant' '--includedir=/usr/include/cross' '--without-shared' '--with-normal' '--with-progs'
* phase-helpers.sh, line 730: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 112: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=sys-libs/ncurses-6.3_p20221203::local'`,
* the complete build log and the output of `emerge -pqv '=sys-libs/ncurses-6.3_p20221203::local'`.
* The complete build log is located at '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/temp/environment'.
* Working directory: '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/cross'
* S: '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/ncurses-6.3'
Created attachment 843907 [details]
emerge --info
Created attachment 843909 [details]
build.log
So there is also broken compilation with gcc, I didn't use clang - it isn't installed. Created attachment 843911 [details]
config.log
While using: ebuild ... prepare then cd to work/ calling: configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --enable-pc-files --with-pkg-config-libdir=/usr/lib64/pkgconfig --with-shared --without-hashed-db --without-ada --with-cxx --with-cxx-binding --with-cxx-shared --without-debug --without-profile --without-gpm --disable-term-driver --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-hard-tabs --enable-echo --enable-warnings --without-assertions --enable-leaks --without-expanded --with-macros --with-progs --without-tests --without-trace --with-termlib --disable-stripping --disable-pkg-ldflags --disable-widec --without-pthread --without-reentrant --includedir=/usr/include/cross --without-shared --with-normal --with-progs 587 ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --enable-pc-files --with-pkg-config-libdir=/usr/lib64/pkgconfig --with-shared --without-hashed-db --without-ada --with-cxx --with-cxx-binding --with-cxx-shared --without-debug --without-profile --without-gpm --disable-term-driver --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-hard-tabs --enable-echo --enable-warnings --without-assertions --enable-leaks --without-expanded --with-macros --with-progs --without-tests --without-trace --with-termlib --disable-stripping --disable-pkg-ldflags --disable-widec --without-pthread --without-reentrant --includedir=/usr/include/cross --without-shared --with-normal --with-progs directly, it's working: ** Configuration summary for NCURSES 6.3 20220924: extended funcs: yes xterm terminfo: xterm-new bin directory: /usr/bin lib directory: /usr/lib64 include directory: /usr/include/cross man directory: /usr/share/man terminfo directory: /usr/share/terminfo pkg-config directory: /usr/lib64/pkgconfig ** Include-directory is not in a standard location Yes, I used 20220924, since this is the first version which does not build. This seems a portage bug though. (In reply to cilly from comment #13) > So there is also broken compilation with gcc, I didn't use clang - it isn't > installed. Your problem is different, it's segfaulting. I think you and I looked into that in another bug. |