32bit libstdc++ after installing

Issues related to applications and software problems
Post Reply
AndorJohn
Posts: 2
Joined: 2017/11/23 15:53:05

32bit libstdc++ after installing

Post by AndorJohn » 2017/11/23 16:02:36

I have been trying to build a 32 bit application on a 64 bit Cent OS 7 machine using devtoolset-3 however it says there's no compatible stdc++ library.

I have looked in this folder which should contain the 32 bit libs (below)

/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/

and the file I need libstdc++.a links to a missing file (below)

broken symbolic link to `../../../i686-redhat-linux/4.8.5/libstdc++.a'

I am missing the entire i686-redhat-linux directory. I have tested on other cent os 7 machines and this is the same.

I also tried install devtoolset-6 but this was missing the files too.

I'm begging to wonder this is feasible with cent os 7 although I think the files do exist for cent os 6. I tried installing the cent os 6 package by doing (below)

sudo yum install https://buildlogs.centos.org/centos/6/s ... x86_64.rpm

However it complained about dependencies and I have now been told mixing the .el6 and .el7 is a bad idea.

I am relatively new to linux and I think I have tried everything I know so can anyone help?

Is there maybe some way I can download the source code and build and use that.

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: 32bit libstdc++ after installing

Post by chemal » 2017/11/23 16:39:53

Only the system compiler (gcc 4.8.5) is capable of producing 32-bit binaries after you have installed libstdc++-devel.i686 from the base repository.

Devtoolset compilers cannot produce 32-bit binaries, because RH doesn't ship devtoolset-x-libstdc++-devel.i686 packages.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 32bit libstdc++ after installing

Post by TrevorH » 2017/11/23 16:51:07

Take the file you're interested in finding and use the `yum provides` command for it to find which packages contain it. For yours yum provides '*/libstdc++.a' lists several and since you're interested in 32 bit you'll want a package that is i686, libstdc++-static.i686 f.e.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

AndorJohn
Posts: 2
Joined: 2017/11/23 15:53:05

Re: 32bit libstdc++ after installing

Post by AndorJohn » 2017/11/24 09:45:09

The problem is after I do a whatprovides that all the x86x64 packages only contain libraries for 64 bit. The links in the 32 bit folders are broken.

From what I have discovered I think chemal is right.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 32bit libstdc++ after installing

Post by TrevorH » 2017/11/24 10:29:53

You sure?

"libstdc++-static-4.8.5-16.el7.i686 : Static libraries for the GNU standard C++ library" - this one looks to me like it supplies the files you say you're missing.

You're not using devtoolset packages though? The system gcc on CentOS 7 is 4.8.5.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply