Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51980 closed defect (fixed)

perl5: build fails on Sierra (library not found for -lgcc_s.10.4)

Reported by: cdhanks@… Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: sierra Cc: ryandesign (Ryan Schmidt), dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia), jasonw@…, david@…, kode54 (Christopher Snowhill), fritz.ganter@…, jrevah@…, hofione@…, jberry@…, summers@…, mkae (Marko Käning), roberthuston@…, szhorvat (Szabolcs Horvát), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), ridethecliche@…, larryv (Lawrence Velázquez)
Port: perl5 perl5.16 perl5.18 perl5.20 perl5.22

Description

Greetings. Running a fresh installation of macOS Sierra 10.12 (16A270f), as an authorized developer. I am running into an issue with attempting to build wget from source via macports. Macports has been cleaned, removed, and reinstalled with the same outcome. Xcode-beta 4 (8S188o) is installed with developer command-line tools.

Here is the error from the shell:

Updating 'mktables.lst'
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.22/work/perl-5.22.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.22/work/perl-5.22.2" && /usr/bin/make -j8 -w all 
Exit code: 2
Error: org.macports.build for port perl5.22 returned: command execution failed
Warning: targets not executed for perl5.22: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Failed to install perl5.22
Please see the log file for port perl5.22 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.22/main.log
Error: The following dependencies were not installed: gnutls curl-ca-bundle perl5 perl5.22 gmp libidn libtasn1 libtool nettle p11-kit desktop-file-utils glib2 libffi pcre bzip2 libedit zlib pkgconfig popt libxslt libxml2
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port wget failed

Attached is the log file with more output of the error. Any other port that has perl5.22 as a dependency will fail to install as well.

Attachments (4)

main.log (140.5 KB) - added by cdhanks@… 4 years ago.
perl5-rebuilds.diff (46.8 KB) - added by mojca (Mojca Miklavec) 4 years ago.
A patch for zillion things, but one of them should fix a build error of 5.22 on Sierra
patches-for-perl.tar.gz (2.7 KB) - added by mojca (Mojca Miklavec) 4 years ago.
a set of patches for perl5
perl5.diff (5.1 KB) - added by mojca (Mojca Miklavec) 4 years ago.
Fix for perl5.16-5.20 for Sierra + various other fixes

Download all attachments as: .zip

Change History (59)

Changed 4 years ago by cdhanks@…

Attachment: main.log added

comment:1 Changed 4 years ago by dbevans (David B. Evans)

Cc: devans@… added
Keywords: wget perl5.22 removed
Owner: changed from macports-tickets@… to mojca@…
Summary: wget @ 1.18 +perl5.22 error - build failureperl5.22: build fails on Sierra while installing wget @ 1.18 +perl5.22
Version: 2.3.4

Does perl5.24 also fail?

comment:2 in reply to:  1 Changed 4 years ago by cdhanks@…

Replying to devans@…:

Does perl5.24 also fail?

Yes, it appears that it also fails. Error output from the shell appears to be nearly identical:

Updating 'mktables.lst'
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.24/work/perl-5.24.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.24/work/perl-5.24.0" && /usr/bin/make -j8 -w all 
Exit code: 2
Error: org.macports.build for port perl5.24 returned: command execution failed
Warning: targets not executed for perl5.24: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port perl5.24 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_perl5/perl5.24/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port perl5.24 failed

comment:3 Changed 4 years ago by dbevans (David B. Evans)

From your log file, this appears to be the relevant error:

:info:build env MACOSX_DEPLOYMENT_TARGET=10.3 /usr/bin/clang -o libperl.dylib -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -fstack-protector-strong -dynamiclib                             -compatibility_version                            5.22.0                       -current_version                           5.22.2                       -install_name /opt/local/lib/perl5/5.22/darwin-thread-multi-2level/CORE/libperl.dylib op.o perl.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o   DynaLoader.o -lpthread -ldl -lm -lutil -lc
1569	:info:build ld: library not found for -lgcc_s.10.4
1570	:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like upstream hasn't made allowance for the possibility of a 10.12 target.

comment:4 Changed 4 years ago by mojca (Mojca Miklavec)

Cc: jeremyhu@… added

