pkgsrc-Users archive

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

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



At Wed, 2 Mar 2022 09:14:27 -0500, Mansour Moufid <mansourmoufid%gmail.com@localhost> wrote:
Subject: 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.

Thanks for identifying the "mystery dependency"!


> 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.)

I think the better fix would be for pkgtools/bootstrap-mk-files to
switch over to using Simon's far more portable mk-files which already do
better things for shared libraries on Darwin/macOS.

In the mean time my quick hack to check-shlibs-macho.awk works OK....

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpHlhaOz_P8p.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index