Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658904 - dev-libs/mpfr-3.1.6 - cannot upgrade away from 3.1.6 to 4.0.1
Summary: dev-libs/mpfr-3.1.6 - cannot upgrade away from 3.1.6 to 4.0.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 642336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-24 08:47 UTC by Martin Mokrejš
Modified: 2019-08-21 22:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,9.48 KB, text/plain)
2018-06-24 20:49 UTC, Martin Mokrejš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2018-06-24 08:47:41 UTC
Hi,
  I wondered I have a broken toolchain on my Gentoo:Prefix host. It turned out *all* my gcc version are linked to libmpfr.so.4. But, the mpfr package was not installed. How come?!

  On a different Gentoo:prefix host (I am lucky) I did:

$ ebuild /apps/gentoo/usr/portage/dev-libs/mpfr/mpfr-3.1.6.ebuild install
$ rsync -CavzW /apps/gentoo/var/tmp/portage/dev-libs/mpfr-3.1.6 $broken_host:$path

broken_host$ ebuild /apps/gentoo/usr/portage/dev-libs/mpfr/mpfr-3.1.6.ebuild qmerge
broken_host$ echo "broken host is fixed now"

The problem is that emerge -uN mpfr on the "broken" host breaks gcc. So I end up again with a broken host without working gcc.


$ emerge -uNpv mpfr

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  r  U  ] dev-libs/mpfr-4.0.1:0/6::gentoo [3.1.6:0/4::gentoo] USE="static-libs" 0 KiB
[ebuild  rR    ] sys-devel/gcc-7.3.0-r3:7.3.0::gentoo  USE="cxx fortran nls nptl objc openmp pch (pie) sanitize ssp vtv (-altivec) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx (-multilib) -objc++ -objc-gc -pgo -regression-test (-vanilla)" 0 KiB

Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 0 KiB

The following packages are causing rebuilds:

  (dev-libs/mpfr-4.0.1:0/6::gentoo, ebuild scheduled for merge) causes rebuilds for:
    (sys-devel/gcc-7.3.0-r3:7.3.0/7.3.0::gentoo, ebuild scheduled for merge)

$


$ emerge --info
Portage 2.3.40 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.3.0, glibc-2.25-r11, 2.6.32-696.20.1.el6.x86_64 x86_64)
=================================================================
System uname: Linux-2.6.32-696.20.1.el6.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5-2695_v3_@_2.30GHz-with-centos-6.9-Final
KiB Mem:   132048928 total,  27129120 free
KiB Swap:    2097148 total,   2074176 free
Timestamp of repository gentoo: Sun, 24 Jun 2018 07:00:01 +0000
Head commit of repository gentoo: 8da926fc939d837cddbea649ff20c94c699f1268
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.4.6::gentoo, 3.5.5-r1::gentoo, 3.6.5-r1::gentoo
dev-util/cmake:           3.11.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15.1-r1::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30-r2::gentoo
sys-devel/gcc:            3.4.6-r2::gentoo, 4.1.2::gentoo, 4.2.4-r1::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r4::gentoo, 6.3.0::gentoo, 7.1.0-r1::gentoo, 7.2.0-r1::gentoo, 7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r11::gentoo
Repositories:

gentoo
    location: /apps/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

local
    location: /apps/gentoo/usr/local/portage
    masters: gentoo
    priority: 0

haskell
    location: /apps/gentoo/var/lib/layman/haskell
    masters: gentoo
    priority: 50

science
    location: /apps/gentoo/var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x Intel-SDP OPERA-2014"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/apps/gentoo/etc/gentoo-release /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/apps/gentoo/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j4"
PKGDIR="/apps/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/apps/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/apps/gentoo/var/tmp"
USE="X alsa amd64 apache apache2 avx avx2 berkdb boost bzip2 cairo cgi cli coin cracklib crypt cryptlib cxx dbus device-mapper dhcp dri emboss encode fax fbcon ffmpeg fontconfig fortran gbm gd gdbm gimp glpk gnutls gtk hal hwdb iconv imaging innodb ithreads java javafx javascript jce jpeg jpg js jscript keymap ladspa lapack lcms libnotify libtirpc lm_sensors mad mmx modules mpi mpich2 mysql ncurses nfs nls nptl nptlonly nscd objc openmp openssl pcre pdf perl php png polkit postscript ppds pppd prefix python qt3support readline resolvconf seccomp server session slideshow sndfile sparsehash sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 static-libs suexec svg syslog tcl tcpd threads tiff tk truetype unicode usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Mokrejš 2018-06-24 08:52:59 UTC
$ equery files mpfr
 * Searching for mpfr ...
 * Contents of dev-libs/mpfr-3.1.6:
