Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attempting to compile a 32 bit application on CentOS results in error

So I have installed devtools, but I am guessing that my libstdc++ library is not the correct version or is not 32 bit? I get this error when attempting to compile. How do I fix this?

/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: skipping incompatible /opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++_nonshared.a when searching for -lstdc++_nonshared
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: cannot find -lstdc++_nonshared
like image 382
Zinglish Avatar asked Dec 19 '25 19:12

Zinglish


1 Answers

I have a similar issues and have tired with devtoolset 1, 1.1 and 2, all with the same result. Looking into this further I see in the directory:

/opt/centos/devtoolset-1.0/root/usr/lib/gcc/x86_64-CentOS-linux/4.7.0

There is a "32" directory and in here there are some library file and links to another directory that indicate "i386":

libitm.a -> ../../../i386-CentOS-linux/4.7.0/libitm.a
libitm.so
libquadmath.a -> ../../../i386-CentOS-linux/4.7.0/libquadmath.a
libquadmath.so
libstdc++.a -> ../../../i386-CentOS-linux/4.7.0/libstdc++.a
libstdc++_nonshared.a -> ../../../i386-CentOS-linux/4.7.0/libstdc++_nonshared.a
libstdc++.so
libsupc++.a

This "i386" directory is not installed using yum using a command like:

yum install devtoolset-2

on a x64 CentOS machine.

So as Zinglish above asks, how can the 32 bit libraries be installed on a 64 bit OS with yum? I'm using http://people.centos.org/tru/devtools-2 for the RPM source.

like image 139
AlexO Avatar answered Dec 21 '25 09:12

AlexO