[MacPorts] #46018: p5.18-moose @2.140.200 is not UsingTheRightCompiler (perl 5.18 configuration error?) (was: p5.18-moose @2.140.200 is not UsingTheRightCompiler)

MacPorts noreply at macports.org
Mon Dec 1 09:22:20 PST 2014


#46018: p5.18-moose @2.140.200 is not UsingTheRightCompiler (perl 5.18
configuration error?)
--------------------------------+--------------------------------
  Reporter:  ryandesign@…       |      Owner:  macports-tickets@…
      Type:  defect             |     Status:  new
  Priority:  Normal             |  Milestone:
 Component:  ports              |    Version:  2.3.99
Resolution:                     |   Keywords:
      Port:  p5-moose perl5.18  |
--------------------------------+--------------------------------
Changes (by devans@…):

 * cc: emer@… (added)
 * port:  p5-moose => p5-moose perl5.18


Comment:

 I took a look at this over the weekend and I think I see the problem but
 not how to fix it.

 As implied in the title of this ticket, the problem only occurs with
 p5.18-moose and not the other perl subports.  I believe this is due to a
 configuration error in perl5.18 itself so the problem could be more
 pervasive.

 The reported error is occurring during configure -- the build phase uses
 the correct compiler.

 During configure, Moose's Makefile.PL makes the following call to
 determine if a suitable compiler is available
 {{{
 ExtUtils::CBuilder->new( quiet => 1 )->have_compiler;
 }}}

 ExtUtils::CBuilder performs the check by actually compiling a simple test
 library in a two step process, first compiling, then linking.  The
 compiler and linker are taken from

 {{{
 $Config{cc} and $Config{ld}
 }}}

 The compilation works but the linking fails (using your test
 configuration) due an inappropriate value for
 {{{
 $Config{ld}.
 }}}


 For perl5.18 running on Mavericks the corresponding values are
 {{{
 $ perl5.18 -V:cc -V:ld
 cc='/usr/bin/clang';
 ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc';
 }}}

 For perl5.16 running on Mavericks the corresponding values are
 {{{
 $ perl5.16 -V:cc -V:ld
 cc='/usr/bin/clang';
 ld='env MACOSX_DEPLOYMENT_TARGET=10.3 /usr/bin/clang';
 }}}

 Results for the other perl versions are similar to
 the perl5.16 case.

 The solution appears to be to review perl5.18's configuration and fix the
 value of ld to use the same binary as cc.  It's not obvious to me at the
 moment how to do that. The MACOSX_DEPLOYMENT_TARGET seems inappropriate as
 well but I would leave that to someone with more knowledge about the
 various perl ports.

 As an aside, I note that the use of 'ld' instead of 'cc' for linking the
 test case in ExtUtils::CBuilder has been called into question in upstream
 upstream [https://rt.perl.org/Public/Bug/Display.html?id=121017 Bug
 #121017].

 CCing maintainer of perl5.18.

-- 
Ticket URL: <https://trac.macports.org/ticket/46018#comment:1>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list