Simple cross build fails out of the box on Fedora
Rot127
rot127@posteo.com
Wed Mar 11 19:51:19 GMT 2026
I try to build binutils on Fedora but configure fails already to compile
the test program.
I cannot for the sake of it see what the problem is according to the
`configure --help` docs.
Reproducible with:
```
./configure \
--host=s390x-linux-gnu \
--target=s390x-linux-gnu \
--with-build-sysroot=/usr/s390x-redhat-linux/sys-root/fc42/usr
```
Build error:
```
gcc version 15.2.1 20250808 (Red Hat Cross 15.2.1-1) (GCC)
configure:4654: $? = 0
configure:4643: s390x-linux-gnu-gcc -V >&5
s390x-linux-gnu-gcc: error: unrecognized command-line option '-V'
s390x-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4654: $? = 1
configure:4643: s390x-linux-gnu-gcc -qversion >&5
s390x-linux-gnu-gcc: error: unrecognized command-line option
'-qversion'; did you mean '--version'?
s390x-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4654: $? = 1
configure:4674: checking whether the C compiler works
configure:4696: s390x-linux-gnu-gcc conftest.c >&5
/usr/bin/s390x-linux-gnu-ld: cannot find crt1.o: No such file or directory
/usr/bin/s390x-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/s390x-linux-gnu-ld: cannot find -lc: No such file or directory
/usr/bin/s390x-linux-gnu-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:4700: $? = 1
configure:4738: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4743: error: in
`/home/user/repos/rz-framework-cmp/data/binutils-2.46.0':
configure:4745: error: C compiler cannot create executables
See `config.log' for more details
```
All the libraries and bins live happily at their place:
```
> ll /usr/bin/s390x-linux-gnu-gcc
-rwxr-xr-x. 1 root root 1.9M Aug 13 2025 /usr/bin/s390x-linux-gnu-gcc
> ll /usr/s390x-redhat-linux/sys-root/fc42/usr/lib64/crt*
-rw-r--r--. 1 root root 2.8K Jan 23 01:00
/usr/s390x-redhat-linux/sys-root/fc42/usr/lib64/crt1.o
-rw-r--r--. 1 root root 1.7K Jan 23 01:00
/usr/s390x-redhat-linux/sys-root/fc42/usr/lib64/crti.o
-rw-r--r--. 1 root root 1.3K Jan 23 01:00
/usr/s390x-redhat-linux/sys-root/fc42/usr/lib64/crtn.o
```
Would really appreciate any help.
More information about the Binutils
mailing list