[Git][wxwidgets/wxwidgets][master] 2 commits: Fix autoconf build for macOS < 13

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Feb 23, 2026, 8:07:55 AMFeb 23
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 6799a112
    by Vadim Zeitlin at 2026-02-23T13:50:42+01:00
    Fix autoconf build for macOS < 13
    
    The recent 94a54f68af (Fix script used to change macOS install names
    with configure, 2026-02-18) broke it by using realpath not available
    until macOS 13.
    
    Return to using (nested) readlink calls.
    
    See #25675, #26200.
    
  • 61300d78
    by Vadim Zeitlin at 2026-02-23T14:01:04+01:00
    Suppress error message from "ln --relative" when installing
    
    We provide a fall back in case of error, so seeing this error in the
    build logs is confusing.
    
    This slightly amends the changes of b2cb336b78 (Fix wx-config symlink in
    out-of-tree installs, 2024-06-18).
    
    See #24622.
    

4 changed files:

Changes:

  • Makefile.in
    No preview for this file type
  • build/bakefiles/wx.bkl
    ... ... @@ -92,12 +92,20 @@
    92 92
     
    
    93 93
             <action id="install-wxconfig">
    
    94 94
                 <dependency-of>install</dependency-of>
    
    95
    +            <!--
    
    96
    +                In the command below, we try to create a relative symlink
    
    97
    +                because this works even if DESTDIR is moved (which will
    
    98
    +                normally be the case if it's not empty). But if this doesn't
    
    99
    +                work, e.g. we're under non-Linux system (note that macOS ln
    
    100
    +                only supports this option since version 13), fall back to
    
    101
    +                creating an absolute symlink and if that fails too, just copy
    
    102
    +                the file.
    
    103
    +             -->
    
    95 104
                 <command>
    
    96 105
                     $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
    
    97 106
                     $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
    
    98 107
                     $(INSTALL_SCRIPT) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
    
    99
    -                # Warning! If the --relative symlink fails (e.g. *BSD), then we'd create an absolute symlink, which will be broken if DESTDIR is moved
    
    100
    -                (cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) --relative $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || $(LN_S) $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
    
    108
    +                (cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) --relative $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config 2&gt;/dev/null || $(LN_S) $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
    
    101 109
                 </command>
    
    102 110
             </action>
    
    103 111
     
    

  • configure
    No preview for this file type
  • configure.ac
    ... ... @@ -3705,6 +3705,10 @@ if test "$wxUSE_SHARED" = "yes"; then
    3705 3705
             install_name_tool=`which ${HOST_PREFIX}install_name_tool`
    
    3706 3706
             if test "$install_name_tool" -a -x "$install_name_tool"; then
    
    3707 3707
                 DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
    
    3708
    +            dnl Note that the script below doesn't use realpath because it's
    
    3709
    +            dnl only available since macOS 13 and doesn't even use readlink -f
    
    3710
    +            dnl because this is only available since macOS 12, while we still
    
    3711
    +            dnl need to support 10.10.
    
    3708 3712
                 cat <<EOF >change-install-names
    
    3709 3713
     #!/bin/sh
    
    3710 3714
     set -e
    
    ... ... @@ -3716,12 +3720,12 @@ build_libdir=\$4
    3716 3720
     libnames=\$(cd \${build_libdir}; printf '%s\n' libwx*${WX_RELEASE}.dylib)
    
    3717 3721
     changes=''
    
    3718 3722
     for libname in \${libnames} ; do
    
    3719
    -    target=\$(realpath \${build_libdir}/\${libname})
    
    3720
    -    changes="\${changes} -change \${target} \${libdir}/\$(basename \${target})"
    
    3723
    +    target=\$(readlink \${build_libdir}/\$(readlink \${build_libdir}/\${libname}))
    
    3724
    +    changes="\${changes} -change \${build_libdir}/\${target} \${libdir}/\${target}"
    
    3721 3725
     done
    
    3722 3726
     for libname in \${libnames} ; do
    
    3723
    -    target=\$(realpath \${build_libdir}/\${libname})
    
    3724
    -    ${HOST_PREFIX}install_name_tool \${changes} -id \${libdir}/\${libname} \${destdir}\${libdir}/\$(basename \${target})
    
    3727
    +    target=\$(readlink \${build_libdir}/\$(readlink \${build_libdir}/\${libname}))
    
    3728
    +    ${HOST_PREFIX}install_name_tool \${changes} -id \${libdir}/\${libname} \${destdir}\${libdir}/\${target}
    
    3725 3729
     done
    
    3726 3730
     
    
    3727 3731
     if test -f \${destdir}\${bindir}/wxrc-${WX_RELEASE} ; then
    

Reply all
Reply to author
Forward
0 new messages