Jose Gomez via Gcc-help kirjoitti 20.6.2025 klo 0.04:
Do not use --host= . Or do not pass start, and do not collect €200.
I tried setting --build=x86_64-linux-gnu without setting --host= and
I get the same error
Jose, didn't you see my reply in gcc-help? Your :
> I tried again setting --host=x86_64-linux-gnu
--build=x86_64-linux-gnu --target=arm-linux-gnueabihf \
> --disable-multilib --with-sysroot=/usr/arm-linux-gnueabihf
--with-native-system-header-dir=/include \
> and I got the following output:
>
> /usr/bin/arm-linux-gnueabihf-ld: cannot find
/usr/arm-linux-gnueabihf/lib/libc.so.6 inside /usr/arm-linux-gnueabihf
> /usr/bin/arm-linux-gnueabihf-ld: cannot find
/usr/arm-linux-gnueabihf/lib/libc_nonshared.a inside
/usr/arm-linux-gnueabihf
> /usr/bin/arm-linux-gnueabihf-ld: cannot find
/usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 inside
/usr/arm-linux-gnueabihf
> collect2: error: ld returned 1 exit status
tells quite clearly what the problem is. I didn't tell it when this
output already told it!
So you haven't these files where your chosen build switch
'--with-sysroot=/usr/arm-linux-gnueabih' claims
them to be, in :
/usr/arm-linux-gnueabihf/usr/arm-linux-gnueabihf/lib
The '--with-sysroot=/usr/arm-linux-gnueabih' makes just this, puts an
"offset" before the usual 'native search places'.
So just leave the '--with-sysroot=/usr/arm-linux-gnueabih' away from
your build options!