mbs...@gmail.com writes:
> I'm not a C user and I'm struggling with a seemingly simple problem.
> I'm trying to compile a C program (smm.c) which comes inside i8kutils
> fan-control package for a Dell laptop. The packages g++ libc-dev
> libc6-dev-i386 build-essential are already at their newest version.
I guess from the above that you’re using Debian, Ubuntu or some variant.
> I have a feeling this might be a 32bit/64bit compatibility issue. This
> is the error that I'm getting:
>
> $ gcc -g -O2 -Wall -I. -o smm -m32 smm.c
Why -m32?
> /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
>
> Is there anything else I can try ? Thanks.
1. Don’t do 32-bit builds on 64-bit systems unless you actually have a
good reason.
2. If you do have a good reason, install the relevant
gcc-<version>-multilib package.
--
http://www.greenend.org.uk/rjk/