Opened 10 years ago
Closed 10 years ago
#46018 closed defect (fixed)
p5.18-moose @2.140.200 is not UsingTheRightCompiler (perl 5.18 configuration error?)
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.99 |
Keywords: | Cc: | dbevans (David B. Evans), markemer (Mark Anderson), larryv (Lawrence Velázquez) | |
Port: | p5-moose perl5.18 |
Description
p5.18-moose is not UsingTheRightCompiler:
---> Configuring p5.18-moose DEBUG: Using compiler 'Xcode Clang' DEBUG: Can't run configure ccache on this port without elevated privileges. Escalating privileges back to root. DEBUG: euid changed to: 0. egid changed to: 0. DEBUG: changing euid/egid - current euid: 0 - current egid: 0 DEBUG: egid changed to: 528 DEBUG: euid changed to: 501 DEBUG: Executing org.macports.configure (p5.18-moose) DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_perl_p5-moose/p5.18-moose/work/Moose-2.1402" && /opt/local/bin/perl5.18 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang"' DEBUG: Executing command line: cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_perl_p5-moose/p5.18-moose/work/Moose-2.1402" && /opt/local/bin/perl5.18 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang" cc -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector -o compilet-UCe9k.bundle compilet-UCe9k.o cc: Error: You should be using ${configure.cc} See https://trac.macports.org/wiki/UsingTheRightCompiler
Change History (3)
comment:1 Changed 10 years ago by dbevans (David B. Evans)
Cc: | emer@… added |
---|---|
Port: | perl5.18 added |
Summary: | p5.18-moose @2.140.200 is not UsingTheRightCompiler → p5.18-moose @2.140.200 is not UsingTheRightCompiler (perl 5.18 configuration error?) |
comment:2 Changed 10 years ago by dbevans (David B. Evans)
Problem remains after upgrade of perl5.18 to 5.18.4.
comment:3 Changed 10 years ago by dbevans (David B. Evans)
Cc: | larryv@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
perl5.18 Config(ld) fix committed by larryv in r131326.
perl5.18 now returns
perl5.18 -V:cc -V:ld cc='/usr/bin/clang'; ld='env MACOSX_DEPLOYMENT_TARGET=10.9 /usr/bin/clang';
and p5.18-moose links Moose.bundle using the right compiler
/usr/bin/clang -L/opt/local/lib -Wl,-headerpad_max_install_names -bundle -undefined dynamic_lookup -fstack-protector xs/Attribute.o xs/AttributeCore.o xs/Class.o xs/Generated.o xs/HasAttributes.o xs/HasMethods.o xs/Inlined.o xs/Instance.o xs/Method.o xs/Moose.o xs/MOP.o xs/Package.o xs/ToInstance.o mop.o -arch x86_64 -o blib/arch/auto/Moose/Moose.bundle \
Note: See
TracTickets for help on using
tickets.
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 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
The compilation works but the linking fails (using your test configuration) due an inappropriate value for
For perl5.18 running on Mavericks the corresponding values are
For perl5.16 running on Mavericks the corresponding values are
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 Perl Bug #121017.
CCing maintainer of perl5.18.