#30032 closed defect (fixed)
perl @5.8.9 build failure on Lion - toke.c fails to compile
Reported by: | jpr5@… | Owned by: | ghosthound |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | lion mountainlion | Cc: | boo@…, tmandry@…, mfisher@…, st+macports@…, angleto@…, jcmdev0@…, fyu+macports@…, whcordis@…, jasper@… |
Port: | perl5.8 |
Description
Perl 5.8.9 fails to build on OSX 10.7 Build 11A511 (Gold Master).
Specifically, it chokes on building toke.c
. Off the cuff, it doesn't appear to be a Portfile issue.
Build log snippet:
:info:build `sh cflags "optimize='-O3'" toke.o` toke.c :info:build CCCMD = /Developer/usr/bin/llvm-gcc-4.2 -DPERL_CORE -c -pipe -O2 -arch x86_64 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -I/opt/local/include -std=c89 -O3 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -DPERL_GCC_PEDANTIC :info:build toke.c:1997:1: warning: use of C99 long long integer constant :info:build toke.c: In function 'Perl_yylex': :info:build toke.c:5516: error: lvalue required as unary '&' operand :info:build toke.c:5516: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_pending_ident': :info:build toke.c:5755: error: lvalue required as unary '&' operand :info:build toke.c:5755: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_scan_heredoc': :info:build toke.c:9785: error: invalid operands to binary + (have 'char *' and 'char *') :info:build toke.c:9785: error: lvalue required as unary '&' operand :info:build toke.c:9785: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_scan_formline': :info:build toke.c:10814: error: invalid operands to binary + (have 'char *' and 'char *') :info:build toke.c:10814: error: lvalue required as unary '&' operand :info:build toke.c:10814: error: lvalue required as unary '&' operand :info:build make: *** [toke.o] Error 1
os: Darwin rapture.local 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64
gcc: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
Attachments (2)
Change History (32)
comment:1 Changed 13 years ago by jmroot (Joshua Root)
Cc: | ricci@… openmaintainer@… removed |
---|---|
Keywords: | perl 5.8.9 toke.c removed |
Owner: | changed from macports-tickets@… to ricci@… |
comment:2 Changed 13 years ago by avtargill@…
I can't build perl5.8 either. I have OS X 10.7, Xcode 4.1 and MacPorts 2.0.0 rc1 installed. MacPorts installed using this dmg: http://distfiles.macports.org/MacPorts/testing/MacPorts-2.0.0-rc1-10.7-Lion.dmg
$ uname -a Darwin charles.local 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64
Entire build log attached but here's a snippet:
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5.8/perl5.8/work/perl-5.8.9' :info:build `sh cflags "optimize='-O3'" toke.o` toke.c :info:build `sh cflags "optimize='-O3'" perly.o` perly.c :info:build CCCMD = /Developer/usr/bin/llvm-gcc-4.2 -DPERL_CORE -c -pipe -O2 -arch x86_64 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -I/opt/local/include -std=c89 -O3 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -DPERL_GCC_PEDANTIC :info:build CCCMD = /Developer/usr/bin/llvm-gcc-4.2 -DPERL_CORE -c -pipe -O2 -arch x86_64 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -I/opt/local/include -std=c89 -O3 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -DPERL_GCC_PEDANTIC :info:build toke.c:1997:1: warning: use of C99 long long integer constant :info:build toke.c: In function 'Perl_yylex': :info:build toke.c:5516: error: lvalue required as unary '&' operand :info:build toke.c:5516: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_pending_ident': :info:build toke.c:5755: error: lvalue required as unary '&' operand :info:build toke.c:5755: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_scan_heredoc': :info:build toke.c:9785: error: invalid operands to binary + (have 'char *' and 'char *') :info:build toke.c:9785: error: lvalue required as unary '&' operand :info:build toke.c:9785: error: lvalue required as unary '&' operand :info:build toke.c: In function 'S_scan_formline': :info:build toke.c:10814: error: invalid operands to binary + (have 'char *' and 'char *') :info:build toke.c:10814: error: lvalue required as unary '&' operand :info:build toke.c:10814: error: lvalue required as unary '&' operand :info:build make: *** [toke.o] Error 1 :info:build make: *** Waiting for unfinished jobs.... :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5.8/perl5.8/work/perl-5.8.9' :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5.8/perl5.8/work/perl-5.8.9" && /usr/bin/make -j2 -w all " returned error 2
comment:4 Changed 13 years ago by jmroot (Joshua Root)
Interestingly enough, this looks like the same error as in #20027.
comment:7 Changed 13 years ago by tmandry@…
Same issue here, on OSX 10.7 release. I selfupdated MacPorts to 2.0 after installing Lion, then got this. For the record perl5.10 works.
Changed 13 years ago by jcmdev0@…
Attachment: | patch-Configure-libc.diff added |
---|
Make configure inspect the libc dependencies for symbol names.
comment:12 follow-up: 14 Changed 13 years ago by jcmdev0@…
It looks like the perl Configure script checks for libc functions by doing a symbol dump on libc.dylib. This doesn't work on Lion because they decided to split the functionality of libc into separate dynamic libraries (/usr/lib/system/libsystem_c.dylib, /usr/lib/system/libsystem_kernel.dylib, ...). This means that all of the symbol lookups fail and perl starts trying to use all of it's internal versions of many functions. Because most people on most systems wouldn't actually be using the perl implementations, they aren't compatible with modern compilers. To fix this, I made a little hack to the Configure script to pull in the libc.dylib dependencies to be included in the symbol lookup query.
If you drop the patch in /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.8/files (or equivalent) and add patch-Configure-libc.diff to the patchfiles line in /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.8/Portfile, then a "port clean perl5.8; port install perl5.8' will hopefully work.
comment:14 Changed 13 years ago by angleto@…
Replying to jcmdev0@…:
I tried the patch and it works on mac os X 10.7. thanks.
comment:15 Changed 13 years ago by avtargill@…
Thanks. I was able to build perl5.8 without any issues using this patch.
comment:17 follow-up: 20 Changed 13 years ago by jmroot (Joshua Root)
comment:21 follow-ups: 22 27 Changed 12 years ago by micah.bucy@…
Need to additionally patch for mountain lion too, which is darwin 12
comment:22 Changed 12 years ago by jasper@…
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to micah.bucy@…:
Need to additionally patch for mountain lion too, which is darwin 12
I can confirm running port upgrade outdated fails on Mountain Lion because of this same issue.
comment:27 follow-up: 28 Changed 12 years ago by philippe.lang@…
Replying to micah.bucy@…:
Need to additionally patch for mountain lion too, which is darwin 12
Just to make things clear: the patch is still necessary under Mountain Lion / XCode 4.4, but works like a charm.
comment:28 Changed 12 years ago by eric.lebihen@…
Replying to philippe.lang@…:
Replying to micah.bucy@…:
Need to additionally patch for mountain lion too, which is darwin 12
Just to make things clear: the patch is still necessary under Mountain Lion / XCode 4.4, but works like a charm.
Confirmed.
It is maybe worth mentioning that the patch should go under the /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.8/files folder and the filename appended to the Portfile file in the patchfiles list entry
comment:29 Changed 12 years ago by neverpanic (Clemens Lang)
Keywords: | mountainlion added |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in r96453.
comment:30 Changed 12 years ago by jasper@…
Fixe worked, just updated without adding patches myself.
As per the ticket guidelines, it's not useful to cc openmantainer.
You should really install from the release_2_0 branch on 10.7. There will be a few issues with 1.9.2 (though it does more or less work).