[MacPorts] #66250: xz fails to build with libunwind active

MacPorts noreply at macports.org
Sat Sep 30 08:35:29 UTC 2023


#66250: xz fails to build with libunwind active
---------------------------+--------------------
  Reporter:  opencoff      |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.0
Resolution:                |   Keywords:
      Port:  libunwind xz  |
---------------------------+--------------------

Comment (by nilason):

 To illustrate the automatic linking by Xcode 15's Clang to MacPorts'
 libunwind, if present:

 {{{
 cat << EOF > /tmp/test.cpp
 #include <iostream>
 int main() {
     std::cout << "Hello MacPorts!";
     return 0;
 }
 EOF

 /usr/bin/clang++ --version
 echo 'With LIBRARY_PATH set to $prefix/lib:'
 LIBRARY_PATH='/opt/local/lib' /usr/bin/clang++ -shared -o /tmp/test.dylib
 /tmp/test.cpp
 /usr/bin/otool -L /tmp/test.dylib
 echo "With LIBRARY_PATH **not** set:"
 /usr/bin/clang++ -shared -o /tmp/test.dylib  /tmp/test.cpp
 /usr/bin/otool -L /tmp/test.dylib
 }}}

 Will result in

 {{{
 Apple clang version 15.0.0 (clang-1500.0.40.1)
 Target: x86_64-apple-darwin22.6.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 With LIBRARY_PATH set to $prefix/lib:
 test.dylib:
         /tmp/test.dylib (compatibility version 0.0.0, current version
 0.0.0)
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
 version 1600.151.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1336.0.0)
         /opt/local/lib/libunwind.1.dylib (compatibility version 1.0.0,
 current version 5.0.1)
 With LIBRARY_PATH **not** set:
 test.dylib:
         /tmp/test.dylib (compatibility version 0.0.0, current version
 0.0.0)
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
 version 1600.151.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1336.0.0)}}}

-- 
Ticket URL: <https://trac.macports.org/ticket/66250#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list