Bug 195994 - lang/perl5.18: Perl dynamic linking -R/usr/local/lib/perl5/5.18/mach/CORE, unknown option to clang
Summary: lang/perl5.18: Perl dynamic linking -R/usr/local/lib/perl5/5.18/mach/CORE, un...
Status: Closed DUPLICATE of bug 196015
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hajimu UMEMOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 11:48 UTC by vladimir.nikolic
Modified: 2014-12-19 15:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vladimir.nikolic 2014-12-15 11:48:47 UTC
Hello,

perl (any version) default build, makes dynamic linking against -R/usr/local/lib/perl5/5.18/mach/CORE:

# perl -V
...
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib -fstack-protector'
...

Because of that, net-snmpd is built with:

# net-snmp-config --agent-libs
-L/usr/lib -lm -lkvm -ldevstat -lpkg -L/usr/local/lib -L/lib -L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent -lwrap -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE -lnetsnmp -lcrypto -lelf -lssp_nonshared

which causes cyrus-imapd build to fail with error:

cc: error: unknown argument: '-R/usr/local/lib/perl5/5.18/mach/CORE'
*** Error code 1

Stop.
make[3]: stopped in /var/ports/usr/ports/mail/cyrus-imapd23/work/cyrus-imapd-2.3.18/master
*** Error code 1

Stop.
make[2]: stopped in /var/ports/usr/ports/mail/cyrus-imapd23/work/cyrus-imapd-2.3.18
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/mail/cyrus-imapd23
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/cyrus-imapd23
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-12-15 18:08:43 UTC
Attempt an assignment.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2014-12-15 19:39:06 UTC
Nope, not really a perl@, the problem must be in cyrus-imapd, replacing -Wl,-R with -R, or using LDFLAGS with CC, for some strange reason.
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2014-12-15 19:40:18 UTC
Well, cyrus, or net-snmp
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2014-12-15 19:42:21 UTC
Also, the ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE' in Perl has been there since before the dinosaurs, it was already there in Perl 5.8:

# perl -V:ccdlflags
ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.8.9/mach/CORE';
Comment 5 vladimir.nikolic 2014-12-15 21:09:25 UTC
"Also, the ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE' in Perl has been there since before the dinosaurs, it was already there in Perl 5.8:"

So as gcc, but now there is clang and these ccdlfags are unusable.

Regards
Comment 6 Mathieu Arnold freebsd_committer freebsd_triage 2014-12-15 22:15:21 UTC
(In reply to vladimir.nikolic from comment #5)
> "Also, the ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.18/mach/CORE' in Perl
> has been there since before the dinosaurs, it was already there in Perl 5.8:"
> 
> So as gcc, but now there is clang and these ccdlfags are unusable.
> 
> Regards

Well, Perl sets "-Wl,-R/usr/local/lib/perl5/5.18/mach/CORE" not "-R/usr/local/lib/perl5/5.18/mach/CORE".  If the -Wl, got dropped somewhere, it's not Perl's fault.
Comment 7 vladimir.nikolic 2014-12-16 08:29:46 UTC
Ok, thank you.

Regards
Comment 8 Mathieu Arnold freebsd_committer freebsd_triage 2014-12-19 14:27:16 UTC
(In reply to vladimir.nikolic from comment #7)
> Ok, thank you.
> 
> Regards

Though, I'm wondering exactly why cyrus imapd fails to build, I've had net-snmp with Perl, and cyrus-imapd with snmp built for years.

Could you post the options with which perl, net-snmp and cyrus-imapd are built ?
Comment 9 Hajimu UMEMOTO freebsd_committer freebsd_triage 2014-12-19 15:00:12 UTC
It should be fixed now.  Please refer PR 196015.

*** This bug has been marked as a duplicate of bug 196015 ***