/apps
/apps/gentoo
/apps/gentoo/usr
/apps/gentoo/usr/include
/apps/gentoo/usr/include/mpf2mpfr.h
/apps/gentoo/usr/include/mpfr.h
/apps/gentoo/usr/lib64
/apps/gentoo/usr/lib64/libmpfr.la
/apps/gentoo/usr/lib64/libmpfr.so.4 -> libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.6 -> libmpfr.so.6.0.1
/apps/gentoo/usr/lib64/libmpfr.so.6.0.1
/apps/gentoo/usr/share
/apps/gentoo/usr/share/doc
/apps/gentoo/usr/share/doc/mpfr-3.1.6
/apps/gentoo/usr/share/doc/mpfr-3.1.6/AUTHORS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/BUGS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/NEWS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/TODO.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/ReadMe
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/divworst.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/rndo-add.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/sample.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/version.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/html
/apps/gentoo/usr/share/doc/mpfr-3.1.6/html/FAQ.html
/apps/gentoo/usr/share/info
/apps/gentoo/usr/share/info/mpfr.info.bz2
$

I thought the libmpfr.so.6 comes from mpfr-4.x series, interestingly the 3.1.6 provides both.



The actual error I was getting was:

configure:4242: x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -march=native -ftree-vectorize  -Wl,--as-needed conftest.c  >&5
/apps/gentoo/usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory


so my conclusion was that mpfr-4.x doe snot provide libmpfr.so.4 but only libmpfr.so.6. I am puzzled now that mpfr-3.1.6 provides both but admittedly I did not have any mpfr installed for some reason. I am missing something.
Comment 2 Martin Mokrejš 2018-06-24 12:00:39 UTC
On the other host (not broken) I had also mpfr-3.1.6 but in the morning upgrade to mpfr4-4.0.1 happened due to other re-installs. The gcc-7.3.0 is still working, interestingly. The gcc l;acks -r3, though.

$ emerge -pv mpfr gcc
!!! Section 'gentoo_prefix' in repos.conf has name different from repository name 'gentoo' set inside repository

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-libs/mpfr-4.0.1:0/6::gentoo  USE="static-libs" 0 KiB
[ebuild     U  ] sys-devel/gcc-7.3.0-r3:7.3.0::gentoo [7.3.0:7.3.0::gentoo] USE="cxx fortran nls nptl objc openmp pch (pie) sanitize ssp vtv (-altivec) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx (-multilib) -objc++ -objc-gc -pgo -regression-test (-vanilla) (-awt%) (-gcj%)" 0 KiB

Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 0 KiB
$


$ equery files mpfr
 * Searching for mpfr ...
 * Contents of dev-libs/mpfr-4.0.1:
/apps
/apps/gentoo
/apps/gentoo/usr
/apps/gentoo/usr/include
/apps/gentoo/usr/include/mpf2mpfr.h
/apps/gentoo/usr/include/mpfr.h
/apps/gentoo/usr/lib64
/apps/gentoo/usr/lib64/libmpfr.a
/apps/gentoo/usr/lib64/libmpfr.la
/apps/gentoo/usr/lib64/libmpfr.so -> libmpfr.so.6.0.1
/apps/gentoo/usr/lib64/libmpfr.so.4 -> libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.6 -> libmpfr.so.6.0.1
/apps/gentoo/usr/lib64/libmpfr.so.6.0.1
/apps/gentoo/usr/lib64/pkgconfig
/apps/gentoo/usr/lib64/pkgconfig/mpfr.pc
/apps/gentoo/usr/share
/apps/gentoo/usr/share/doc
/apps/gentoo/usr/share/doc/mpfr-4.0.1
/apps/gentoo/usr/share/doc/mpfr-4.0.1/AUTHORS.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/BUGS.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/FAQ.html
/apps/gentoo/usr/share/doc/mpfr-4.0.1/NEWS.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/TODO.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/ReadMe
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/can_round.c.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/divworst.c.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/rndo-add.c.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/sample.c.bz2
/apps/gentoo/usr/share/doc/mpfr-4.0.1/examples/version.c.bz2
/apps/gentoo/usr/share/info
/apps/gentoo/usr/share/info/mpfr.info.bz2
$

