ELFCLASS32 incompatible with ELFCLASS64
I've just recently been tasked with building i686 rpm's on a x86_64 CentOS 7 machine, and have run into an issue with one of the projects:
/bin/ld: form_x.xi.o: file class ELFCLASS32 incompatible with ELFCLASS64
/bin/ld: final link failed: File in wrong format
Correct me if I am wrong, but it appears that the linker is trying to link 32 bit object files with a 64 bit toolchain? I have the correct gcc libs for i686 installed and have passed the -m32 as a cflag and a ldflag when executing the configuration file like so:
./configure --build=i686-redhat-linux CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" --prefix=/usr/local/aubit4gl --with-pg-all="/usr/local/pgsql/" --disable-prefix-check
My thought is that this is not the correct place to pass the LDFLAG...yes? Am I even on the right train of thought?