[vlc-commits] [Git][videolan/vlc][3.0.x] build: use DYLD_LIBRARY_PATH on macOS
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Dec 2 08:58:39 UTC 2021
Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC
Commits:
db55aaa0 by Thomas Guillem at 2021-12-02T08:46:16+00:00
build: use DYLD_LIBRARY_PATH on macOS
cf. https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html#//apple_ref/doc/uid/TP40001928-SW12
"""
When the library name is a filename (that is, when it doesn’t include
directory names), the dynamic loader searches for the library in several
locations until it finds it, in the following order:
- $LD_LIBRARY_PATH
- $DYLD_LIBRARY_PATH
- The process’s working directory
- $DYLD_FALLBACK_LIBRARY_PATH
When the library name contains at least one directory name, that is,
when the name is a pathname (relative or fully qualified), the dynamic
loader searches for the library in the following order:
- $DYLD_LIBRARY_PATH using the filename
- The given pathname
- $DYLD_FALLBACK_LIBRARY_PATH using the filename
"""
Conclusion: DYLD_LIBRARY_PATH on macOS behave like LD_LIBRARY_PATH on
Linux but LD_LIBRARY_PATH on macOS has a different behavior than
LD_LIBRARY_PATH on Linux, so DYLD_LIBRARY_PATH should be used on macOS.
Specially since we can't really control if the library name will include
a path or not (relative or absolute).
(cherry picked from commit abbe7f3b8bea7ceffae797cb924d5154b43c5d14)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
- - - - -
1 changed file:
- Makefile.am
Changes:
=====================================
Makefile.am
=====================================
@@ -171,6 +171,7 @@ install-exec-hook:
if test "$(build)" = "$(host)"; then \
PATH="$(DESTDIR)$(bindir):$$PATH" \
LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
+ DYLD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$DYLD_LIBRARY_PATH" \
"$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \
"$(DESTDIR)$(vlclibdir)/plugins" ; \
else \
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/db55aaa090a94a43588233a2136e9777a6f44ee1
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/db55aaa090a94a43588233a2136e9777a6f44ee1
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list