comment:5 Changed 4 years ago by mojca (Mojca Miklavec)

Port: perl5 perl5.22 perl5.24 added; wget removed
Summary: perl5.22: build fails on Sierra while installing wget @ 1.18 +perl5.22perl5: build fails on Sierra (library not found for -lgcc_s.10.4)

comment:6 Changed 4 years ago by jasonw@…

Cc: jasonw@… added

Cc Me!

comment:7 Changed 4 years ago by david@…

Hi,

I got Perl5.22 to build on macOS Sierra using the patch "0001-OS-X-versioning-dance.patch" by Jarkko Hietaniemi instead of the fix-ld-modification.patch referenced in the Portfile.

https://rt.perl.org/Public/Bug/Display.html?id=126360#txn-1370987

comment:8 Changed 4 years ago by david@…

Cc: david@… added

Cc Me!

comment:9 Changed 4 years ago by mojca (Mojca Miklavec)

Thanks a lot for the feedback.

I would prefer to get some opinion from Jeremy or to see this fixed upstream, but if none of that happens, I'll apply that patch just for Sierra.

comment:10 Changed 4 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: newclosed

libgcc_s.10.4.dylib was accidentally missing from the CommandLineTools package in Xcode 8.

As a workaround, you can create a symlink to libgcc_s.10.5.dylib (sudo ln -s libgcc_s.10.5.dylib /usr/lib/libgcc_s.10.4.dylib). This will require SIP to be disabled.

comment:11 Changed 4 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: closedreopened

Although ... why is the deployment target set so low in the first place. It would be good to use this ticket to set an appropriate deployment target.

comment:12 in reply to:  11 Changed 4 years ago by danielluke (Daniel J. Luke)

Replying to jeremyhu@…:

Although ... why is the deployment target set so low in the first place. It would be good to use this ticket to set an appropriate deployment target.

Upstream does this, and has been doing it for long enough that I think they're afraid of changing it and breaking something. We should encourage them to build in a more sane manner.

comment:13 Changed 4 years ago by jeremyhu (Jeremy Huddleston Sequoia)