$ emerge --info
Portage 2.3.6 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.3.0, glibc-2.25-r10, 3.10.0-862.3.3.el7.x86_64 x86_64)
=================================================================
System uname: Linux-3.10.0-862.3.3.el7.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5-2670_0_@_2.60GHz-with-centos-7.5.1804-Core
KiB Mem:   131835820 total, 122625272 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 24 Jun 2018 07:30:01 +0000
sh bash 4.4_p19
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.6::gentoo, 3.5.2::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.11.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30::gentoo
sys-devel/gcc:            3.4.6-r2::gentoo, 4.1.2::gentoo, 4.2.4-r1::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.4::gentoo, 5.4.0-r4::gentoo, 6.4.0-r1::gentoo, 7.2.0-r1::gentoo, 7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r2::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r10::gentoo
Repositories:

gentoo
    location: /apps/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

name-gentoo
    location: /apps/gentoo/usr/local/portage
    masters: gentoo
    priority: 0

haskell
    location: /apps/gentoo/var/lib/layman/haskell
    masters: gentoo
    priority: 50

science
    location: /apps/gentoo/var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x Intel-SDP OPERA-2014"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/apps/gentoo/etc/gentoo-release /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/apps/gentoo/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j4"
PKGDIR="/apps/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/apps/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/apps/gentoo/var/tmp"
USE="X alsa amd64 apache apache2 avx avx2 berkdb boost bzip2 cairo cgi cli coin cracklib crypt cryptlib curl cxx dbus device-mapper dhcp dri emboss encode fax fbcon ffmpeg fontconfig fortran gbm gcj gd gdbm gimp glpk gnutls gtk hal hwdb iconv imaging innodb ithreads java javafx javascript jce jpeg jpg js jscript keymap ladspa lapack lcms libnotify libtirpc lm_sensors mad mmx modules mpi mpich2 mysql ncurses nfs nls nptl nptlonly nscd objc openmp openssl pcre pdf perl php png policykit polkit postscript ppds pppd prefix python qt3support readline resolvconf seccomp server session slideshow sndfile sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 static-libs suexec svg syslog tcl tcpd threads tiff tk truetype unicode usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Martin Mokrejš 2018-06-24 12:22:57 UTC
On the "wrorking" host where I emerged mpfr-4.0.1 incidentaklly I went to upgrade gcc-7.3.0 to -r3, went fine. Then I re-emerged mpfr-4.0.1 and I saw:

>>> Installing (1 of 1) dev-libs/mpfr-4.0.1::gentoo
>>> needed    sym /apps/gentoo/usr/lib64/libmpfr.so.4
>>> needed    obj /apps/gentoo/usr/lib64/libmpfr.so.4.1.6
rm: cannot remove '/apps/gentoo/var/tmp/portage/dev-libs/mpfr-4.0.1/temp': Directory not empty
>>> Auto-cleaning packages...

Why does it try to drop libmpfr.so.4 at all?
Comment 4 Matthias Maier gentoo-dev 2018-06-24 19:59:46 UTC
As explained in detail on the wiki [1]. <dev-libs/mpfr-4 provides libmpfr.so.4, and >=dev-libs/mpfr-4 provides libmpfr.so.6. This is a simple soname bump.

None of the versions provide both libraries at the same time.

If qlist lists both libraries at the same time, it indicates that you have "preserved-libs". Have you run # emerge -1 @preserved-libs ? (In your particular case it looks like you downgraded from mpfr-4* to mpfr-3* and haven't rebuild everything.)


Prefix, can someone reproduce this behavior? 

[1] https://wiki.gentoo.org/wiki/Mpfr4-update-guide
Comment 5 Martin Mokrejš 2018-06-24 20:48:39 UTC
Thank you for you explanation. Well I tried @preserved-rebuild several times, actually I think it was the cause why I was left without libmpfr.so.4.


As of now (after some attempts to run @preserved-rebuild during the days) I am stuck with:

$ emerge @preserved-rebuild --keep-going -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-libs/mpc-1.1.0-r1:0/3::gentoo  USE="static-libs" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

 * IMPORTANT: 1 news items need reading for repository 'science'.
 * IMPORTANT: 22 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

$ equery files mpfr
 * Searching for mpfr ...
 * Contents of dev-libs/mpfr-3.1.6:
