Fedora 8 minimal system inside an OpenVZ VE. Trying to compile/link a trivial C program with -m64 flag to gcc on a PPC box. [root@rpm-build-ppc64-f8 ~]# echo "int main() {return 0;}" > conftest.c [root@rpm-build-ppc64-f8 ~]# gcc -m64 conftest.c /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status [root@rpm-build-ppc64-f8 ~]# gcc -m64 --print-file libgcc_s.so /usr/lib/gcc/ppc64-redhat-linux/4.1.2/libgcc_s.so [root@rpm-build-ppc64-f8 ~]# ls -l /usr/lib/gcc/ppc64-redhat-linux/4.1.2/libgcc_s.so lrwxrwxrwx 1 root root 18 Nov 13 12:00 /usr/lib/gcc/ppc64-redhat-linux/4.1.2/libgcc_s.so -> /lib/libgcc_s.so.1 [root@rpm-build-ppc64-f8 ~]# rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' dummy-fedora-core-5-1.0-4.1.swsoft.ppc vzdev-3.3.13-1.4.swsoft.ppc gpg-pubkey-4f2a6fd2-3f9d9d3b.(none) termcap-5.5-1.20060701.1.noarch gdbm-1.8.0-27.fc7.ppc libsysfs-2.1.0-1.fc7.ppc gawk-3.1.5-15.fc7.ppc rootfiles-8.1-1.1.1.noarch python-iniparse-0.2.2-1.fc8.noarch glibc-common-2.7-2.ppc compat-db-4.5.20-3.fc8.ppc ncurses-5.6-12.20070812.fc8.ppc info-4.11-1.fc8.ppc popt-1.12-3.fc8.ppc elfutils-libelf-0.131-1.fc8.ppc libsepol-2.0.11-1.fc8.ppc bzip2-libs-1.0.4-12.fc8.ppc beecrypt-4.1.2-13.ppc libgcc-4.1.2-33.ppc sqlite-3.4.2-3.fc8.ppc tcp_wrappers-libs-7.6-50.fc8.ppc psmisc-22.5-2.fc8.ppc device-mapper-libs-1.02.22-1.fc8.ppc elfutils-libs-0.131-1.fc8.ppc libidn-0.6.14-4.ppc nspr-4.6.7-3.fc8.ppc libattr-2.4.38-2.fc8.ppc expat-2.0.1-2.ppc cyrus-sasl-lib-2.1.22-7.ppc vim-minimal-7.1.135-1.fc8.ppc pcre-7.3-1.ppc mingetty-1.07-6.ppc e2fsprogs-1.40.2-10.fc8.ppc which-2.16-8.ppc tcl-8.4.15-5.fc8.ppc ustr-1.0.2-3.fc8.ppc wireless-tools-29-0.2.pre22.fc8.ppc tar-1.17-4.fc8.ppc tmpwatch-2.9.11-2.ppc findutils-4.2.31-2.fc8.ppc cpio-2.9-5.fc8.ppc patch-2.5.4-30.fc8.ppc strace-4.5.16-2.fc8.ppc crontabs-1.10-18.fc8.noarch filesystem-2.4.11-1.fc8.ppc fedora-release-notes-8.0.1-1.noarch tzdata-2007i-1.fc8.noarch pam-0.99.8.1-10.fc8.ppc openssl-0.9.8b-17.fc8.ppc logrotate-3.7.6-1.3.fc8.ppc libuser-0.56.6-2.ppc ConsoleKit-libs-0.2.3-1.fc8.ppc rsyslog-1.19.6-3.fc8.ppc initscripts-8.60-1.ppc perl-libs-5.8.8-31.fc8.ppc mcstrans-0.2.7-1.fc8.ppc openssh-server-4.7p1-2.fc8.ppc sudo-1.6.9p4-2.fc8.ppc wget-1.10.2-16.fc8.ppc python-libs-2.5.1-15.fc8.ppc rpm-4.4.2.2-3.fc8.ppc libsemanage-2.0.12-1.fc8.ppc libselinux-python-2.0.37-1.fc8.ppc rpm-python-4.4.2.2-3.fc8.ppc rhpl-0.210-1.ppc glibc-headers-2.7-2.ppc libmudflap-4.1.2-33.ppc glibc-devel-2.7-2.ppc mktemp-1.5-25.fc7.ppc grep-2.5.1-57.fc7.ppc keyutils-libs-1.2-2.fc6.ppc MAKEDEV-3.23-1.2.ppc basesystem-8.1-1.noarch ethtool-5-1.fc7.ppc fedora-release-8-3.noarch yum-3.2.7-1.fc8.noarch glibc-2.7-2.ppc zlib-1.2.3-14.fc8.ppc bash-3.2-18.fc8.ppc audit-libs-1.6.2-4.fc8.ppc chkconfig-1.3.36-1.ppc glib2-2.14.3-1.fc8.ppc libselinux-2.0.37-1.fc8.ppc shadow-utils-4.0.18.1-18.fc8.ppc libcap-1.10-30.ppc readline-5.2-7.fc8.ppc libxml2-2.6.30-1.ppc libstdc++-4.1.2-33.ppc cracklib-2.8.10-3.ppc e2fsprogs-libs-1.40.2-10.fc8.ppc sed-4.1.5-9.fc8.ppc procps-3.2.7-17.fc8.ppc nss-3.11.7-10.fc8.ppc libacl-2.2.39-12.fc8.ppc db4-4.6.21-1.fc8.ppc iproute-2.6.22-2.fc8.ppc iputils-20070202-5.fc8.ppc net-tools-1.60-84.fc8.ppc device-mapper-1.02.22-1.fc8.ppc binutils-2.17.50.0.18-1.ppc less-406-12.fc8.ppc libedit-2.10-1.20070831cvs.fc8.ppc libtermcap-2.0.8-47.ppc gzip-1.3.12-4.fc8.ppc elfutils-0.131-1.fc8.ppc iptables-1.3.8-5.fc8.ppc diffutils-2.8.1-19.fc8.ppc ed-0.8-1.fc8.ppc librtas-1.3.2-1.fc8.ppc cracklib-dicts-2.8.10-3.ppc setup-2.6.10-1.fc8.noarch tcp_wrappers-devel-7.6-50.fc8.ppc kernel-headers-2.6.23.1-49.fc8.ppc coreutils-6.9-9.fc8.ppc krb5-libs-1.6.2-9.fc8.ppc openldap-2.3.39-1.fc8.ppc dbus-libs-1.1.2-7.fc8.ppc dbus-1.1.2-7.fc8.ppc util-linux-ng-2.13-3.fc8.ppc sysvinit-2.86-18.ppc openssh-4.7p1-2.fc8.ppc perl-5.8.8-31.fc8.ppc openssh-clients-4.7p1-2.fc8.ppc passwd-0.74-5.fc8.ppc neon-0.27.2-2.ppc python-2.5.1-15.fc8.ppc rpm-libs-4.4.2.2-3.fc8.ppc python-urlgrabber-3.0.0-3.fc8.noarch pyxf86config-0.3.34-1.fc8.ppc libxml2-python-2.6.30-1.ppc yum-metadata-parser-1.1.2-1.fc8.ppc audit-libs-python-1.6.2-4.fc8.ppc cpp-4.1.2-33.ppc libgomp-4.1.2-33.ppc gcc-4.1.2-33.ppc
Initially I thought the problem is in absent libgcc.ppc64 package -- but I can not install it (so I assume the problem is elsewhere): [root@rpm-build-ppc64-f8 ~]# yum -y install libgcc.ppc64 Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package libgcc.ppc64 0:4.1.2-33 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: libgcc ppc64 4.1.2-33 fedora 105 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 105 k Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Check Error: package libgcc-4.1.2-33 is already installed file /usr/sbin/libgcc_post_upgrade from install of libgcc-4.1.2-33 conflicts with file from package libgcc-4.1.2-33 Error Summary ------------- [root@rpm-build-ppc64-f8 ~]#
Some more diags with strace: [root@rpm-build-ppc64-f8 ~]# strace -fF -eopen gcc -m64 conftest.c 2>&1 | grep gcc_s [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/ppc-redhat-linux/lib64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/ppc-redhat-linux/lib64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/local/lib64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/local/lib64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/lib64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/lib64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib64/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib64/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/ppc-redhat-linux/lib/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/ppc-redhat-linux/lib/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/local/lib/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/local/lib/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/lib/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/lib/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/libgcc_s.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 11448] open("/usr/lib/libgcc_s.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) /usr/bin/ld: cannot find -lgcc_s
If yum/rpm say this conflicts, then it must be a yum/rpm bug. /usr/sbin/libgcc_post_upgrade is an ELF binary.
Rpm only permits elf* and other multilib conflicts when the packages with conflicting files are installed in the same transaction. In other words: # rpm -e --nodeps libgcc # yum install libgcc Yum should now bring in both archs without conflicts. If you think the behavior is nutty, you're not alone... see bug 190209.
(In reply to comment #4) > In other words: > # rpm -e --nodeps libgcc > # yum install libgcc For the sake of other people reading this bug. Oh my, I should've tried that on a dummy first... [root@rpm-build-ppc64 /]# rpm -e --nodeps libgcc [root@rpm-build-ppc64 /]# yum install libgcc There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: libgcc_s.so.1: cannot open shared object file: No such file or directory ....
(In reply to comment #4) > Rpm only permits elf* and other multilib conflicts when the packages with > conflicting files are installed in the same transaction. > > In other words: > # rpm -e --nodeps libgcc > # yum install libgcc OK, the correct thing to do would be # rpm -e --justdb libgcc # yum install libgcc
Sorry, these are the correct commands: # rpm -e <s>justdb </s>nodeps libgcc # yum install libgcc
Sorry, these are the correct commands: # rpm -e --justdb --nodeps libgcc # yum install libgcc
My next problem is [root@rpm-build-ppc64 packages]# ls -l glibc-2* glibc-devel-2.6-4.ppc* -rw-r--r-- 1 root root 7848095 Jul 11 17:42 glibc-2.6-4.ppc.rpm -rw-r--r-- 1 root root 7803131 Jul 11 17:42 glibc-2.6-4.ppc64.rpm -rw-r--r-- 1 root root 2750742 Jul 11 17:42 glibc-devel-2.6-4.ppc.rpm -rw-r--r-- 1 root root 2788741 Jul 11 17:42 glibc-devel-2.6-4.ppc64.rpm [root@rpm-build-ppc64 packages]# rpm -ihv glibc-2* glibc-devel-2.6-4.ppc* Preparing... ########################################### [100%] file /sbin/ldconfig conflicts between attempted installs of glibc-2.6-4 and glibc-2.6-4 file /sbin/sln conflicts between attempted installs of glibc-2.6-4 and glibc-2.6-4 file /usr/sbin/iconvconfig conflicts between attempted installs of glibc-2.6-4 and glibc-2.6-4
I think this is the same as before. reassinging over to rpm though I'm not sure there's anything to be done there, either.
Is there anything I can do about it? I need to setup an environment where I can compile both with and without -m64. Is it possible at all? Is this a problem of glibc packaging? Repository? RPM?
For any such conflicts, follow the same recipe from comment #8 to get packages for both archs installed. Depends on your situation of course, but might be less of a fuss to just reinstall from scratch to get all the necessary bits into the same transaction. Nothing to fix in rpm (or yum) here, other than long-term ban the "sharing" of conflicting files on multilib too. For now this is expected behavior though.
(In reply to comment #12) > For any such conflicts, follow the same recipe from comment #8 to get packages > for both archs installed. Depends on your situation of course, but might be less > of a fuss to just reinstall from scratch to get all the necessary bits into the > same transaction. Yeah, I did follow the recipe in comment #8 but when I got the problem described in comment #9. To my understanding this can not be solved and therefore a bug. All right, let me do yet another round of investigation and I will follow up in a new bug I guess.
(In reply to comment #13) > All right, let me do yet another round of investigation and I will follow up in > a new bug I guess.
(In reply to comment #13) > All right, let me do yet another round of investigation and I will follow up in > a new bug I guess. For the record, it's bug #437251.