emerge courier-authlib does not compile/emerge. I think the problem has to do with a new vpopmail version that I have to use due to some AMD64 problems. See: http://bugs.gentoo.org/show_bug.cgi?id=75911 here is the log: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/l d: /var/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /var/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value Reproducible: Always Steps to Reproduce: 1. emerge courier-authlib 2. 3. Actual Results: see above Expected Results: clean emerge Compiling authtest.c Compiling authenumerate.c CONFIG_FILES=authlib.3 CONFIG_HEADERS= /bin/sh ./config.status Linking libcourierauth.la config.status: creating authlib.3 config.status: executing depfiles commands Linking libcourierauthsasl.la Linking libcourierauthsaslclient.la Linking libcourierauthcommon.la Linking courierauthconfig Linking authmksock Linking authtest Linking authenumerate Linking libauthuserdb.la Linking libauthpam.la Linking libauthshadow.la Linking libauthcustom.la Linking libauthvchkpw.la Linking authdaemontest /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/l d: /var/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /var/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53' make: *** [all] Error 2 !!! ERROR: net-libs/courier-authlib-0.53 failed. !!! Function src_compile, Line 98, Exitcode 2 !!! Compile problem !!! If you need support, post the topmost build error, NOT this status message.
the configure line: hare' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib' '--sysconfdir=/etc/courier' '--datadir=/usr/share/courier' '--libexecdir=/usr/lib/courier' '--localstatedir=/var/lib/courier' '--sharedstatedir=/var/lib/courier/com' '--with-authdaemonvar=/var/lib/courier/authdaemon' '--with-authshadow' '--without-redhat' '--with-mailuser=mail' '--with-mailgroup=mail' '--cache-file=/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53/configuring.cache' '--with-authpam' '--without-authldap' '--with-db=db' '--with-authvchkpw' '--without-authmysql' '--without-authpgsql' 'CFLAGS=-O2' 'CXXFLAGS=-O2' 'host_alias=x86_64-pc-linux-gnu' --enable-ltdl-install=no --with-db=db --with-makedatprog=/usr/lib/courier/courier-authlib/makedatprog '--with-userdb=/etc/courier/authlib/userdb' --cache-file=/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53/configuring.cache --srcdir=.
ok, from the courier mailinglist: courier-authlibs needs vpopmail to be recompiled with "-fPIC". ok, no problem. I recompiled vpopmail with this flag, but now courier-authlib is stopping at the next step, and now I really stucked: inking libauthshadow.la Linking libauthcustom.la Linking libauthvchkpw.la /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(cdb_seek.o): relocation R_X86_64_PC32 against `read@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.53/work/courier-authlib-0.53' make: *** [all] Error 2 !!! ERROR: net-libs/courier-authlib-0.53 failed. !!! Function src_compile, Line 98, Exitcode 2 !!! Compile problem !!! If you need support, post the topmost build error, NOT this status message.
that other ebuild, if its the final attachment in the referenced bug, does not appear to have all the 64-bit magic of replacing all /usr/bin entries with /usr/$(get_libdir) and perhaps this build needs to explicitly define more paths in that way as well, though i don't have an amd64 to test this on.
I can confirm, that authlib is working fine on a X86 box. I did a similar setup saturday on a dual xeon box and emerge courier 4.x, which also requires authlib. On this platform the compilation went fine (brand new Stage 3 installation). So, it seems to be either AMD64 related or the vpopmail package (well its not even unstable, its highly alpha *G*) is not ok.
I can't compile it either: Linking libauthmysql.la Linking libauthcustom.la /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-Wl' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status make[2]: *** [libauthmysql.la] Error 1 i do not set ldflags in make.conf or anywhere, its in the makefiles. i use hardened gcc 3.3.5 which adds ssp/pie
comment #5 - your issue is not this, its bug 41508. looks like junk got inherited from a mysql config. -Wl,(anything) does not belong in any LDFLAGS. Ever. and amd64 folks, not sure what I can do for you. sounds like adding -fPIC to the CFLAGS of the vpopmail build might help.
yup, but sticking -fPIC into CFLAGS is a bad idea, it should only be applied to shared libraries. fixing the makefile would be the best way
have same problem with amd64: Linking libauthpipe.la /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(cdb_seek.o): relocation R_X86_64_PC32 against `read@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.55.20050320/work/courier-authlib-0.55.20050320' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.55.20050320/work/courier-authlib-0.55.20050320' make: *** [all] Error 2 !!! ERROR: net-libs/courier-authlib-0.55.20050320 failed. !!! Function src_compile, Line 101, Exitcode 2 !!! Compile problem !!! If you need support, post the topmost build error, NOT this status message. (I know it's courier-authlib-0.55.20050320 but with courier-authlib-0.55 same error) recompile vpopmail with -fPIC didn't help...
Scott, if it can help, I can give you access to my machine so you can try everything to fix it :)
*** Bug 77160 has been marked as a duplicate of this bug. ***
*** Bug 88927 has been marked as a duplicate of this bug. ***
*** Bug 89392 has been marked as a duplicate of this bug. ***
show me vpopmail versions and I will update the ebuild to use -fPIC on the libs
Well I been speaking with upsteam on vpopmail+courier-auth in order to make this work we gonna have to use both -fPIC in both ebuilds which is open for discussion before I do anything with vpopmail.
please update to vpopmail-5.4.9-r1 and try emerging courier-auth again.
when using the fPIC-vpopmail: Linking authdaemontest /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(cdb_seek.o): relocation R_X86_64_PC32 against `read@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make: *** [all] Error 2 !!! ERROR: net-libs/courier-authlib-0.55 failed. !!! Function src_compile, Line 100, Exitcode 2 !!! Compile problem !!! If you need support, post the topmost build error, NOT this status message. i also think it should check for amd64 instead of x86_64 since emerge complains about x86_64 not being in IUSE (and it's also not in use.desc or any other ebuild)
ebuild has been updated for amd64 use flag sorry about that but as you can see still no go. Has anyone tried to compile courier-authlib with -fPIC support after compiling vpopmail-5.4.9-r1?
CFLAGS="-O2 -pipe -fPIC" emerge courier-authlib [...] Linking authdaemontest /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(cdb_seek.o): relocation R_X86_64_PC32 against `read@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make: *** [all] Error 2
https://www.redhat.com/archives/amd64-list/2005-April/msg00001.html <p> as you can see we are not only distro fighting with this at moment hopefully something will show up soon I will keep looking
Scott with your permission would like to add a -r1 ebuild to test a possible solution to this problem.
Same error happens to me, if I can help with some tests, tell me please :)
I managed to fix it on my system. In vpopmail-5.4.9/cdb/Makefile There is the compile: target to create a small wrapper to compile about 6 files from cdb, including cdb_seek.c CFLAGS are NOT used to create the compile script and so -fPIC doesn't actually get to where it is needed. The fix is to add -fPIC before -c I'll upload a diff against that Makefile, I don't know how to make it into the proper format. To test it you can halt when it is configuring as the Makefile is not replaced. It is the first thing to run after the configure stage. Honestly, I don't know why it is like that, I guess it has just been copied as-is from the ucspi-tcp ones as it doesn't provide any librairies. A better way would be to provide a replacement to the Makefile.
Created attachment 57594 [details, diff] Patch for vpopmail/cdb/Makefile I don't actually know how to submit a patch properly in the right format. Maybe one of the developpers might take this one and make it proper. It acts on the vpopmail-5.4.9/cdb/Makefile
I will get this added into vpopmail in just a while then we will need some testing ... this will also remove full -fPIC from vpopmail for amd64 users. If your would like to be included in the test let me know as soon as possible.
alright it is added to the tree feel free to reemerge vpopmail then try courier-authlib if it works let us know so we can close this bug.
i used the patch+updated ebuild from cvs since it's not on the portage mirrors yet, but it doesn't work: Linking authdaemontest /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /var/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libauthvchkpw.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.55/work/courier-authlib-0.55' make: *** [all] Error 2
will rework ebuild when I get home from school if someone will be more then willing to dedicate use of a 64 machine I will be more than willing to get this worked out tonight. We will most likely have to go ahead and add -fPIC support for the entire vpopmail package will try with libs first.
re-emerged now with updated portage tree, and got error of Adrian: Linking authdaemontest /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /var/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value collect2: ld returned 1 exit status Tonight I'll look here sometimes to see if I can help!
aight ebuild has been updated for vpopmail once again go ahead and test by first re-emerging vpopmail then courier-auth please and thanks.
works :)
aight this is just a temporary fix we will be working on nothing but using -fPIC on the libs which will need testing so if you would like to be a volunteer to do the testing let us know thanks.
This worked also for me! Thanks! For testing, I'm new with gentoo (and linux :), but if I can help just ask me.
works for me now after remerging vpopmail with ~amd64 and then courier-imap which depends on courier-authlib.
I have add vpopmail-5.5.0 to tree it is p.masked as of right now if someone would be willing to test with USE=-amd64 then recompile courier-authlib it would be much appreciated ... if all is a success I will get it unmasked as soon as possible for ~amd64
I tried out Jory's new vpopmail-5.5.0 ebuild after commenting the package mask; it compiled fine and courier-authlib also finally compiles for me now. In short, seems to be resolved for me -- recommend you get another couple confirmations then unmask for ~amd64.
Was that tested with USE=-amd64 tho? this is critical as if not entire package of vpopmail will be built with -fPIC support.
*** Bug 92822 has been marked as a duplicate of this bug. ***
Alright I have add pure support for lib only with -fPIC this should solve all problems it is 5.4.9-r2 that needs to be tested if someone can test it and also recompile courier-authlib would be much appreciated .... Do NOT for get to let us know how it goes. Thank You
It doesn't work on my em64t box. This is the first time I've tried anything as I've only just installed the machine and discovered this bug. I tried emerging the new 5.4.9-r2, and the following happened: cd . && /bin/sh /var/tmp/portage/vpopmail-5.4.9-r2/work/vpopmail-5.4.9/missing --run aclocal cd . && \ /bin/sh /var/tmp/portage/vpopmail-5.4.9-r2/work/vpopmail-5.4.9/missing --run automake --foreign Makefile cd . && /bin/sh /var/tmp/portage/vpopmail-5.4.9-r2/work/vpopmail-5.4.9/missing --run autoconf Makefile.am: required file `./compile' not found make: *** [Makefile.in] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: net-mail/vpopmail-5.4.9-r2 failed. !!! Function src_compile, Line 127, Exitcode 2 !!! Make failed. !!! If you need support, post the topmost build error, NOT this status message.
I apoligize about that I forgot to tell it to copy the compile file from automake-1.6 this is fixed in CVS tree as soon as mirrors update once again please try once again I did *NOT* rename ebuild as this is a minor fix to something already broken.
It works for me now. The new vpopmail installs fine, and courier-authlib and courier-imap both compile when the new vpopmail is installed.
Sooner I get more confirmation that vpopmail-5.4.9-r2 is working as expected I will get it keyworded and unmasked for all to use until then I am stuck waiting on users with amd64 to test and report back.
Seeing as nobody else has chimed in... I am now running this in a production environment on a medium-sized network, and there are no problems.
Scott I am gonna go ahead and close this for now I have fixed vpopmail to compile libs and cdb/* with -fPIC and will be in upstream soon enough so amd64 is all set as far as initial compile goes now. If problem should arise anyone can file a new bug or email me and we can re-open this one does not matter to me.
Scott I have successfully built courier-authlib 0.55.2005* after modifing the Makefile I will see about modifing Makefile.am to properly build.
*** Bug 100888 has been marked as a duplicate of this bug. ***
*** Bug 102010 has been marked as a duplicate of this bug. ***