[mysterious owner of 'libc++.1.dylib']
Bill Cole
macportsusers-20171215 at billmail.scconsult.com
Wed Mar 15 19:11:39 UTC 2023
On 2023-03-15 at 14:00:44 UTC-0400 (Wed, 15 Mar 2023 18:00:44 +0000)
Maxim Abalenkov <maxim.abalenkov at gmail.com>
is rumored to have said:
> Dear all,
>
> I need help please. I’m compiling a C/C++ code base with clang++
> compiler installed via MacPorts. When I look at the libraries my
> executable relies on I see:
>
> otool -L <exe_file>
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
> version 1300.36.0)
What macOS version? I'm guessing Ventura...
That file doesn't exist on Big Sur (where there is a libc++.dylib
elsewhere) but it does on El Cap, where it is (sensibly) part of the
base OS. I suspect that the version there is an indicator of macOS 13.
> However, when I try to find out what package owns this library:
>
> sudo port provides "/usr/lib/libc++.1.dylib"
> /usr/lib/libc++.1.dylib does not exist.
Yes. MacPorts doesn't install libraries into /usr/lib. That would be
bad.
> Further inquiry with ‘pkgutil’ doesn’t shed more light either:
>
> pkgutil --file-info "/usr/lib/libc++.1.dylib"
> volume: /
> path: /usr/lib/libc++.1.dylib
Interesting. On my El Cap machine pkgutil shows that
com.apple.pkg.Essentials and multiple com.apple.pkg.update.10.11.*
packages included a file with that path.
> Would you please tell me, who is the mysterious owner of the
> ‘libc++’?
It is part of macOS itself. Specifically, it is the implementation of
the standard C++ library developed by the LLVM project, which is used by
the clang++ compiler.
--
Bill Cole
bill at scconsult.com or billcole at apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
More information about the macports-users
mailing list