Re: bug#44684: libtool.m4 linker flag selection does not work for macOS Big Sur

2020-11-16 Thread Ryan Schmidt
Duplicate of #44605.




[patch #9996] Patch libtool for macOS 11.0 (aka darwin20)

2020-11-16 Thread FX
URL:
  

 Summary: Patch libtool for macOS 11.0 (aka darwin20)
 Project: GNU Libtool
Submitted by: fxcoudert
Submitted on: Mon 16 Nov 2020 03:22:20 PM UTC
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

There is code in m4/libtool.m4 that assumes that macOS version numbers are of
the form 10.*, and darwin version numbers are of the form darwin1*

The latest macOS release is macOS 11.0.1 and it corresponds to the darwin20
kernel. So, this code breaks.

The patch at
https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg1.html
is confirmed to work very well, allowing to build complex software that was
failing before, such as open-mpi.

Please apply this patch to git




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




libtool.m4 linker flag selection does not work for macOS Big Sur

2020-11-16 Thread JRR

Hi all,
it seems that the setup in
lines 1065-1083 in m4/libtool.m4
(cf. below) do not work for macOS Big Sur because they changed the major 
development version

of the macOS. When I am linking my programs, I need
-Wl,-undefined, -Wl,-dynamic_lookup
but I end up with
-Wl,-flat_namespace -Wl,-suppress
When I run my own configure with
MACOSX_DEPLOYMOMENT_TARGET='10.16' everything works again.
I provided a potential patch below, with two changes, the first assumes
the MACOSX_DEPLOYMENT_TARGET that libtool seems to default to,
namely 10.0, where now we have to take care of the fact that macOS
changed from darwin19.x -> darwin20.1
The second change accounts for a correct setting if someone sets
MACOSX_DEPLOYMENT_TARGET='11.0'
Probably someone else has already reported that issue.
Cheers,
    JRR (Juergen Reuter)

$ git diff
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f2d1f398..be9d50f3 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1072,11 +1072,11 @@ _LT_EOF
   # to the OS version, if on x86, and 10.4, the deployment
   # target defaults to 10.4. Don't you love it?
   case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-    10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+    10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
   _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
 10.[[012]][[,.]]*)
   _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;

-    10.*)
+    10.*|11.*)
   _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
   esac
 ;;





--
--
-
Juergen Reuter
DESY Theory Group, Bldg. 2a
Notkestr. 85
22607 Hamburg, GERMANY
Tel +49 (0)40 8998 3895
Fax +49 (0)40 8998 2777
skype: jr_reuter
-