1

I'm trying to compile and install gcc-4.9.0 on my Debian system, and in particular I want the new version to overwrite an old version of libstdc++.so.6 in /usr/lib/x86_64-linux-gnu that came as standard with my distribution, but which offends various other programs I've installed because it is too old.

When I built from source, the configure options I used (with guidance from here) were:

configure --prefix=/usr           \
          --libdir=/usr/lib       \
          --enable-shared         \
          --enable-threads=posix  \
          --enable-__cxa_atexit   \
          --enable-clocale=gnu    \
          --disable-multilib      \
          --with-system-zlib      \
          --enable-languages=c,c++,fortran

make and make install ran successfully; make puts the compiled code into gcc-build/x86_64-unknown-linux-gnu, but unexpectedly make install copies it not into /usr/lib/x86-64-linux-gnu, but into /usr/lib64.

What configuration option should I use to get the final version into /usr/lib/x86_64-linuc-gnu?

I thought that perhaps the problem was the --disable-multilib option, but when I tried to compile without this I got a configure error to the effect:

configure: error: I suspect your system does not have 32-bit developement    libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.

...so it obviously isn't that.

polym
  • 10,672
  • 9
  • 41
  • 65
Eos Pengwern
  • 111
  • 3
  • What is "your system"? Please be specific? Debian wheezy? I've got instructions about backporting gcc 4.9 [here](http://unix.stackexchange.com/a/126616/4671) if you are interested. It did work for me. – Faheem Mitha Jul 08 '14 at 11:15
  • Note that installing gcc 4.9 debs causes the `libgcc1` package to be upgraded from 4.7 to 4.9. – Faheem Mitha Jul 08 '14 at 11:26
  • Possible dupe of http://unix.stackexchange.com/q/126433/4671 – Faheem Mitha Jul 08 '14 at 11:27
  • I'm on Wheezy, so your link does in fact look very relevant. I'll have a go at it, but probably not until Thursday. – Eos Pengwern Jul 08 '14 at 12:09
  • Ok. Are you on amd64 or i386? – Faheem Mitha Jul 08 '14 at 12:48
  • I'm on amd64, and only need to install the 64-bit version – Eos Pengwern Jul 08 '14 at 13:07
  • If you need assistance, let me know. You can ping me in the [main unix.sx chat room](http://chat.stackexchange.com/rooms/26/unix-and-linux). That is probably the best place to discuss this. Note that as mentioned in that answer, that patch may or may not apply cleanly to newer versions of gcc 4.9. – Faheem Mitha Jul 09 '14 at 10:17

0 Answers0