You are not logged in.
I cannot compile 32-bit binaries with gcc. I get the following errors:
$ gcc -m32 test.c
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.4.0/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
I know I used to be able to do this, but recently it stopped working. The following packages are installed:
lib32-gcc-libs 9.3.0-1
lib32-libltdl 2.4.6+42+gb88cebd5-1
lib32-glib2 2.64.1-1y
lib32-fakeroot 1.24-1
Obviously there are others installed but these are the ones that I've read need to be installed when researching this problem.
Thanks in advance
Offline
Why is it trying to load/find libraries for a 8.4 version of gcc?
type -a gcc
pacman -Qs gcc
printenv
Last edited by V1del (2020-03-29 09:39:03)
Offline
Well, now I feel dumb. I worked with Nvidia CUDA a long time ago and during some changes to my ~.profile config, I must have accidentally put the cuda/bin folder before /usr/bin and /bin, so it was using the wrong gcc. Removing that fixed the problem, thanks!
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline