pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: macOS 12.x (Monterey) vs. pkgsrc



On Tue, Mar 1, 2022 at 11:16 PM Greg A. Woods <woods%planix.com@localhost> wrote:
>
> # otool -XL libavltree.so.1.1
>         libavltree.so.1.1 (compatibility version 0.0.0, current version 0.0.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
>
>
> I'm thinking mk/check/check-shlibs-macho.awk should not complain if then
> library depends on itself like this?

That is the Mach-O ID, not a dependency. See:

    otool -l libavltree.so.1.1 | grep -A2 LC_ID_DYLIB

(Dependencies are LC_LOAD_DYLIB.)

dyld will load a library just fine if its ID is the basename of the
library. So I think scripts should accept that too.

But to be more explicit, the package can set the ID to
"@rpath/libavltree.so.1.1" using the linker option:

    LDFLAGS.Darwin+= -Wl,-install_name,@rpath/libavltree.so.1.1

and add a runtime search path:

    LDFLAGS.Darwin+= -Wl,-rpath,${LOCALBASE}/lib

(I have that last line in etc/mk.conf.)


Home | Main Index | Thread Index | Old Index