/apps
/apps/gentoo
/apps/gentoo/usr
/apps/gentoo/usr/include
/apps/gentoo/usr/include/mpf2mpfr.h
/apps/gentoo/usr/include/mpfr.h
/apps/gentoo/usr/lib64
/apps/gentoo/usr/lib64/libmpfr.la
/apps/gentoo/usr/lib64/libmpfr.so.4 -> libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.4.1.6
/apps/gentoo/usr/lib64/libmpfr.so.6 -> libmpfr.so.6.0.1
/apps/gentoo/usr/lib64/libmpfr.so.6.0.1
/apps/gentoo/usr/share
/apps/gentoo/usr/share/doc
/apps/gentoo/usr/share/doc/mpfr-3.1.6
/apps/gentoo/usr/share/doc/mpfr-3.1.6/AUTHORS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/BUGS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/NEWS.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/TODO.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/ReadMe
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/divworst.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/rndo-add.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/sample.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/examples/version.c.bz2
/apps/gentoo/usr/share/doc/mpfr-3.1.6/html
/apps/gentoo/usr/share/doc/mpfr-3.1.6/html/FAQ.html
/apps/gentoo/usr/share/info
/apps/gentoo/usr/share/info/mpfr.info.bz2
$ 

I will attach build.log of =dev-libs/mpc-1.1.0-r1::gentoo.
Comment 6 Martin Mokrejš 2018-06-24 20:49:46 UTC
Created attachment 537136 [details]
build.log

$ emerge --info '=dev-libs/mpc-1.1.0-r1::gentoo'
Portage 2.3.40 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.3.0, glibc-2.25-r11, 2.6.32-696.20.1.el6.x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.32-696.20.1.el6.x86_64-x86_64-Intel-R-_Xeon-R-_CPU_E5-2695_v3_@_2.30GHz-with-centos-6.9-Final
KiB Mem:   132048928 total,  38353668 free
KiB Swap:    2097148 total,   2074080 free
Timestamp of repository gentoo: Sun, 24 Jun 2018 07:00:01 +0000
Head commit of repository gentoo: 8da926fc939d837cddbea649ff20c94c699f1268
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.4.6::gentoo, 3.5.5-r1::gentoo, 3.6.5-r1::gentoo
dev-util/cmake:           3.11.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15.1-r1::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30-r2::gentoo
sys-devel/gcc:            3.4.6-r2::gentoo, 4.1.2::gentoo, 4.2.4-r1::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r4::gentoo, 6.3.0::gentoo, 7.1.0-r1::gentoo, 7.2.0-r1::gentoo, 7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r11::gentoo
Repositories:

gentoo
    location: /apps/gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

local
    location: /apps/gentoo/usr/local/portage
    masters: gentoo
    priority: 0

haskell
    location: /apps/gentoo/var/lib/layman/haskell
    masters: gentoo
    priority: 50

science
    location: /apps/gentoo/var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x Intel-SDP OPERA-2014"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/apps/gentoo/etc/gentoo-release /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=native -ftree-vectorize"
DISTDIR="/apps/gentoo/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en_US en_GB en cs"
MAKEOPTS="-j4"
PKGDIR="/apps/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/apps/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/apps/gentoo/var/tmp"
USE="X alsa amd64 apache apache2 avx avx2 berkdb boost bzip2 cairo cgi cli coin cracklib crypt cryptlib cxx dbus device-mapper dhcp dri emboss encode fax fbcon ffmpeg fontconfig fortran gbm gd gdbm gimp glpk gnutls gtk hal hwdb iconv imaging innodb ithreads java javafx javascript jce jpeg jpg js jscript keymap ladspa lapack lcms libnotify libtirpc lm_sensors mad mmx modules mpi mpich2 mysql ncurses nfs nls nptl nptlonly nscd objc openmp openssl pcre pdf perl php png polkit postscript ppds pppd prefix python qt3support readline resolvconf seccomp server session slideshow sndfile sparsehash sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 static-libs suexec svg syslog tcl tcpd threads tiff tk truetype unicode usb v4l v4l2 vim-syntax vnc wavpack wifi x11 xcb xml xorg xrandr xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-libs/mpc-1.1.0-r1::gentoo was built with the following:
USE="(prefix) static-libs"
Comment 7 Martin Mokrejš 2018-06-24 21:12:42 UTC
$ for i in /apps/gentoo//usr/libexec/gcc/*-pc-linux-gnu/*/cc1; do echo $i; ldd $i | grep mpfr ; done
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/3.4.6/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.2.4/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.7/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7b73000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6c88000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.5/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.1.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff795a000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff6972000)
$

