32 bit stdlibc++ conflicts with 64bit

when I try to install libstdc++.i686 the transaction fails

sudo yum install libstdc++.i686
Transaction failed: Rpm transaction failed.
  - file /usr/share/gcc-14/python/libstdcxx/v6/__pycache__/printers.cpython-313.opt-1.pyc from install of libstdc++-14.1.1-6.fc41.i686 conflicts with file from package libstdc++-14.1.1-6.fc41.x86_64
  - file /usr/share/gcc-14/python/libstdcxx/v6/__pycache__/printers.cpython-313.pyc from install of libstdc++-14.1.1-6.fc41.i686 conflicts with file from package libstdc++-14.1.1-6.fc41.x86_64
  - file /usr/share/gcc-14/python/libstdcxx/v6/__pycache__/xmethods.cpython-313.opt-1.pyc from install of libstdc++-14.1.1-6.fc41.i686 conflicts with file from package libstdc++-14.1.1-6.fc41.x86_64
  - file /usr/share/gcc-14/python/libstdcxx/v6/__pycache__/xmethods.cpython-313.pyc from install of libstdc++-14.1.1-6.fc41.i686 conflicts with file from package libstdc++-14.1.1-6.fc41.x86_64

is this expected behavior?

uname -a
Linux ian-workstation 6.9.5-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jun 16 15:47:09 UTC 2024 x86_64 GNU/Linux

lsb_release -a
LSB Version:    n/a
Distributor ID: Fedora
Description:    Fedora Linux 41 (Xfce Prerelease)
Release:        41
Codename:       n/a

I’ve always expected that sort of thing to happen with a pre-release.

is it worth filing a bug report?

1 Like

Added fedora-rawhide

I solved this issue by the following method.

I downloaded the rpm file and force installed it. Found this solution in the following link:https://superuser.com/questions/1279873/how-to-install-libstdc-i686-on-redhat-rhel-7

sudo yum install --downloadonly --store=/var/tmp/ libstdc++.i686

sudo rpm -ivh --force --nodeps /var/tmp/packages/libstdc++-14.1.1-6.fc41.i686.rpm

Sorry for multiple edits, formatting and spelling errors.

Once the beta version is released it should be reported if nobody else has already done so.

1 Like

is there a risk in using replacefiles in this case?

anyway, it worked, thank you!

I’m not sure about the risks involved. I switched to linux recently and had to come to rawhide because my Arc A770 was not working in blender in kernel 6.8.x.

I was unable to update my system for past few days due to this conflict causing transaction errors. So I un-installed libstdc++.i686 to allow update to happen.

This however borked my steam install and that made me search for any solution that might work.

It looks like this problem might be showing up in Fedora Linux 40 now (which would be a more serious problem): Update breaked

Wouldn’t that fix it?

dnf updateinfo --info --all libstdc++
Last metadata expiration check: 3:44:31 ago on Sun 07 Jul 2024 17:01:08 CEST.
===============================================================================
  gcc-14.1.1-7.fc40
===============================================================================
  Update ID: FEDORA-2024-3d923ca4a5
       Type: bugfix
    Updated: 2024-07-04 03:38:14
       Bugs: 2294381 - dnf upgrade produces file ownership problems; libstdc++-14.1.1-6.fc41.i686 vs .x86_64 .pyc files conflict
Description: Upstream bugs (http://gcc.gnu.org/PRNNNNN) fixed: 106069, 114019, 114846, 114930, 115198, 115278, 115342, 115355, 115358, 115390, 115454, 115502, 115504, 115508, 115575, 115587, 115608, 115624, 115668
   Severity: Moderate
  Installed: true
1 Like

I am trying to test 32 bit compiles using Linux 6.11.3-200.fc40.x86_64 an have done

trash>sudo dnf install  libstdc++.i686
Last metadata expiration check: 3:06:03 ago on Thu 16 Jan 2025 09:26:04 AM MST.
Package libstdc++-14.2.1-3.fc40.i686 is already installed.
...

When I try to compile and link the following temp.cpp:

# include <iostream>
int main(void)
{   std::cout << "sizeof(size_t) = " << sizeof(size_t) << "\n";
    return 0;
}

I get

trash>g++ -m32  temp.cpp
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/14/libstdc++.so when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/14/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status

It seems to be working for me (but I’m on Fedora Linux 41).

$ cat test.cpp
# include <iostream>
int main(void)
{   std::cout << "sizeof(size_t) = " << sizeof(size_t) << "\n";
    return 0;
}
$ g++ -m32 test.cpp
$ ./a.out 
sizeof(size_t) = 4

Do you have the same packages installed?

$ rpm -qa | grep '\.i686$'
libgcc-14.2.1-7.fc41.i686
glibc-gconv-extra-2.40-17.fc41.i686
glibc-2.40-17.fc41.i686
libstdc++-14.2.1-7.fc41.i686
libstdc++-devel-14.2.1-7.fc41.i686
libxcrypt-4.4.38-1.fc41.i686
libxcrypt-devel-4.4.38-1.fc41.i686
glibc-devel-2.40-17.fc41.i686

I was missing libstdc++-devel, so I installed it and then got the same result as above. Now I have:
trash>rpm -qa | grep ‘.i686$’ | sort
glibc-2.39-33.fc40.i686
glibc-devel-2.39-33.fc40.i686
glibc-gconv-extra-2.39-33.fc40.i686
libgcc-14.2.1-3.fc40.i686
libstdc+±14.2.1-3.fc40.i686
libstdc+±devel-14.2.1-3.fc40.i686
libxcrypt-4.4.36-5.fc40.i686
libxcrypt-devel-4.4.36-5.fc40.i686
trash>g++ -m32 temp.cpp
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/14/libstdc++.so when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/14/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status
trash>

Does running sudo ldconfig help?

No, the error persists.

Are you using the /usr/bin/g++ compiler provided by Fedora?

$ which g++
/usr/bin/g++
$ rpm -qf /usr/bin/g++
gcc-c++-14.2.1-7.fc41.x86_64

Edit: FWIW, this is what strace shows on my working system:

$ sudo strace -f -t -e trace=file g++ -m32 -o temp temp.cpp |& grep iostream
[pid 94371] 21:19:17 readlink("/usr/include/c++/14/iostream", 0x7ffe8bd05c30, 1023) = -1 EINVAL (Invalid argument)
[pid 94371] 21:19:17 newfstatat(AT_FDCWD, "/usr/include/c++/14/iostream.gch", 0x7ffe8bd070e0, 0) = -1 ENOENT (No such file or directory)
[pid 94371] 21:19:17 openat(AT_FDCWD, "/usr/include/c++/14/iostream", O_RDONLY|O_NOCTTY) = 4
trash>which g++
/usr/bin/g++
trash>rpm -qf /usr/bin/g++
gcc-c++-14.2.1-3.fc40.x86_64

This got resolved as a problem with my system; see
https://bugzilla.redhat.com/show_bug.cgi?id=2338592

The key was executing the command:

trash>rpm -V gcc-c++
missing     /usr/lib/gcc/x86_64-redhat-linux/14/32/libstdc++.a
missing     /usr/lib/gcc/x86_64-redhat-linux/14/32/libstdc++.so
missing     /usr/lib/gcc/x86_64-redhat-linux/14/32/libstdc++exp.a
missing     /usr/lib/gcc/x86_64-redhat-linux/14/32/libstdc++fs.a
missing     /usr/lib/gcc/x86_64-redhat-linux/14/32/libsupc++.a
1 Like