30
rated 0 times
[
30]
[
0]
/ answers: 1 / hits: 33358
/ 3 Years ago, wed, june 23, 2021, 8:30:23
Trying to compile even the simplest (int main(){}
) program with -m32
on a 64-bit system fails:
$ gcc -m32 test.c
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
It seems to be still erroneously searching in the wrong directories when -m32
is specified.
libgcc-4.8-dev:i386
is installed and I've verified that the 32-bit libraries are located in /usr/lib/gcc/i686-linux-gnu/4.8/
.
I've tried setting and exporting LD_INCLUDE_PATH
and LD_LIBRARY_PATH
to no avail.
More From » 14.04