New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure on OS X 10.12 Sierra #15524
Comments
From mojca.miklavec.lists@gmail.comPerl fails to build on OS X 10.12 (both 5.22 and 5.24 are affected, earlier and later versions were not tested yet): HiRes.xs:945:15: error: use of undeclared identifier 'darwin_time_mutex' See the following links (patch included): |
From @tonycozOn Wed Aug 17 05:46:44 2016, mojca.miklavec.lists@gmail.com wrote:
This is fixed in blead, it may need a backport to 5.24/5.22. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From mojca@macports.orgOn 18 August 2016 at 02:39, Tony Cook via RT wrote:
Thank you, I didn't check the git sources. Correction: 5.22 doesn't need that patch. It's only relevant for 5.24. Mojca |
From @craigberryOn Thu, Aug 18, 2016 at 1:51 AM, Mojca Miklavec <mojca@macports.org> wrote:
So does Time::HiRes now use the system clock_gettime() on Sierra? Has anyone tried building on 10.12 with MACOSX_DEPLOYMENT_TARGET set <https://curl.haxx.se/mail/lib-2016-09/0051.html> the new clock_gettime() functionality in Sierra is implemented as a |
From @steve-m-hayNote: Backporting a newer Time::HiRes for 5.24.3 is under discussion in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=128427. |
From @jkeenan5.24 is out of support, so, nothwithstanding one dependency listing still open, this ticket is closable. Marking resolved. |
@jkeenan - Status changed from 'open' to 'resolved' |
From @jkeenanOn Mon, 01 Oct 2018 10:55:00 GMT, jkeenan wrote:
I resolved the wrong ticket; re-opening. Thank you very much. |
@jkeenan - Status changed from 'resolved' to 'open' |
From @khwilliamsonOn Thu, 15 Sep 2016 14:11:07 -0700, craig.a.berry@gmail.com wrote:
Craig, can you try it now? |
From @craigberryOn Thu, Mar 28, 2019 at 9:35 PM Karl Williamson via RT
Apologies for the late reply. I didn't notice this until Karl gave me $ cc --version and configured like so: $ export MACOSX_DEPLOYMENT_TARGET=10.11 but the build died when compiling Time::HiRes. We did end up with $ ./Configure -Dusedevel -Accflags='-Werror=partial-availability' That builds and passes all tests on Mojave. I don't have a way to |
From @khwilliamsonI have worked up a patch based on Craig's ideas (attached). I have run this on Darwin 17.0, and it works, but it also works without the patch and setting the deployment target to 10.10. So, I don't know how to make sure the problem exists and that this solves it |
From @khwilliamson0001-PATCH-perl-128972-Build-failure-on-OS-X.patchFrom 1cfa8a0c107fb5aaa0c951592265b137274143b9 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Fri, 3 May 2019 12:13:51 -0600
Subject: [PATCH] PATCH: [perl #128972] Build failure on OS X
---
hints/darwin.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hints/darwin.sh b/hints/darwin.sh
index feb15f6b4f..53650d26cb 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -273,19 +273,24 @@ add_macosx_version_min () {
esac
}
+time_hires_early_ccflags="-Werror=partial-availability -D_DARWIN_FEATURE_CLOCK_GETTIME=0"
+
# Perl bundles do not expect two-level namespace, added in Darwin 1.4.
# But starting from perl 5.8.1/Darwin 7 the default is the two-level.
case "$osvers" in # Note: osvers is the kernel version, not the 10.x
1.[0-3].*) # OS X 10.0.x
lddlflags="${ldflags} -bundle -undefined suppress"
+ ccflags="$ccflags $time_hires_early_ccflags"
;;
1.*) # OS X 10.1
ldflags="${ldflags} -flat_namespace"
lddlflags="${ldflags} -bundle -undefined suppress"
+ ccflags="$ccflags $time_hires_early_ccflags"
;;
[2-6].*) # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
ldflags="${ldflags} -flat_namespace"
lddlflags="${ldflags} -bundle -undefined suppress"
+ ccflags="$ccflags $time_hires_early_ccflags"
;;
[7-9].*) # OS X 10.3.x - 10.5.x
lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
@@ -293,6 +298,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
*MACOSX_DEPLOYMENT_TARGET*) ;;
*) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
esac
+ ccflags="$ccflags $time_hires_early_ccflags"
;;
*) # OS X 10.6.x - current
# The MACOSX_DEPLOYMENT_TARGET is not needed,
@@ -304,6 +310,14 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
10.*)
add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
+
+ case "$MACOSX_DEPLOYMENT_TARGET" in
+ 10.[6-9]|10.10|10.11)
+ ccflags="$ccflags $time_hires_early_ccflags"
+ ;;
+ *)
+ ;;
+ esac
;;
'')
# Empty MACOSX_DEPLOYMENT_TARGET is okay.
--
2.17.1
|
From @khwilliamsonThere have been problems lately with either or both the RT system and/or email not working properly, including some responses that should have gotten associated with this ticket. Let's hope this one works. Craig Berry took my patch and found some issues with it, and submitted an alternate one, which I have now pushed to blead as commit 1a833e4 Hide clock_gettime() from macOS 10.12+ for pre-10.12. |
@khwilliamson - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#128972 (status was 'resolved')
Searchable as RT128972$
The text was updated successfully, but these errors were encountered: