isle-portable icon indicating copy to clipboard operation
isle-portable copied to clipboard

macOS: Library not loaded: liblego1.dylib

Open MaddTheSane opened this issue 10 months ago • 13 comments

When launching the Lego Island from the command line, I get the following error:

dyld[###]: Library not loaded: @rpath/liblego1.dylib
  Referenced from: <9EE82B85-2D0C-30BC-BB3D-03B41522449D> /Users/***/Downloads/isle-0.1-Darwin-arm64-arm64/bin/isle
  Reason: no LC_RPATH's found
zsh: abort      ./isle

I was able to work around this with the following command: install_name_tool -add_rpath @executable_path/../lib isle, but a better solution would be adding it to the linker. This Stack Overflow shows how to do it with Xcode, but adding it to CMake should be fairly easy.

If you decide to make Lego Island a full-fledged macOS application package, you might want to change the added rpath to point to the correct place you put the libraries in the bundle.

MaddTheSane avatar Jun 15 '25 21:06 MaddTheSane

It's being worked on: https://github.com/isledecomp/isle-portable/pull/307

AJenbo avatar Jun 15 '25 21:06 AJenbo

@MaddTheSane I might be misunderstanding but were you able to play the game after you ran that command? I get the Lego Island close all other applications error so I'm assuming thats just the project being incomplete but I wanted to ask you.

TheDurbie avatar Jun 15 '25 22:06 TheDurbie

@MaddTheSane I might be misunderstanding but were you able to play the game after you ran that command? I get the Lego Island close all other applications error so I'm assuming thats just the project being incomplete but I wanted to ask you.

It also needs to be able to locate the game assets. Check the config ini file (in ~/Library/Application Support/isledecomp/isle)

JPeisach avatar Jun 15 '25 23:06 JPeisach

@TheDurbie As I don't have the assets installed, no. It just popped up a warning that it failed to start. ~~It could also be that I was using an older release: I have not tested a more recent build yet.~~ Just tested a more recent release. The problem is still there. Note that I didn't built it from source, but downloaded the continuous release build.

MaddTheSane avatar Jun 16 '25 00:06 MaddTheSane

Thanks to both of you for the info, appreciate it a lot

TheDurbie avatar Jun 16 '25 00:06 TheDurbie

Yeah if you don't have the scripts installed and the game cant locate it, the game will error out

I don't know if we will be distributing the assets or not in prebuilt releases

JPeisach avatar Jun 16 '25 00:06 JPeisach

The download likely won't work before a proper macOS application has been configured.

AJenbo avatar Jun 16 '25 00:06 AJenbo

Apologies if I'm doing something done but I set the CD path to an ISO and I get the same error, I also tried as a folder.

TheDurbie avatar Jun 16 '25 01:06 TheDurbie

that won't work

AJenbo avatar Jun 16 '25 01:06 AJenbo

Since virtually no one is capable of figuring out what a complete LEGO Island installation looks like - presumably because no one actually ever installs the original - here's what you need:

https://gist.github.com/foxtacles/80bfdbaa2e203bf0e0ccc452b6e5e85a

You can piece this together yourself by copying files from the ISO. It's essentially just two folders. Or wait until isle-portable provides a way to do this installation for you.

foxtacles avatar Jun 16 '25 02:06 foxtacles

If only it showed an error when a file was not found :)

AJenbo avatar Jun 16 '25 03:06 AJenbo

I don't think it gets that far yet. At least, not for macOS.

MaddTheSane avatar Jun 16 '25 08:06 MaddTheSane

Use CMakeList.txt set(CMAKE_INSTALL_RPATH "@executable_path/../lib") and set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) or use -DCMAKE_INSTALL_RPATH='@loader_path/../lib in CMake configuration option.

Benthomann avatar Jun 29 '25 05:06 Benthomann