Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602646 - net-mail/cyrus-imapd-2.5.10 - ld: /usr/lib64/libcyrus_min.a(libconfig.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
Summary: net-mail/cyrus-imapd-2.5.10 - ld: /usr/lib64/libcyrus_min.a(libconfig.o): rel...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-14 14:44 UTC by Sebastian Damm
Modified: 2019-06-09 11:30 UTC (History)
6 users (show)

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


Attachments
emerge log (log.txt,11.55 KB, text/plain)
2017-02-22 11:14 UTC, boyan7640
Details
build.log (build.log,147.98 KB, text/plain)
2017-05-30 14:59 UTC, Thomas Beutin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Damm 2016-12-14 14:44:12 UTC
When compiling cyrus-imapd on amd64, the install phase fails with the following error. From what I read at https://wiki.gentoo.org/wiki/Project:AMD64/Fixing_-fPIC_Errors_Guide this is a case 3 and thus a bug in the ebuild. Could someone fix it please?

libtool: install: /usr/bin/install -c imap/.libs/libcyrus_imap.lai /mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/image//usr/lib64/libcyrus_imap.la
libtool: warning: relinking 'sieve/libcyrus_sieve.la'
libtool: install: (cd /mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10; /bin/sh "/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10/libtool"  --tag CC --mode=relink x86_64-pc-linux-gnu-gcc -fPIC -fvisibility=hidden -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -o sieve/libcyrus_sieve.la -rpath /usr/lib64 sieve/sieve_libcyrus_sieve_la-addr.lo sieve/sieve_libcyrus_sieve_la-bc_dump.lo sieve/sieve_libcyrus_sieve_la-bc_emit.lo sieve/sieve_libcyrus_sieve_la-bc_eval.lo sieve/sieve_libcyrus_sieve_la-bc_generate.lo sieve/sieve_libcyrus_sieve_la-comparator.lo sieve/sieve_libcyrus_sieve_la-flags.lo sieve/sieve_libcyrus_sieve_la-interp.lo sieve/sieve_libcyrus_sieve_la-message.lo sieve/sieve_libcyrus_sieve_la-script.lo sieve/sieve_libcyrus_sieve_la-sieve.lo sieve/sieve_libcyrus_sieve_la-tree.lo sieve/sieve_libcyrus_sieve_la-varlist.lo sieve/sieve_libcyrus_sieve_la-sieve_err.lo sieve/libcyrus_sieve_lex.la com_err/et/libcyrus_com_err.la lib/libcyrus_min.la lib/libcyrus.la -ldb -L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl -lpcre -lpcreposix -lz -inst-prefix-dir /mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/image/)
libtool: relink: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  sieve/.libs/sieve_libcyrus_sieve_la-addr.o sieve/.libs/sieve_libcyrus_sieve_la-bc_dump.o sieve/.libs/sieve_libcyrus_sieve_la-bc_emit.o sieve/.libs/sieve_libcyrus_sieve_la-bc_eval.o sieve/.libs/sieve_libcyrus_sieve_la-bc_generate.o sieve/.libs/sieve_libcyrus_sieve_la-comparator.o sieve/.libs/sieve_libcyrus_sieve_la-flags.o sieve/.libs/sieve_libcyrus_sieve_la-interp.o sieve/.libs/sieve_libcyrus_sieve_la-message.o sieve/.libs/sieve_libcyrus_sieve_la-script.o sieve/.libs/sieve_libcyrus_sieve_la-sieve.o sieve/.libs/sieve_libcyrus_sieve_la-tree.o sieve/.libs/sieve_libcyrus_sieve_la-varlist.o sieve/.libs/sieve_libcyrus_sieve_la-sieve_err.o  -Wl,--whole-archive sieve/.libs/libcyrus_sieve_lex.a -Wl,--no-whole-archive  -Wl,--as-needed -L/usr/lib64 -L/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/image//usr/lib64 -lcyrus_com_err -lcyrus_min -lcyrus -lsasl2 -ldb -lmysqlclient -lpthread -lm -lssl -lcrypto -ldl -lpcre -lpcreposix -lz  -march=native -O2 -Wl,-O1   -Wl,-soname -Wl,libcyrus_sieve.so.0 -o sieve/.libs/libcyrus_sieve.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libcyrus_min.a(libconfig.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libcyrus_min.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'sieve/libcyrus_sieve.la' with the above command before installing it
Makefile:2384: recipe for target 'install-libLTLIBRARIES' failed
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10'
Makefile:5664: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10'
Makefile:5356: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10'
Makefile:5658: recipe for target 'install' failed
make: *** [install] Error 2
 * ERROR: net-mail/cyrus-imapd-2.5.10::gentoo failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-mail/cyrus-imapd-2.5.10::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-mail/cyrus-imapd-2.5.10::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-mail:cyrus-imapd-2.5.10:20161214-135136.log'.
 * For convenience, a symlink to the build log is located at '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/temp/build.log'.
 * The ebuild environment file is located at '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/temp/environment'.
 * Working directory: '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10'
 * S: '/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/work/cyrus-imapd-2.5.10'


emerge --info looks like this:

Portage 2.3.0 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.22-r4, 4.4.6-gentoo-damm x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.6-gentoo-damm-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_v3_@_2.40GHz-with-gentoo-2.2
KiB Mem:     6120332 total,   1553184 free
KiB Swap:    1492988 total,   1492988 free
Timestamp of repository gentoo: Wed, 14 Dec 2016 10:45:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /mnt/ramsch/gentoo/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000

perl-experimental
    location: /mnt/ramsch/gentoo/layman/perl-experimental
    masters: gentoo
    priority: 0

mysql
    location: /mnt/ramsch/gentoo/layman/mysql
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/mnt/ramsch/gentoo/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/mnt/ramsch/gentoo/packages"
PORTAGE_CONFIGROOT="/"
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="/mnt/ramsch/gentoo/tmp"
USE="acl amd64 apache2 bash-completion berkdb bzip2 calendar cron crypt ctype curl cxx dkim exif exim fastcgi ftp gd gdbm gif gmp gnutls graph iconv imagemagick imap ipv6 jpeg ldap logrotate mcal mhash mysql ncurses netifrc nls nptl nptlonly openrc openssl pam pcre perl php plugins png posix python readline rrdtool ruby sasl server session sieve simplexml snmp sockets spell ssl subversion suexec svg threads tidy tools truetype udev unicode vhosts webdav xml xmlrpc zip zlib" ABI_X86="64" APACHE2_MODULES="actions alias asis auth_basic authn_file auth_digest authn_anon authn_core authn_default authz_core authz_default authz_host authz_owner authz_user autoindex cache case_filter case-filter-in charset-lite cern-meta cgi cgid dav dav_fs dav_lock deflate dir disk-cache echo env expires ext-filter file-cache filter headers imagemap include info log_config logio mem-cache mime mime-magic negotiation rewrite setenvif so socache_shmcb speling status unique_id unixd userdir usertrack vhost-alias" APACHE2_MPMS="prefork" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" KERNEL="linux" L10N="de" LINGUAS="de" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 pypy1_9 jython2_5" RUBY_TARGETS="ruby21" USERLAND="GNU" XTABLES_ADDONS="tarpit"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


mail ~ # emerge -pqv '=net-mail/cyrus-imapd-2.5.10::gentoo'
[ebuild     U ] net-mail/cyrus-imapd-2.5.10 [2.4.17] USE="berkdb mysql perl%* server%* sieve ssl -afs -clamav% -http% -kerberos -nntp -pam -postgres -replication -snmp -sqlite -static-libs% -tcpd"
Comment 1 RAPHEAD 2017-01-07 21:01:32 UTC
I'm having the same/ a similar problem. This seems to be it in my case:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libcyrus_min.a(libconfig.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
Comment 2 gentoo 2017-01-11 09:46:22 UTC
I can confirm this bug. 
emerge fails with the same error message

My emerge --info
Portage 2.3.0 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-4.9.4, glibc-2.23-r3, 4.4.0-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.4.0-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.3
KiB Mem:     8169244 total,     68188 free
KiB Swap:    4200892 total,   3946796 free
Timestamp of repository gentoo: Wed, 11 Jan 2017 08:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

gbin
    location: /var/lib/layman/gbin
    masters: gentoo
    priority: 0

olqs
    location: /usr/local/portage/olqs
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /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 -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs --load-average=10 --autounmask-write"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/ http://gentoo.supp.name/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
USE="X acl amavis amd64 apache2 berkdb bzip2 clamav clamd clamdtop cli cracklib crypt cxx dcc dlz doc dri extensions fontconfig fortran fpm fuse gd gdbm iconv idled imagemagick imap ipv6 jabber jadetex jpeg latex ldap md5 mmx mmxext modules multilib mysql mysqli mysqlnd nat nat-transport ncurses nls nptl openmp openssl pam pcre php png postfix python pyzord razor readline rrdtool rss rsync ruby sasl screen seccomp session sieve smtp spamassassin sqlite sqlite3 sse sse2 ssh ssl tcpd truetype unicode usb vchroot virtual-users xattr xml 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="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias proxy proxy_fcgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" 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" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 boyan7640 2017-02-22 11:14:41 UTC
Created attachment 464662 [details]
emerge log

emerge log
Comment 4 boyan7640 2017-02-22 11:15:59 UTC
Happened to me as well - the log attached.

Several warnings and one error:
libtool:   error: error: relink 'sieve/libcyrus_sieve.la' with the above command before installing it

make: *** [Makefile:5658: install] Error 2
 * ERROR: net-mail/cyrus-imapd-2.5.10::gentoo failed (install phase):
 *   emake failed


>>> Failed to emerge net-mail/cyrus-imapd-2.5.10, Log file:
Comment 5 bsod 2017-02-27 18:50:32 UTC
I can confirm with cyrus-imapd-2.5.10 as well.
Comment 6 Thomas Beutin 2017-04-03 07:27:05 UTC
Hi Devs, i don't want to bother, but what's necessary to mark this bug at least "confirmed"?
Comment 7 Thomas Beutin 2017-05-10 09:36:43 UTC
On net-mail/cyrus-imapd-2.5.11-r1 it's the same.
Comment 8 Thomas Beutin 2017-05-10 13:44:33 UTC
I could come around this by uninstalling net-mail/cyrus-imapd first.

On the new install compile run i got some messages like
"libtool: warning: '/usr/lib/libjansson.la' seems to be moved"
but the installation completes w/o further errors.
Comment 9 Eray Aslan gentoo-dev 2017-05-16 14:15:59 UTC
Please check net-mail/cyrus-imapd-3.0.1 and let me know if you still have the same problem.  Thank you.
Comment 10 Johannes Geiss 2017-05-18 07:29:28 UTC
(In reply to Eray Aslan from comment #9)
> Please check net-mail/cyrus-imapd-3.0.1 and let me know if you still have
> the same problem.  Thank you.

Yes, 3.0.1 makes the same error:

/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libcyrus_min.a(libconfig.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libcyrus_min.a: error adding symbols: Bad value
Comment 11 Thomas Beutin 2017-05-30 10:39:04 UTC
(In reply to Eray Aslan from comment #9)
> Please check net-mail/cyrus-imapd-3.0.1 and let me know if you still have
> the same problem.  Thank you.

As long as this bug is not fixed i would kindly ask to postpone the removal of net-mail/cyrus-imap-admin-2.4.17-r1::gentoo
Comment 12 Thomas Beutin 2017-05-30 13:55:26 UTC
btw: updating to =net-mail/cyrus-imapd-2.4.18 works (after unmasking), which is safe according to bug 561884
Comment 13 Eray Aslan gentoo-dev 2017-05-30 14:45:53 UTC
Can you please attach a full build log?
Comment 14 Thomas Beutin 2017-05-30 14:59:20 UTC
Created attachment 474694 [details]
build.log

/var/tmp/portage/net-mail/cyrus-imapd-2.5.10/temp/build.log
Comment 15 Thomas Beutin 2017-05-30 15:00:42 UTC
(In reply to Eray Aslan from comment #13)
> Can you please attach a full build log?

i attached the build.log of cyrus-imapd-2.5.10 from the system where i updated to net-mail/cyrus-imapd-2.4.18 today.
Comment 16 Sebastian Damm 2017-06-19 10:31:33 UTC
After trying to install cyrus-imapd again (2.5.10 and 3.0.1 gave the same results), I looked whether I could fix it myself. And stumbled upon this thread in the Gentoo forum: https://forums.gentoo.org/viewtopic-p-8037076.html

Turns out, this problem only exists when upgrading cyus-imapd from pre-2.5 releases (in my case it was 2.4.17) to a post-2.5 release. When removing the old cyrus-imapd first, emerging the new version works fine, at least on my machine. (If you want to make sure, you have a way back to your old version, you can create packages with quickpkg of your currently installed package before uninstalling.)

Hope this helps some people stuck with the masked version, too.
Comment 17 Johannes Geiss 2017-06-19 12:23:09 UTC
(In reply to Sebastian Damm from comment #16)

> When removing the
> old cyrus-imapd first, emerging the new version works fine

thank you, this helped. at least in my case.
Comment 18 Thomas Beutin 2017-07-17 10:32:37 UTC
(In reply to Johannes Geiss from comment #17)
> (In reply to Sebastian Damm from comment #16)
> 
> > When removing the
> > old cyrus-imapd first, emerging the new version works fine
> 
> thank you, this helped. at least in my case.

i can confirm this (on my testing machine), but IMHO this is not a serious option unless someone can confirm this highly uncommon procedure keeps all local data (configuration, mailbox data, mailbox metadata) intact.
Comment 19 Jeroen Roovers (RETIRED) gentoo-dev 2017-11-24 15:57:18 UTC
What installs /usr/lib64/libcyrus_min.a in the first place? Can we get rid of it?

Breaking it down:

libtool: relink: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC
#[lots of objects]
# Linking against anything in LIBDIR:
-Wl,--as-needed -L/usr/lib64
# Linking against new libraries:
-L/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/image//usr/lib64
# Dynamically linked libraries:
-lcyrus_com_err -lcyrus_min

The solution is quite literally to move the -L/usr/lib64 argument after the -L/mnt/ramsch/gentoo/tmp/portage/net-mail/cyrus-imapd-2.5.10/image//usr/lib64 argument so that it finds the new libraries first.
Comment 20 Thomas Beutin 2017-11-24 20:08:00 UTC
(In reply to Jeroen Roovers from comment #19)
> What installs /usr/lib64/libcyrus_min.a in the first place? Can we get rid
> of it?

it's from net-mail/cyrus-imapd-2.4.18:

# equery b /usr/lib64/libcyrus_min.a
 * Searching for /usr/lib64/libcyrus_min.a ... 
net-mail/cyrus-imapd-2.4.18 (/usr/lib64/libcyrus_min.a)
Comment 21 Jeroen Roovers (RETIRED) gentoo-dev 2017-11-24 21:53:19 UTC
Something like this maybe. Not sure. Why don't you version your patches, btw?

files/cyrus-imapd-3.0.4-linker.patch
--- a/Makefile.am
+++ b/Makefile.am
@@ -1705,9 +1705,9 @@
        sieve/varlist.h
 sieve_libcyrus_sieve_la_LIBADD = \
     sieve/libcyrus_sieve_lex.la \
-    $(COM_ERR_LIBS) \
     lib/libcyrus_min.la \
-    lib/libcyrus.la
+    lib/libcyrus.la \
+    $(COM_ERR_LIBS)
 sieve_libcyrus_sieve_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_VISIBILITY)

 sieve_sievec_LDADD = $(LD_SIEVE_ADD)
Comment 22 Jeroen Roovers (RETIRED) gentoo-dev 2017-11-24 21:54:43 UTC
(In reply to Thomas Beutin from comment #20)
> (In reply to Jeroen Roovers from comment #19)
> > What installs /usr/lib64/libcyrus_min.a in the first place? Can we get rid
> > of it?
> 
> it's from net-mail/cyrus-imapd-2.4.18:
> 
> # equery b /usr/lib64/libcyrus_min.a
>  * Searching for /usr/lib64/libcyrus_min.a ... 
> net-mail/cyrus-imapd-2.4.18 (/usr/lib64/libcyrus_min.a)

Yes, but that's entirely beside the point: Why install a static archive that literally no one cares about and then bites back at you on the upgrade?
Comment 23 Pacho Ramos gentoo-dev 2019-06-09 11:30:46 UTC
please check with 3.0.10

Thanks