Interestingly <=gcc-4.4.7 do no link to mpfr but when I tried to use them to rerbuild my gcc-7.3.0 it failed due to unresolved libmpfr.so.4 unless my memory is fooled.
Comment 8 Martin Mokrejš 2018-06-24 21:24:37 UTC
$ ls -latr /apps/gentoo/usr/lib64/libmpfr*
-rwxr-xr-x 1 mmokrejs mmokrejs 651392 Jun 24 10:01 /apps/gentoo/usr/lib64/libmpfr.so.6.0.1
lrwxrwxrwx 1 mmokrejs mmokrejs     16 Jun 24 10:01 /apps/gentoo/usr/lib64/libmpfr.so.6 -> libmpfr.so.6.0.1
-rwxr-xr-x 1 mmokrejs mmokrejs 456064 Jun 24 10:34 /apps/gentoo/usr/lib64/libmpfr.so.4.1.6
-rw-r--r-- 1 mmokrejs mmokrejs    952 Jun 24 10:34 /apps/gentoo/usr/lib64/libmpfr.la
lrwxrwxrwx 1 mmokrejs mmokrejs     16 Jun 24 10:36 /apps/gentoo/usr/lib64/libmpfr.so.4 -> libmpfr.so.4.1.6
$

Did the *.la file survive my manual 'ebuild mpfr-3.1.6.ebuild qmerge`? Could that be causing a problem? Did I need to run also postinst or some other to finalize mpfr-3.1.6 rescue install?
Comment 9 Fabian Groffen gentoo-dev 2018-06-25 06:37:43 UTC
Might be worth running ldd -v /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1 to see what pulls in which version.  I bet it's a lib that it pulls in, that in turn pulls in the older version.  If that lib is mpc, then it may be that the .la is causing the rebuild to still link against the old lib here.  Have a look at the file to see what version it refers too, somehow I'm affraid it references the later version.  Anyway, getting clues from here would help for the next steps.  WFIW, my mpfr doesn't bundle the .la file.
Comment 10 Martin Mokrejš 2018-06-25 08:30:44 UTC
Meanwhile I did the mpfr upgrade to 4.0.1, recompiled mpc, that broke gcc-7.3.0. I used the symlink trick to point libmpfr.so.4 to libmpfr.so.6. I recompiled gcc-7.3.0-r3. And guess, the situation is simpler now even for other gcc versions:

$ for i in /apps/gentoo//usr/libexec/gcc/*-pc-linux-gnu/*/cc1; do echo $i; ldd $i | grep mpfr ; done
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/3.4.6/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.2.4/cc1
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.7/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7b5b000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.5/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.4/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/6.3.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.1.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
/apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff7942000)
$


I am sorry Fabian, too late to run your command on the old, main gcc instance. Now it is fixed, see:

$ ldd -v /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1
        linux-vdso.so.1 (0x00007ffff7ffb000)
        libmpc.so.3 => /apps/gentoo/usr/lib64/libmpc.so.3 (0x00007ffff7bc1000)
        libmpfr.so.6 => /apps/gentoo/usr/lib64/libmpfr.so.6 (0x00007ffff7942000)
        libgmp.so.10 => /apps/gentoo/usr/lib64/libgmp.so.10 (0x00007ffff76c0000)
        libdl.so.2 => /apps/gentoo/lib64/libdl.so.2 (0x00007ffff74bc000)
        libz.so.1 => /apps/gentoo/usr/lib64/libz.so.1 (0x00007ffff72a5000)
        libm.so.6 => /apps/gentoo/lib64/libm.so.6 (0x00007ffff6f8f000)
        libc.so.6 => /apps/gentoo/lib64/libc.so.6 (0x00007ffff6bd9000)
        /apps/gentoo/lib64/ld-linux-x86-64.so.2 (0x00007ffff7dda000)

        Version information:
        /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libm.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libm.so.6
                libdl.so.2 (GLIBC_2.2.5) => /apps/gentoo/lib64/libdl.so.2
                libc.so.6 (GLIBC_2.8) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpc.so.3:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpfr.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libgmp.so.10:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libdl.so.2:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libz.so.1:
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libm.so.6:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
$



