[MacPorts] #62426: libc++: using a newer libc++ to build software on older macos systems
MacPorts
noreply at macports.org
Wed Sep 21 16:24:01 UTC 2022
#62426: libc++: using a newer libc++ to build software on older macos systems
-------------------------------------+--------------------
Reporter: kencu | Owner: kencu
Type: enhancement | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords:
Port: libcxx macports-libcxx |
-------------------------------------+--------------------
Comment (by RJVB):
Checking an older Qt5 application:
{{{
> otool -L
/Applications/MacPorts/Qt5/QtAssistant.app/Contents/MacOS/QtAssistant |
fgrep libc++
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
version 120.0.0)
> env DYLD_PRINT_LIBRARIES=1
/Applications/MacPorts/Qt5/QtAssistant.app/Contents/MacOS/QtAssistant |&
fgrep libc++
dyld: loaded: /usr/lib/libc++.1.dylib
dyld: loaded: /usr/lib/libc++abi.dylib
> lsof +c 0 | fgrep -i QtAssistant | fgrep libc++
Exit 1
}}}
I see this same result with another "pure Qt" application?! But:
{{{
> env DYLD_PRINT_LIBRARIES=1
DYLD_INSERT_LIBRARIES=/opt/local/lib/libc++.dylib
/Applications/MacPorts/Qt5/QtAssistant.app/Contents/MacOS/QtAssistant | &
fgrep libc++
dyld: loaded: /opt/local/lib/libc++.dylib
dyld: loaded: /usr/lib/libc++.1.dylib
dyld: loaded: /usr/lib/libc++abi.dylib
dyld: loaded: /opt/local/lib/libc++abi.1.dylib
> lsof +c 0 | fgrep -i QtAssistant | fgrep libc++
QtAssistant 77231 bertin txt REG 1,1
2223932 9538392 /opt/local/lib/libc++.1.dylib
QtAssistant 77231 bertin txt REG 1,1
617328 9538394 /opt/local/lib/libc++abi.1.dylib
}}}
A bit of hackery to see if I can make something go wrong:
{{{
> lsof +c 0 | fgrep kdevelop | fgrep libc++
kdevelop.bin 69337 bertin txt REG 1,1
2223932 9538392 /opt/local/lib/libc++.1.dylib
kdevelop.bin 69337 bertin txt REG 1,1
617328 9538394 /opt/local/lib/libc++abi.1.dylib
kdevelop.bin 77002 bertin txt REG 1,1
2223932 9538392 /opt/local/lib/libc++.1.dylib
kdevelop.bin 77002 bertin txt REG 1,1
617328 9538394 /opt/local/lib/libc++abi.1.dylib
}}}
> env DYLD_PRINT_LIBRARIES=1 DYLD_INSERT_LIBRARIES=/usr/lib/libc++.1.dylib
/Applications/MacPorts/KF5/kdevelop.app/Contents/MacOS/kdevelop.bin --ps |
& fgrep libc++
dyld: loaded: /usr/lib/libc++.1.dylib
dyld: loaded: /opt/local/lib/libc++.1.dylib
dyld: loaded: /usr/lib/libc++abi.dylib
dyld: loaded: /opt/local/lib/libc++abi.1.dylib
>
}}}
{{{
> sudo /opt/local/bin/install_name_tool -change
/opt/local/lib/libc++.1.dylib /usr/lib/libc++.1.dylib
/Applications/MacPorts/KF5/kdevelop.app/Contents/MacOS/kdevelop.bin
> otool -L
/Applications/MacPorts/KF5/kdevelop.app/Contents/MacOS/kdevelop.bin |
fgrep libc++
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
version 9.0.1)
> lsof +c 0 | fgrep kdevelop | fgrep libc++
kdevelop.bin 69337 bertin txt REG 1,1
2223932 9538392 /opt/local/lib/libc++.1.dylib
kdevelop.bin 69337 bertin txt REG 1,1
617328 9538394 /opt/local/lib/libc++abi.1.dylib
kdevelop.bin 76908 bertin txt REG 1,1
2223932 9538392 /opt/local/lib/libc++.1.dylib
kdevelop.bin 76908 bertin txt REG 1,1
617328 9538394 /opt/local/lib/libc++abi.1.dylib
}}}
Note how install_name_tool did NOT change the `current_version` info
stored in KDevelop!!
--
Ticket URL: <https://trac.macports.org/ticket/62426#comment:54>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list