Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81605 - courier-authlib does not compile
Summary: courier-authlib does not compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Scott Taylor (RETIRED)
URL:
Whiteboard:
Keywords:
: 77160 88927 89392 92822 100888 (view as bug list)
Depends on:
Blocks: 83369
  Show dependency tree
 
Reported: 2005-02-11 04:27 UTC by Stonki
Modified: 2005-08-10 10:26 UTC (History)
12 users (show)

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


Attachments
Patch for vpopmail/cdb/Makefile (cdb_makefile.patch,135 bytes, patch)
2005-04-29 11:43 UTC, nuitari
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stonki 2005-02-11 04:27:39 UTC
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.
Comment 1 Stonki 2005-02-11 08:16:07 UTC
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=.
Comment 2 Stonki 2005-02-11 08:49:04 UTC
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.

Comment 3 Scott Taylor (RETIRED) gentoo-dev 2005-02-11 12:45:06 UTC
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.
Comment 4 Stonki 2005-02-14 00:25:07 UTC
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.

Comment 5 Guillaume Destuynder (RETIRED) gentoo-dev 2005-02-15 02:43:03 UTC
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 6 Scott Taylor (RETIRED) gentoo-dev 2005-02-15 14:01:55 UTC
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. 
Comment 7 Simon Stelling (RETIRED) gentoo-dev 2005-02-15 14:05:19 UTC
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
Comment 8 Denis Kot 2005-03-29 02:31:03 UTC
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...
Comment 9 Denis Kot 2005-03-29 10:52:06 UTC
Scott, if it can help, I can give you access to my machine so you can try everything to fix it :)
Comment 10 Jan Brinkmann (RETIRED) gentoo-dev 2005-03-31 18:21:33 UTC
*** Bug 77160 has been marked as a duplicate of this bug. ***
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-13 04:23:19 UTC
*** Bug 88927 has been marked as a duplicate of this bug. ***
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-17 03:50:24 UTC
*** Bug 89392 has been marked as a duplicate of this bug. ***
Comment 13 Jory A. Pratt 2005-04-17 11:35:29 UTC
show me vpopmail versions and I will update the ebuild to use -fPIC on the libs
Comment 14 Jory A. Pratt 2005-04-17 13:45:27 UTC
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.
Comment 15 Jory A. Pratt 2005-04-17 16:08:15 UTC
please update to vpopmail-5.4.9-r1 and try emerging courier-auth again.
Comment 16 Adrian 2005-04-17 23:15:44 UTC
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)
Comment 17 Jory A. Pratt 2005-04-18 18:19:13 UTC
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?
Comment 18 Adrian 2005-04-18 23:01:48 UTC
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
Comment 19 Jory A. Pratt 2005-04-20 17:46:07 UTC
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
Comment 20 Jory A. Pratt 2005-04-20 17:59:50 UTC
Scott with your permission would like to add a -r1 ebuild to test a possible solution to this problem.
Comment 21 Daniele Tieghi 2005-04-24 01:43:40 UTC
Same error happens to me, if I can help with some tests, tell me please :)
Comment 22 nuitari 2005-04-29 11:36:35 UTC
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.
Comment 23 nuitari 2005-04-29 11:43:57 UTC
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
Comment 24 Jory A. Pratt 2005-04-29 14:48:26 UTC
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.
Comment 25 Jory A. Pratt 2005-04-29 15:06:35 UTC
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.
Comment 26 Adrian 2005-04-30 00:49:17 UTC
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
Comment 27 Jory A. Pratt 2005-04-30 08:32:47 UTC
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.
Comment 28 Daniele Tieghi 2005-04-30 12:18:05 UTC
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!
Comment 29 Jory A. Pratt 2005-04-30 12:27:50 UTC
aight ebuild has been updated for vpopmail once again go ahead and test by first re-emerging vpopmail then courier-auth please and thanks.
Comment 30 Adrian 2005-04-30 17:51:50 UTC
works :)
Comment 31 Jory A. Pratt 2005-04-30 17:57:12 UTC
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.
Comment 32 Daniele Tieghi 2005-04-30 23:36:22 UTC
This worked also for me! Thanks! For testing, I'm new with gentoo (and linux :), but if I can help just ask me.
Comment 33 james nguyen 2005-05-02 08:08:30 UTC
works for me now after remerging vpopmail with ~amd64 and then courier-imap which depends on courier-authlib.
Comment 34 Jory A. Pratt 2005-05-09 19:32:19 UTC
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
Comment 35 isolationism 2005-05-11 12:02:34 UTC
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.
Comment 36 Jory A. Pratt 2005-05-11 23:00:33 UTC
Was that tested with USE=-amd64 tho? this is critical as if not entire package of vpopmail will be built with -fPIC support.
Comment 37 Jory A. Pratt 2005-05-16 20:13:28 UTC
*** Bug 92822 has been marked as a duplicate of this bug. ***
Comment 38 Jory A. Pratt 2005-05-25 12:06:02 UTC
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 
Comment 39 Simon Detheridge 2005-05-25 13:51:23 UTC
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. 
Comment 40 Jory A. Pratt 2005-05-25 15:52:48 UTC
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.
Comment 41 Simon Detheridge 2005-05-26 01:27:10 UTC
It works for me now. The new vpopmail installs fine, and courier-authlib and
courier-imap both compile when the new vpopmail is installed.
Comment 42 Jory A. Pratt 2005-05-26 13:54:18 UTC
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.
Comment 43 Simon Detheridge 2005-06-02 06:56:12 UTC
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.
Comment 44 Jory A. Pratt 2005-06-04 21:04:15 UTC
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.
Comment 45 Jory A. Pratt 2005-06-09 13:52:37 UTC
Scott I have successfully built courier-authlib 0.55.2005* after modifing the
Makefile I will see about modifing Makefile.am to properly build.
Comment 46 Jakub Moc (RETIRED) gentoo-dev 2005-07-31 07:55:09 UTC
*** Bug 100888 has been marked as a duplicate of this bug. ***
Comment 47 Jakub Moc (RETIRED) gentoo-dev 2005-08-10 10:26:32 UTC
*** Bug 102010 has been marked as a duplicate of this bug. ***