The upstream patch (https://rt.perl.org/Public/Bug/Display.html?id=126360#txn-1370987) looks good to me. I'd suggest bringing it back to all supported perl versions and revbumping.

The change will cause us to make use of more modern implementations (UNIX 2008 compliant, 64bit inodes, etc) of some system functions rather than falling back on the older versions that existed in the ancient past.

comment:14 Changed 4 years ago by mojca (Mojca Miklavec)

Thank you.

The patch has already been applied upstream. I didn't closely investigate, but the patch is part of release candidate for the next perl 5.24, not for the 5.22 though. And they are still using DEVELOPMENT_TARGET at some places ...

I assume that RC will be out pretty soon, so maybe wait for the release of 5.24.1 and add the patch to other versions at the same time.

comment:15 Changed 4 years ago by larryv (Lawrence Velázquez)

Cc: chris@… added

Has duplicate #52042.

comment:16 Changed 4 years ago by mojca (Mojca Miklavec)

Cc: fritz.ganter@… added

The report about failure of 5.22 in #52012 was also this problem.

comment:17 Changed 4 years ago by mojca (Mojca Miklavec)

Port: perl5.16 perl5.18 perl5.20 added; perl5.24 removed

I'll certainly backport the patch to at least version 5.22. It's unclear to me whether I should also fix older versions or whether I should remove them (#50512). It's the same problem as with python 2.4/2.5 etc.

I also opened another upstream request to backport the fix to perl 5.22. (5.21.3 is at RC3) at https://rt.perl.org/Ticket/Display.html?id=128980

Last edited 4 years ago by mojca (Mojca Miklavec) (previous) (diff)

Changed 4 years ago by mojca (Mojca Miklavec)

Attachment: perl5-rebuilds.diff added

A patch for zillion things, but one of them should fix a build error of 5.22 on Sierra

comment:18 Changed 4 years ago by platipodium (Carsten Lemmen)

Cc: carsten.lemmen@… added

Cc Me!

comment:19 Changed 4 years ago by platipodium (Carsten Lemmen)

Cc: carsten.lemmen@… removed

Cc Me!

comment:20 Changed 4 years ago by platipodium (Carsten Lemmen)

Cc: carsten.lemmen@… added

Cc Me!

comment:21 Changed 4 years ago by platipodium (Carsten Lemmen)

Cc: carsten.lemmen@… removed

Cc Me!

comment:22 Changed 4 years ago by mojca (Mojca Miklavec)

I attached a patch that increases the revision of all perl versions (other than 5.24) and:

  • removes the 10.3 target
    • this should fix the build problem on Sierra
    • I don't know whether we still need to add {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"}
  • changes location of perl5.16
  • uses -Dcppflags="$CPPFLAGS" instead of -Acppflags="$CPPFLAGS"
  • removes fix-ld-modification.patch (but includes its contents in the new patch)
  • cleans up the patches a bit (I had problems with constantly changing line numbers; I changed the patches so that they don't change the number of lines unless necessary)

I would like an "OK" from at least one Sierra user and David (other testers welcome as well) before committing this.

And yes, I keep #50512 in mind as well.

comment:23 Changed 4 years ago by david@…

Hi,

I built all variants and did some very rudimentary tests, this looks great!

I guess one of the patches missed r151571, I got this error: Skipped missing target: 'files/5.16/install-under-short-version-PR43480.patch'

Just to test 5.16, I used the patch from 5.18, which was applied OK by port

Cheers

comment:24 in reply to:  22 ; Changed 4 years ago by larryv (Lawrence Velázquez)

Replying to mojca@…:

I attached a patch

Please please don’t commit this all at once. Looking through enormous diffs (and yes, someone will have to look at this changeset in the future) is painful.

  • I don't know whether we still need to add {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"}

They left that in darwin.sh for 10.3–10.5, so we should continue adding it for those OSes.

comment:25 Changed 4 years ago by mojca (Mojca Miklavec)

Do you have any other suggestion? The only option I see would be to:

  • add that new patch to all versions
  • then clean up all the patches (and don't delete the obsolete patch yet)
  • then commit just the changes in the Portfile and delete the obsolete patches

I have no clue how else to fix this

comment:26 in reply to:  23 ; Changed 4 years ago by larryv (Lawrence Velázquez)

Replying to david@…:

I guess one of the patches missed r151571, I got this error: Skipped missing target: 'files/5.16/install-under-short-version-PR43480.patch'

Mojca, I assume this file should be copied from one of the other files/5.* directories?

comment:27 in reply to:  25 Changed 4 years ago by larryv (Lawrence Velázquez)

Replying to mojca@…:

Do you have any other suggestion?

I’ll email you a candidate patch series, and you can tell me what you think.

comment:28 in reply to:  26 Changed 4 years ago by mojca (Mojca Miklavec)

Replying to larryv@…:

Skipped missing target: 'files/5.16/install-under-short-version-PR43480.patch'

Mojca, I assume this file should be copied from one of the other files/5.* directories?

Yes, it should be and it is on my machine. I used svn cp wherever I could. If the file didn't end up in the patch, that's weird.

> svn st
M       Portfile
M       files/5.16/avoid-bind9-linking.patch
M       files/5.16/avoid-no-cpp-precomp-PR38913.patch
M       files/5.16/clean-up-paths.patch
D       files/5.16/fix-ld-modification.patch
M       files/5.16/fix-miniperl-linking-PR36438.patch
A  +    files/5.16/install-under-short-version-PR43480.patch
A       files/5.16/remove-10.3-target-PR126360.patch
M       files/5.16/use-stdbool.patch
M       files/5.18/avoid-bind9-linking.patch
M       files/5.18/avoid-no-cpp-precomp-PR38913.patch
M       files/5.18/clean-up-paths.patch
D       files/5.18/fix-ld-modification.patch
M       files/5.18/fix-miniperl-linking-PR36438.patch
M       files/5.18/install-under-short-version-PR43480.patch
A       files/5.18/remove-10.3-target-PR126360.patch
M       files/5.20/avoid-bind9-linking.patch
M       files/5.20/avoid-no-cpp-precomp-PR38913.patch
M       files/5.20/clean-up-paths.patch
D       files/5.20/fix-ld-modification.patch
M       files/5.20/fix-miniperl-linking-PR36438.patch
A       files/5.20/remove-10.3-target-PR126360.patch
M       files/5.22/avoid-bind9-linking.patch
M       files/5.22/avoid-no-cpp-precomp-PR38913.patch
M       files/5.22/clean-up-paths.patch
D       files/5.22/fix-ld-modification.patch
M       files/5.22/fix-miniperl-linking-PR36438.patch
M       files/5.22/install-under-short-version-PR43480.patch
A       files/5.22/remove-10.3-target-PR126360.patch
M       files/5.24/avoid-bind9-linking.patch
M       files/5.24/avoid-no-cpp-precomp-PR38913.patch
M       files/5.24/clean-up-paths.patch
M       files/5.24/fix-ld-modification.patch
M       files/5.24/fix-miniperl-linking-PR36438.patch

comment:29 in reply to:  24 Changed 4 years ago by larryv (Lawrence Velázquez)

Replying to larryv@…:

  • I don't know whether we still need to add {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"}

They left that in darwin.sh for 10.3–10.5, so we should continue adding it for those OSes.

Hm. Then again, if that weird ld thing only happens on old OSes, maybe it’s fine to just let them do what they want.

comment:30 Changed 4 years ago by larryv (Lawrence Velázquez)

These changes are causing problems with older Perls. I’m working on it.

comment:31 Changed 4 years ago by mojca (Mojca Miklavec)

Clemens suggested another change (off-topic for this particular ticket, but since we are discussing changing flags already), adding:

-Dinstallstyle="lib/perl5"

to configure flags. Otherwise we might get /opt/local/lib/perl5/5.24 when installing under /opt/local and /opt/perl/lib/5.24 when installing under /opt/perl.

comment:32 Changed 4 years ago by hofione@…

Cc: hofione@… added

Cc Me!

comment:33 in reply to:  32 ; Changed 4 years ago by jrevah@…

I realize this is really hacky but if you just want to work and you're getting this error message:

:info:configure CMake Error at Modules/Platform/Darwin.cmake:85 (message):
:info:configure   CMAKE_OSX_DEPLOYMENT_TARGET (10.12) is greater than CMAKE_OSX_SYSROOT SDK:
:info:configure 
:info:configure    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
:info:configure 
:info:configure   Please set CMAKE_OSX_DEPLOYMENT_TARGET to 10.11 or lower.
:info:configure Call Stack (most recent call first):
:info:configure   Modules/CMakeSystemSpecificInformation.cmake:36 (include)
:info:configure   CMakeLists.txt:19 (project)

You can edit the following file:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.6.1/CMakeCache.txt
line 82
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.12

change it to:
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.11

And perl should install just fine on Sierra.

comment:34 Changed 4 years ago by jrevah@…

Cc: jrevah@… added

Cc Me!

comment:35 in reply to:  33 Changed 4 years ago by kode54 (Christopher Snowhill)

Replying to jrevah@…:

I realize this is really hacky but if you just want to work and you're getting this error message:

:info:configure CMake Error at Modules/Platform/Darwin.cmake:85 (message):
:info:configure   CMAKE_OSX_DEPLOYMENT_TARGET (10.12) is greater than CMAKE_OSX_SYSROOT SDK:
:info:configure 
:info:configure    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
:info:configure 
:info:configure   Please set CMAKE_OSX_DEPLOYMENT_TARGET to 10.11 or lower.
:info:configure Call Stack (most recent call first):
:info:configure   Modules/CMakeSystemSpecificInformation.cmake:36 (include)
:info:configure   CMakeLists.txt:19 (project)

You can edit the following file:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.6.1/CMakeCache.txt
line 82
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.12

change it to:
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.11

And perl should install just fine on Sierra.

You may also use xcode-select to point the build tools at either the command line tools, or the latest Xcode 8 beta. Of course, those aren't really stable solutions, since they are, after all, beta software. Beta software for the beta operating system, perhaps?

comment:36 in reply to:  33 ; Changed 4 years ago by larryv (Lawrence Velázquez)

Replying to jrevah@…:

I realize this is really hacky but if you just want to work and you're getting this error message:

This doesn’t look like it has anything to do with Perl. You patched the cmake port, which Perl does not use.

On the other hand, if you’re having trouble installing cmake on Sierra (and have a solution), you should definitely file a separate ticket.

comment:37 in reply to:  36 Changed 4 years ago by jrevah@…

Replying to larryv@…:

Replying to jrevah@…:

I realize this is really hacky but if you just want to work and you're getting this error message:

This doesn’t look like it has anything to do with Perl. You patched the cmake port, which Perl does not use.

On the other hand, if you’re having trouble installing cmake on Sierra (and have a solution), you should definitely file a separate ticket.

You're right, I was tackling a problem with perl, fixed that then ran into a problem with cmake. I'll post that solution separately.

comment:38 Changed 4 years ago by ATL-Flaneur (Andreas Yankopolus)

Trying to apply mojca's patch, I do:

$ cd $(port dir perl5)
$ sudo patch -p0 < ~/Desktop/perl5-rebuilds.diff

On my system, this gives:

patching file Portfile
patching file files/5.16/avoid-bind9-linking.patch
patching file files/5.16/avoid-no-cpp-precomp-PR38913.patch
patching file files/5.16/clean-up-paths.patch
patching file files/5.16/fix-ld-modification.patch
patching file files/5.16/fix-miniperl-linking-PR36438.patch
can't find file to patch at input line 209
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: files/5.16/install-under-short-version-PR43480.patch
|===================================================================
|--- files/5.16/install-under-short-version-PR43480.patch	(revision 151570)
|+++ files/5.16/install-under-short-version-PR43480.patch	(working copy)
--------------------------
File to patch:

Am I applying the patch incorrectly?

comment:39 Changed 4 years ago by mojca (Mojca Miklavec)

I can try to attach the patch again. I'm not sure why the patch for 5.16 would have fallen out.

But in any case I have a problem with the patch and I don't quite understand why.

Adding -mmacosx-version-min=10.7 to ccflags
Adding -mmacosx-version-min=10.7 to ldflags
NOT adding -mmacosx-version-min=10.7 to ccflags ( -fno-common -DPERL_DARWIN  -mmacosx-version-min=10.7)
NOT adding -mmacosx-version-min=10.7 to ldflags ( -mmacosx-version-min=10.7)

...

ld -o libperl.dylib -mmacosx-version-min=10.7 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -fstack-protector -dynamiclib -compatibility_version 5.18.0 -current_version 5.18.4 -install_name /opt/local/lib/perl5/5.18/darwin-thread-multi-2level/CORE/libperl.dylib op.o perl.o   gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   DynaLoader.o -ldl -lm -lutil -lc
ld: unknown option: -mmacosx-version-min=10.7
make: *** [libperl.dylib] Error 1

comment:40 in reply to:  39 Changed 4 years ago by mojca (Mojca Miklavec)

Replying to mojca@…:

I can try to attach the patch again. I'm not sure why the patch for 5.16 would have fallen out.

This could be a bug in subversion client (or something that's impossible to do via a patch) that I'm not eager to investigate. What I did was "svn cp" from one file to the other and then added one line. But of course you don't have that file available. I would suggest you to simply delete the following lines from the patch before applying it:

Index: files/5.16/install-under-short-version-PR43480.patch
===================================================================
--- files/5.16/install-under-short-version-PR43480.patch;(revision 151570)
+++ files/5.16/install-under-short-version-PR43480.patch;(working copy)
@@ -1,3 +1,4 @@
+https://trac.macports.org/ticket/43480
 --- Configure.orig
 +++ Configure

comment:41 Changed 4 years ago by hofione@…

Cc: hofione@… removed

Cc Me!

comment:42 Changed 4 years ago by hofione@…

Cc: hofione@… added

Cc Me!

comment:43 Changed 4 years ago by ATL-Flaneur (Andreas Yankopolus)

Needed to delete an additional line from the patch:

Index: files/5.16/install-under-short-version-PR43480.patch
===================================================================
--- files/5.16/install-under-short-version-PR43480.patch	(revision 151570)
+++ files/5.16/install-under-short-version-PR43480.patch	(working copy)
@@ -1,3 +1,4 @@
+https://trac.macports.org/ticket/43480
 --- Configure.orig
 +++ Configure
 @@ -4132,6 +4132,8 @@ dos|vms)

Perl then installs fine. But compilation fails at glib2 as described in Ticket 52040 prior to installing wget.

comment:44 Changed 4 years ago by jberry@…

Cc: jberry@… added

Cc Me!

comment:45 Changed 4 years ago by jberry@…

Confirming that I can install perl 5.22 on Sierra using the given patch, once the lines mentioned in comment:40 are deleted from the patch.

comment:46 Changed 4 years ago by mojca (Mojca Miklavec)

I made a horrible commit in r151998 that hopefully fixes the build for Sierra and hopefully doesn't break builds on older machines.

The initially proposed changes that affect all perl subports don't work properly for older perls. Older perls most likely don't compile on Sierra either. I will do a cleanup of the main port (or #50512), but only once the changes get some proper diagnosis, testing and fixes. For now I just wanted to make sure that Sierra users could install the ports that still depend on 5.22 (#52081).

I will keep the ticket open until perl5.16 - perl5.20 gets proper treatment.

comment:47 Changed 4 years ago by larryv (Lawrence Velázquez)

Cc: summers@… added

Has duplicate #52106.

comment:48 Changed 4 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:49 Changed 4 years ago by roberthuston@…

Cc: roberthuston@… added

Cc Me!

comment:50 Changed 4 years ago by szhorvat (Szabolcs Horvát)

Cc: szhorvat@… added

Cc Me!

comment:51 Changed 4 years ago by mojca (Mojca Miklavec)

Cc: mcalhoun@… ridethecliche@… added

Slightly off-topic, but related to the pending patches posted here. Marcus requested the following three patches:

  • Portfile

    old new  
    114114        post-patch {
    115115            reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|g" \
    116116                    Configure Makefile.SH
     117
     118            if { ${os.major} <= 9 } {
     119                reinplace -W ${worksrcpath} "s|MACOSX_DEPLOYMENT_TARGET=10.3|MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}|g" \
     120                    hints/darwin.sh
     121            }
    117122        }
    118123
     124        # make sure get_canonical_archflags works properly
     125        variant universal {}
     126
    119127        configure.ccache    no
    120128        configure.distcc    no
    121129        configure.env       LC_ALL=C
     
    152160                            {-Acppflags="$CPPFLAGS"} \
    153161                            {-Accflags="$CFLAGS"} \
    154162                            {-Aldflags="$LDFLAGS"} \
     163                            "-Alddlflags=\"[get_canonical_archflags ld]\"" \
    155164                            {-Dinstallstyle="lib/perl5"}
    156165        } else {
    157166            configure.post_args-append \

Reasons as described by Marcus:

  • When building .bundle files, build_arch is not respected, and they are not universal
  • On older systems, macosx_deployment_target is not respected (10.3 is always used).

My response:

  • I would be grateful for explanation how to test the first point.
  • If we are patching MACOSX_DEPLOYMENT_TARGET, shouldn't we at least do that consistently for all OS version?
  • I don't understand why variant universal {} is needed. Is this a bug in MacPorts base or where exactly lies the difference?
  • Do any of those patches address #52290?

Changed 4 years ago by mojca (Mojca Miklavec)

Attachment: patches-for-perl.tar.gz added

a set of patches for perl5

Changed 4 years ago by mojca (Mojca Miklavec)

Attachment: perl5.diff added

Fix for perl5.16-5.20 for Sierra + various other fixes

comment:52 Changed 4 years ago by larryv (Lawrence Velázquez)

Cc: larryv added

comment:53 Changed 4 years ago by mojca (Mojca Miklavec)

I committed r154367.

comment:54 Changed 4 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: reopenedclosed

I'm closing this ticket. Marcus, please open a new ticket with your additional requests together with answers to my questions. I wanted to apply all changes together, but since there was no feedback from you for a long time, I went forward and committed the long-pending patches.

comment:55 in reply to:  54 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to mojca:

I'm closing this ticket. Marcus, please open a new ticket with your additional requests together with answers to my questions. I wanted to apply all changes together, but since there was no feedback from you for a long time, I went forward and committed the long-pending patches.

I have opened a new ticket (#52739). I am not sure why you did not get the email I sent attempting to answer your questions, but all the pertinent information is in the new ticket.

Note: See TracTickets for help on using tickets.