too long lines were shrinked: clang -DHAVE_CONFIG_H -I. -I.. -I../term -I../term -DBINDIR=\"/usr/bin\" -DX11_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DQT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DGNUPLOT_SHARE_DIR=\"/usr/share/gnuplot/6.0\" -DGNUPLOT_PS_DIR=\"/usr/share/gnuplot/6.0/PostScript\" -DGNUPLOT_JS_DIR=\"/usr/share/gnu clang -DHAVE_CONFIG_H -I. -I.. -I../term -I../term -DBINDIR=\"/usr/bin\" -DX11_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DQT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DGNUPLOT_SHARE_DIR=\"/usr/share/gnuplot/6.0\" -DGNUPLOT_PS_DIR=\"/usr/share/gnuplot/6.0/PostScript\" -DGNUPLOT_JS_DIR=\"/usr/share/gnu In file included from axis.c:33: In file included from ./axis.h:40: In file included from ./gadgets.h:38: In file included from ./term_api.h:39: ./stdfn.h:63:8: error: conflicting types for 'memcpy' 63 | char * memcpy(char *, char *, size_t); | ^ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_llvm_systemd-20240823-074159 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 18.1.8+libcxx Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/18/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/18 18.1.8+libcxx Python 3.12.5 Available Rust versions: [1] rust-bin-1.80.1 * The Glorious Glasgow Haskell Compilation System, version 9.0.2 php cli (if any): go version go1.23.0 linux/amd64 HEAD of ::gentoo commit 5fcec5478f309c05dea2bb61dbc945f44c3188e3 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Aug 24 19:33:59 2024 +0000 2024-08-24 19:33:59 UTC emerge -qpvO =sci-visualization/gnuplot-6.0.1 [ebuild N ] sci-visualization/gnuplot-6.0.1 USE="X examples gd libcerf metafont metapost readline regis -amos (-aqua) -bitmap -cairo -doc -gpic -latex -libcaca -lua -qt5 -tgif -wxwidgets" LUA_SINGLE_TARGET="lua5-1 -lua5-3 -lua5-4"
Created attachment 901169 [details] emerge-info.txt
Created attachment 901170 [details] emerge-history.txt
Created attachment 901171 [details] environment
Created attachment 901172 [details] etc.clang.tar.xz
Created attachment 901173 [details] etc.portage.tar.xz
Created attachment 901174 [details] logs.tar.xz
Created attachment 901175 [details] qlist-info.txt
Created attachment 901176 [details] sci-visualization:gnuplot-6.0.1:20240824-200207.log
Created attachment 901177 [details] temp.tar.xz
Created attachment 901178 [details] var.tmp.clang.tar.xz
(In reply to Toralf Förster from comment #8) > Created attachment 901176 [details] > sci-visualization:gnuplot-6.0.1:20240824-200207.log Something went very wrong earlier, during configure: checking for atexit... no checking for memcpy... no checking for memmove... no checking for memset... no [... about 40 other functions not found ...] AFAICS these are checked with a vanilla AC_CHECK_FUNCS in configure.ac. Then there is this in config.log (line 3704 and following): configure:11444: checking for atexit configure:11444: clang -o conftest -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L/usr/lib -lcerf conftest.c >&5 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crti.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/18/bin/../../../../lib/clang/18/lib/linux/clang_rt.crtbegin-x86_64.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/libcerf.so is incompatible with elf32-i386 ld.lld: error: /var/tmp/portage/sci-visualization/gnuplot-6.0.1/temp/conftest-e06c33.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/18/bin/../../../../lib/clang/18/lib/linux/libclang_rt.builtins-x86_64.a(absvdi2.c.o) is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/18/bin/../../../../lib/clang/18/lib/linux/libclang_rt.builtins-x86_64.a(absvsi2.c.o) is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/18/bin/../../../../lib/clang/18/lib/linux/libclang_rt.builtins-x86_64.a(absvti2.c.o) is incompatible with elf32-i386 Not sure what is happening there. Looks like it's trying to link 32 bit with 64 bit binaries? I cannot reproduce the problem (with clang/llvm and the exact same set of USE flags).
This seems suspicious: $ pkg-config --libs libcerf -L/usr/lib -lcerf Does the package build for you with USE="-libcerf"?
You need to use lld (-fuse-ld=lld). lld rejects objects of the wrong type, while bfd just warns about it. I do have a patch locally to make bfd error out on it if you want it.
(In reply to Sam James from comment #13) > You need to use lld (-fuse-ld=lld). Thanks, I can reproduce the problem now. (I had LD="ld.lld" but apparently it wasn't enough.) Tweaking libcerf.pc for the correct libdir fixes the problem: --- /usr/lib64/pkgconfig/libcerf.pc~ 2024-08-26 23:45:30.000000000 +0200 +++ /usr/lib64/pkgconfig/libcerf.pc 2024-08-26 23:52:16.300509288 +0200 @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=${prefix}/lib64 includedir=${prefix}/include Name: libcerf
The problem is with sci-libs/libcerf, therefore reassigning to sci. Patch is available upstream: https://jugit.fz-juelich.de/mlz/libcerf/-/commit/db4497bdf63fb14973169e7e661be2477c174cdb