[cooker] bash build fails

Bash build fails https://abf.openmandriva.org/build_lists/613164 due to lld
?

configure:5273: checking version of installed readline library
configure:5327: /usr/bin/clang -o conftest -Os -fomit-frame-pointer
-gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4
-m64 -mtune=generic -flto -Oz --rtlib=compiler-rt -I/usr/include -Os
-fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong
--param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Oz
--rtlib=compiler-rt -Wl,-O2 -Wl,--no-undefined -flto -L/usr/lib
conftest.c -lreadline -lcurses >&5
conftest.c:55:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
main()
^
conftest.c:60:3: warning: implicitly declaring library function 'exit' with
type 'void (int) __attribute__((noreturn))'
[-Wimplicit-function-declaration]
                exit(1);
                ^
conftest.c:60:3: note: include the header <stdlib.h> or explicitly provide
a declaration for 'exit'
2 warnings generated.
ld: error:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/9.2.1/../../../../lib64/crt1.o
is incompatible with elf_x86_64
ld: error:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/9.2.1/../../../../lib64/crti.o
is incompatible with elf_x86_64
ld: error: /usr/lib64/clang/9.0.0/lib/linux/clang_rt.crtbegin-x86_64.o is
incompatible with elf_x86_64
ld: error: /tmp/conftest-a37ad6.o is incompatible with elf_x86_64
ld: error:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/9.2.1/../../../../lib64/libreadline.so
is incompatible with elf_x86_64
ld: error:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/9.2.1/../../../../lib64/libcurses.so
is incompatible with elf_x86_64
ld: error: /usr/lib64/clang/9.0.0/lib/linux/clang_rt.crtend-x86_64.o is
incompatible with elf_x86_64
ld: error:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/9.2.1/../../../../lib64/crtn.o
is incompatible with elf_x86_64
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
configure:5327: $? = 1
configure: program exited with status 1
configure: failed program was:

Bash build fails https://abf.openmandriva.org/build_lists/613164 due to lld

lld tends to expose bugs that have been around unnoticed for decades.

Note the -L/usr/lib in the compiler invocation:

configure:5327: /usr/bin/clang -o conftest -Os -fomit-frame-pointer
-gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4
-m64 -mtune=generic -flto -Oz --rtlib=compiler-rt -I/usr/include -Os
-fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong
--param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Oz
--rtlib=compiler-rt -Wl,-O2 -Wl,--no-undefined -flto -L/usr/lib
conftest.c -lreadline -lcurses >&5

lld freaks out because that makes it see the 32-bit version of crt*.o files.

FWIW -I/usr/include [also there...] is also a really stupid thing to put into compiler flags, but so far nothing is barfing because of that. Worth fixing at the same time...

ttyl
bero

Indeed I did not noticed that. Thanks for fixing this autofoo madness.

napisał: