Re: [exim] perl support broken in exim v4.50_1 on FreeBSD v4…

Pàgina inicial
Delete this message
Reply to this message
Autor: exim-users
Data:  
A: Kirill Ponomarew
CC: Exim-users
Assumpte: Re: [exim] perl support broken in exim v4.50_1 on FreeBSD v4.11
Kirill Ponomarew schrieb:
> On Wed, Mar 23, 2005 at 05:50:37PM +0100, Patrick Eisenacher wrote:
>
>>if I remember correctly, this was the order:
>>- upgrade FreeBSD v4.10 -> v4.11
>>- upgrade perl v5.8.5 -> v5.8.6 (including rebuild of all dependent ports)
>>- upgrade exim v4.44 -> v4.50
>>
>>Every step worked except the last one.
>
>
> Somehow I suspect that some perl dependent ports were not updated
> though. I just did a fresh build on 4.x with perl5.8.6 and it
> works, did you update your ports according to ports/UPDATING ?


Hi Kirill,

Yes, I updated them accordingly.

In the meantime, I managed to build exim successfully. The culprit were
the addition of LDFLAGS to the exim v4.50 Makefile.

The LDFLAGS weren't in the Makefile for exim v4.44. It seems they are
used now to compile in experimental features via Local/Makefile.

On FreeBSD they are set to "-rpath=/usr/lib:/usr/local/lib" by default
in /usr/ports/Mk/bsd.openssl.mk to switch between the base system's and
a port's openssl library. This is pulled in to the exim build via
FreeBSD's Makefile's USE_OPENSSL=yes.

Compiling exim with perl support writes PERL_LIBS into the exim Makefile
via scripts/Configure-Makefile.

PERL_LIBS= -Wl,-R/usr/local/lib/perl5/5.8.6/mach/CORE -Wl,-E
-L/usr/local/lib
/usr/local/lib/perl5/5.8.6/mach/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/5.8.6/mach/CORE -lperl -lm -lcrypt -lutil

According to the ld manpage -Wl,-R/usr/local/lib/perl5/5.8.6/mach/CORE
should be converted to -rpath=/usr/local/lib/perl5/5.8.6/mach/CORE and
all -rpath arguments should be concatenated. But this either doesn't
happen or the path of -Wl,-R is always added to the end of all -rpath
arguments.

Changing -Wl,-R to -rpath solved the problem and exim loads the correct
perl library. But since PERL_LIBS get generated by perl's ExtUtils
module itself, this doesn't seem to be an option.

Having discovered the meaning of LDFLAGS, I think their absence in
former versions was a bug, that just luckily never showed up, but would
have shown in the same way as we see it now with perl.

Ok, I put this thread back onto the mailing list. I hope Philip and you
have enough information now to sort out the problem. Perhaps this is
even a shortcoming in FreeBSD's ld implementation? Perhaps perl's
ExtUtils can be convinced to spit out an -rpath instead of -Wl,-R. I dunno.

I guess other OS that use LDFLAGS to switch between a base system's
openssl and an updated port openssl are similarly affected.

Cheers,
Patrick