Here is same command for gcc-7.2.0 (but which now needs only the old mpfr):

$ ldd -v /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1
        linux-vdso.so.1 (0x00007ffff7ffb000)
        libmpc.so.3 => /apps/gentoo/usr/lib64/libmpc.so.3 (0x00007ffff7bc1000)
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
        libgmp.so.10 => /apps/gentoo/usr/lib64/libgmp.so.10 (0x00007ffff76c0000)
        libdl.so.2 => /apps/gentoo/lib64/libdl.so.2 (0x00007ffff74bc000)
        libz.so.1 => /apps/gentoo/usr/lib64/libz.so.1 (0x00007ffff72a5000)
        libm.so.6 => /apps/gentoo/lib64/libm.so.6 (0x00007ffff6f8f000)
        libc.so.6 => /apps/gentoo/lib64/libc.so.6 (0x00007ffff6bd9000)
        /apps/gentoo/lib64/ld-linux-x86-64.so.2 (0x00007ffff7dda000)

        Version information:
        /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libm.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libm.so.6
                libdl.so.2 (GLIBC_2.2.5) => /apps/gentoo/lib64/libdl.so.2
                libc.so.6 (GLIBC_2.8) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpc.so.3:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpfr.so.4:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libgmp.so.10:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libdl.so.2:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libz.so.1:
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libm.so.6:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
$


4.5.4 was the oldest gcc which linked to both mpfr versions:

$ ldd -v /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/cc1
        linux-vdso.so.1 (0x00007ffff7ffb000)
        libmpc.so.3 => /apps/gentoo/usr/lib64/libmpc.so.3 (0x00007ffff7bc1000)
        libmpfr.so.4 => /apps/gentoo/usr/lib64/libmpfr.so.4 (0x00007ffff7942000)
        libgmp.so.10 => /apps/gentoo/usr/lib64/libgmp.so.10 (0x00007ffff76c0000)
        libdl.so.2 => /apps/gentoo/lib64/libdl.so.2 (0x00007ffff74bc000)
        libz.so.1 => /apps/gentoo/usr/lib64/libz.so.1 (0x00007ffff72a5000)
        libc.so.6 => /apps/gentoo/lib64/libc.so.6 (0x00007ffff6eef000)
        libm.so.6 => /apps/gentoo/lib64/libm.so.6 (0x00007ffff6bd9000)
        /apps/gentoo/lib64/ld-linux-x86-64.so.2 (0x00007ffff7dda000)

        Version information:
        /apps/gentoo//usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/cc1:
                libdl.so.2 (GLIBC_2.2.5) => /apps/gentoo/lib64/libdl.so.2
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpc.so.3:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libmpfr.so.4:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libgmp.so.10:
                libc.so.6 (GLIBC_2.3) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libdl.so.2:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/usr/lib64/libz.so.1:
                libc.so.6 (GLIBC_2.14) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /apps/gentoo/lib64/libc.so.6
        /apps/gentoo/lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
        /apps/gentoo/lib64/libm.so.6:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /apps/gentoo/lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.4) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /apps/gentoo/lib64/libc.so.6
                libc.so.6 (GLIBC_PRIVATE) => /apps/gentoo/lib64/libc.so.6
$


I am ready to drop the symlink and continue with:

for p in =sys-devel/gcc-4.9.3 =sys-devel/gcc-3.4.6-r2 =sys-devel/gcc-4.4.7 =sys-devel/gcc-4.9.4  =sys-devel/gcc-4.1.2  =sys-devel/gcc-7.1.0-r1  =sys-devel/gcc-4.7.4  =sys-devel/gcc-4.5.4 =sys-devel/gcc-7.2.0-r1 =sys-devel/gcc-5.4.0-r4 =sys-devel/gcc-6.3.0 =sys-devel/gcc-4.8.5 =sys-devel/gcc-4.2.4-r1 ; do emerge --oneshot $p; done

as it seems I fixed the issue for main gcc-7.3.0. Thank you for you help. Is anything more I could collect for you?
Comment 11 Martin Mokrejš 2018-06-28 21:28:45 UTC
So I ran the re-emerge commands and fixed some of the gcc version. The remaining one I just uninstalled. Thank you for your quick answer and the nice webpage, @tamiko.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-21 22:24:20 UTC
*** Bug 642336 has been marked as a duplicate of this bug. ***