Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ $(foreach D,build_libdir build_private_libdir,$(eval $(call cache_rel_path,$(D),
# Save a special one: reverse_private_libdir_rel: usually just `../`, but good to be general:
reverse_private_libdir_rel_eval = $(call rel_path,$(private_libdir),$(libdir))
reverse_private_libdir_rel = $(call hit_cache,reverse_private_libdir_rel_eval)
reverse_private_libexecdir_rel_eval = $(call rel_path,$(private_libexecdir),$(libdir))
reverse_private_libexecdir_rel_eval = $(call rel_path,$(private_libexecdir),$(private_libdir))
reverse_private_libexecdir_rel = $(call hit_cache,reverse_private_libexecdir_rel_eval)
reverse_build_private_libexecdir_rel_eval = $(call rel_path,$(build_private_libexecdir),$(build_libdir))
reverse_build_private_libexecdir_rel = $(call hit_cache,reverse_build_private_libexecdir_rel_eval)
Expand Down
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,37 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT)
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-codegen-debug.$(SHLIB_EXT)
endif
endif

ifeq ($(OS), Darwin)
ifneq ($(DARWIN_FRAMEWORK),1)
for j in $(JL_PRIVATE_TOOLS) ; do \
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
install_name_tool -rpath @loader_path/$(build_libdir_rel) @executable_path/$(reverse_private_libexecdir_rel) $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
done
endif
else ifneq (,$(findstring $(OS),Linux FreeBSD))
for j in $(JL_PRIVATE_TOOLS) ; do \
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(reverse_private_libexecdir_rel)' $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
done
endif

ifneq ($(reverse_private_libexecdir_rel),$(reverse_build_private_libexecdir_rel))
ifeq ($(OS), Darwin)
ifneq ($(DARWIN_FRAMEWORK),1)
for j in $(JL_PRIVATE_EXES) ; do \
[ $$j = 7z ] && continue; \
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtjnash was this line supposed to be removed in #60098 ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this prevented it from getting set correctly during install

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may still need to delete this for the patch to be applied

[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
install_name_tool -rpath @executable_path/$(reverse_build_private_libexecdir_rel) @executable_path/$(reverse_private_libexecdir_rel) $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
done
endif
else ifneq (,$(findstring $(OS),Linux FreeBSD))
for j in $(JL_PRIVATE_EXES) ; do \
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(reverse_private_libexecdir_rel)' $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
done
endif
endif

# Fix rpaths for dependencies. This should be fixed in BinaryBuilder later.
Expand Down