Building GCC 5.3.1 on 13.2 with SRPM taken from Leap 42.1

I have been using the GCC repository on OpenSUSE 13.2 to get GCC5 packages.
Now I need to build gcc 5.3.1 as this repository has updated gcc to 5.4

I have downloaded the Source RPM from OpenSUSE Leap 42.1
http://download.opensuse.org/repositories/openSUSE:/Leap:/42.1:/Update/standard/src/gcc5-5.3.1+r233831-6.1.src.rpm

Using rpmbuild --rebuild
First I got problem packaging libgo


Processing files: libgo7-32bit-5.3.1+r233831-6.1.x86_64
Provides: libgo.so.7 libgo7-32bit = 5.3.1+r233831-6.1 libgo7-32bit(x86-64) = 5.3.1+r233831-6.1
Requires(interp): /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: ld-linux.so.2 ld-linux.so.2(GLIBC_2.3) libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.2) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.10) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.1) libc.so.6(GLIBC_2.2.4) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.2) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.5) libc.so.6(GLIBC_2.6) libc.so.6(GLIBC_2.7) libc.so.6(GLIBC_2.9) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgcc_s.so.1(GCC_3.3) libgcc_s.so.1(GCC_3.3.1) libgcc_s.so.1(GCC_4.2.0) libm.so.6 libm.so.6(GLIBC_2.0) libpthread.so.0 libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.1) libpthread.so.0(GLIBC_2.2) libpthread.so.0(GLIBC_2.3.2)
Conflicts: libgo7-32bit
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/sverre/rpmbuild/BUILDROOT/gcc5-5.3.1+r233831-6.1.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/X11/Xw32defs.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/boost/predef/os/linux.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/boost/predef/os/unix.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/hdf/hdfi.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/net-snmp/net-snmp-config.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/openssl/bn.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/ssl


I then unpacked the Source RPM, change build_go to false in the SPEC file.
This time around I got the exact same problem with libmpxwrappers


Processing files: libmpxwrappers0-32bit-5.3.1+r233831-6.1kspt.x86_64
Provides: libmpxwrappers.so.0 libmpxwrappers.so.0(LIBMPXWRAPPERS_1.0) libmpxwrappers0-32bit = 5.3.1+r233831-6.1kspt libmpxwrappers0-32bit(x86-64) = 5.3.1+r233831-6.1kspt
Requires(interp): /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3)
Conflicts: libmpxwrappers0-32bit
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/sverre/rpmbuild/BUILDROOT/gcc5-5.3.1+r233831-6.1kspt.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/X11/Xw32defs.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/boost/predef/os/linux.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/boost/predef/os/unix.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/hdf/hdfi.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/net-snmp/net-snmp-config.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/openssl/bn.h
   /usr/lib64/gcc/x86_64-suse-linux/5/include-fixed/ssl

In the past, I’ve found that the pre-compiled GCC binary doesn’t have any dependencies.

In other words, unless you have a reason to build the binary, I’d instead recommend you just copy the version of GCC you need from wherever (another system? repo?), place it in an executable path and then invoke it the usual way.

TSU

We need it in our 3party RPM repository for openSUSE 13.2

In case of SLES12 and OpenSUSE Leap 42.1 which comes with gcc-5.3.1 it is no problem, but OpenSUSE 13.2 comes with the older gcc-4.8

I could search in our SLES12 mirror repository for all gcc RPM packages that cotains the version 5.3.1+r233831-9.1 and use those for OpenSUSE 13.2

Yes, I’ve found personally that the pre-compiled gcc binary is very “standalone.”
If you can find a suitable gcc anywhere, copy it somewhere (even your own repository).
Of course, my personal experience should not always be relied upon, every person should test for their own use.

TSU

What’s wrong with devel:gcc repository that contains it for 13.2?

Otherwise your problem is that your system contains too many development packages and gcc attempts to produce fixed headers for them. On OBS packages are built in controlled environment that contains only well defined set of packages (and headers). You can create package in your home project on OBS or locally using osc command.

I just did a search and don’t see 5.3.1

Repo:
http://download.opensuse.org/repositories/devel:/gcc/openSUSE_13.2/x86_64/

And, your observation about difficulties maintaining multiple GCC is a reason why I submitted a request to create an update-alternatives for GCC awhile ago…

TSU

My observation has nothing to do with it.