Bug 1642077
| Summary: | devtoolset-7-gcc dangling symlinks break linking with g++ -m32 | ||
|---|---|---|---|
| Product: | [Community] softwarecollections.org | Reporter: | franz.sirl-kernel |
| Component: | devtoolset-7 | Assignee: | Marek Polacek <mpolacek> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-11-08 16:58:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Hi Franz, please make sure that you have the following packages installed when using -m32: glibc-devel.i686 libgcc.i686 libstdc++.i686 devtoolset-7-libstdc++-devel.i686 I suspect you're missing the last one. With that: # rpm -q devtoolset-7-libstdc++-devel devtoolset-7-libstdc++-devel-7.3.1-5.13.el7.x86_64 devtoolset-7-libstdc++-devel-7.3.1-5.13.el7.i686 # scl enable devtoolset-7 "g++ -m32 x.C" # ./a.out Hello world! (In reply to Marek Polacek from comment #1) > Hi Franz, > > please make sure that you have the following packages installed when using > -m32: > > glibc-devel.i686 > libgcc.i686 > libstdc++.i686 These are installed. > devtoolset-7-libstdc++-devel.i686 Where do I get this one? Seems it's not part of the CentOS SCL repository. Is this a distribution packaging bug? (In reply to franz.sirl-kernel from comment #2) > > devtoolset-7-libstdc++-devel.i686 > > Where do I get this one? Seems it's not part of the CentOS SCL repository. > Is this a distribution packaging bug? Sorry, I don't know enough about the CentOS SCL repository. But if that package isn't available, then that seems like a bug. |
Description of problem: When trying to compile+link a C++ application with "g++ -m32", the linking step fails. Version-Release number of selected component (if applicable): devtoolset-7-7.1-4.el7.x86_64 devtoolset-7-binutils-2.28-11.el7.x86_64 devtoolset-7-gcc-7.3.1-5.13.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. create helloworld.cpp: #include <iostream> int main() { std::cout << "Hello world!" << std::endl; return 0; } 2. compile with: scl enable devtoolset-7 "g++ -m32 helloworld.cpp" Actual results: Doesn't link successfully Expected results: Successful link Additional info: <mock-chroot> sh-4.2# cat /etc/centos-release CentOS Linux release 7.5.1804 (Core) <mock-chroot> sh-4.2# rpm -q devtoolset-7 devtoolset-7-binutils devtoolset-7-gcc devtoolset-7-7.1-4.el7.x86_64 devtoolset-7-binutils-2.28-11.el7.x86_64 devtoolset-7-gcc-7.3.1-5.13.el7.x86_64 <mock-chroot> sh-4.2# scl enable devtoolset-7 "g++ -m32 helloworld.cpp" /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: skipping incompatible /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/libstdc++_nonshared.a when searching for -lstdc++_nonshared /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: cannot find -lstdc++_nonshared collect2: error: ld returned 1 exit status <mock-chroot> sh-4.2# symlinks /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/ dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libstdc++.a -> ../../../i686-redhat-linux/7/libstdc++.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libmpxwrappers.a -> ../../../i686-redhat-linux/7/libmpxwrappers.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libstdc++_nonshared.a -> ../../../i686-redhat-linux/7/libstdc++_nonshared.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libubsan.a -> ../../../i686-redhat-linux/7/libubsan.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libatomic.a -> ../../../i686-redhat-linux/7/libatomic.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libitm.a -> ../../../i686-redhat-linux/7/libitm.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libasan.a -> ../../../i686-redhat-linux/7/libasan.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libquadmath.a -> ../../../i686-redhat-linux/7/libquadmath.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libstdc++fs.a -> ../../../i686-redhat-linux/7/libstdc++fs.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libasan_preinit.o -> ../../../i686-redhat-linux/7/libasan_preinit.o dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libcilkrts.a -> ../../../i686-redhat-linux/7/libcilkrts.a dangling: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/32/libmpx.a -> ../../../i686-redhat-linux/7/libmpx.a