-fPIE -pie builds fail

Ondřej Surý ondrej at sury.org
Tue Mar 29 07:33:15 EDT 2011


The current packaging code in our git compiles ok:

http://git.debian.org/?p=pkg-cyrus-imapd/pkg-cyrus-imapd-2.4.git;a=summary

Unless I discover any problem in the package, I am going to include
this in the 2.4.6-3 upload.

O.

On Tue, Mar 29, 2011 at 12:38, Bron Gondwana <brong at fastmail.fm> wrote:
> On Tue, 29 Mar 2011 10:42:16 +0200
> Ondřej Surý <ondrej at sury.org> wrote:
>
>> Just a reply to myself. If called as --with-com_err="" it links with
>> shared library just fine and -fPIE -pie seems to compile just OK. I am
>> going to test if it runs ok...
>
> Hmm.. interesting.  We run on Squeeze 64 bit on our production machines.
> Just going to check how we're building...
>
> -g -fPIC -W -Wall -fstack-protector-all
>
> Yep, but no PIE.  And that's probably because of the com_err stuff.
>
> I'll try on my local box (Debian testing) and see what shakes out.
> Yep, same issue.  Then this:
>
> cc  -shared -O2 -g -L/usr/local/lib -fstack-protector IMAP.o  -o blib/arch/auto/Cyrus/IMAP/IMAP.so ../../lib/libcyrus.a ../../lib/libcyrus_min.a        \
>           -ldb-4.8 -lsasl2 -lz -lssl -lcrypto          \
>
> /usr/bin/ld: ../../lib/libcyrus.a(imclient.o): relocation R_X86_64_PC32 against symbol `imclient_addcallback' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
>
> which looks to me like the -fPIC and friends aren't being passed down to
> the Perl library generation.
>
> I'd love patches to fix this.  I really don't know as much as I should about
> this part of the process.
>
> Bron.
>



-- 
Ondřej Surý <ondrej at sury.org>


More information about the Cyrus-devel mailing list