gdl icon indicating copy to clipboard operation
gdl copied to clipboard

weekly release macos binary assumes hardcoded libreadline location

Open slayoo opened this issue 4 years ago • 4 comments

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.8.dylib
  Referenced from: /Users/sarabas/Downloads/gdl-macOS-x86_64-standard/bin/gdl
  Reason: image not found
zsh: abort      /Users/sarabas/Downloads/gdl-macOS-x86_64-standard/bin/gdl

slayoo avatar Nov 17 '21 05:11 slayoo

@pjb7687 is it a bug or a feature? :) - i.e. should it be fixed or should the user be informed that libreadline needs to be installed first (but which version, arch, etc...)

slayoo avatar Nov 17 '21 05:11 slayoo

Hi @slayoo, it's neither a bug nor a feature, the library location is included at the compile time. This is the main problem I am stuck with the DMG release... And eventually, the weekly binary should be replaced with the DMG one.

pjb7687 avatar Nov 17 '21 18:11 pjb7687

So would it be something related to the RPATH settings in CMake: https://cmake.org/cmake/help/latest/prop_tgt/BUILD_RPATH_USE_ORIGIN.html Anyways, do I get it right, the for DMG as for Windows binaries we do want to ship all the linked libraries with the package?

slayoo avatar Nov 17 '21 23:11 slayoo

So would it be something related to the RPATH settings in CMake: https://cmake.org/cmake/help/latest/prop_tgt/BUILD_RPATH_USE_ORIGIN.html

The proposed script corrects the Rpaths of the compiled binaries: https://github.com/gnudatalanguage/gdl/pull/1074/files#diff-cd495307171e650f59aab7e02f88c17d00a4eea082208cabdfc7abf92ac5592eR469-R481

But yes it's better to use RPATH settings in CMake. I didn't know about it.

Anyways, do I get it right, the for DMG as for Windows binaries we do want to ship all the linked libraries with the package?

Yes.

pjb7687 avatar Nov 18 '21 12:11 pjb7687