pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [macOS] build multimedia/mpv and run devel/meld
On 02/28, Jan Danielsson wrote:
> Not sure how this one is supposed to be fixed. I natively thought
> I'd try to set DYLD_LIBRARY_PATH just to see if it's working otherwise
> and was slightly surprised to see that apparently the shell just
> swallows that environment variable (it doesn't show up when running env
> after being set).
That's probably related to SIP. See the following post from Jonathan
Perkin for more info:
https://mail-index.netbsd.org/tech-pkg/2020/02/17/msg022645.html
In particular, Jonathan writes:
SIP does not disable DYLD_LIBRARY_PATH, it only ignores it for
binaries *that are protected by SIP*. Nothing built by pkgsrc is
protected by SIP.
You might get around your problem by using a shell from pkgsrc. For
example, here's a comparison of /bin/sh and /opt/pkg/bin/mksh using
echo:
----
$ DYLD_LIBRARY_PATH=foo /bin/sh -c 'echo $DYLD_LIBRARY_PATH'
$ DYLD_LIBRARY_PATH=foo /opt/pkg/bin/mksh -c 'echo $DYLD_LIBRARY_PATH'
foo
----
However, as Jonathan wrote, SIP is actually ignoring DYLD_LIBRARY_PATH
for binaries that are protected by SIP, so even if you use a shell from
pkgsrc (that is not protected by SIP) but then use a protected binary
from the macOS system such as /usr/bin/env (like you may have been
trying to use in your test), DYLD_LIBRARY_PATH will still be ignored:
----
$ DYLD_LIBRARY_PATH=foo /opt/pkg/bin/mksh -c '/usr/bin/env' | fgrep DYLD
$ MY_VAR=foo /opt/pkg/bin/mksh -c '/usr/bin/env' | fgrep MY_VAR
MY_VAR=foo
----
Lewis
Home |
Main Index |
Thread Index |
Old Index