hercules-390 / hyperion

Hercules 390
Other
251 stars 70 forks source link

macOS, after make install the executable cannot locate the dylibs #255

Open ghost opened 6 years ago

ghost commented 6 years ago

the RPATH logic for apple uses different tokens to define an RPATH relative to the executable path attached a zip file with the patches the full one including the MODULE patch one containing only the CMakeLists patch

as a side beneficial effect the whole executable tree can be renamed/moved everywhere cmake -DCMAKE_INSTALL_PREFIX=~/Hercules/hype ... ... ... make install

NOW ~/Hercules/hype/bin/hercules -f none WORKS

after mv ~/Hercules/hype ~/junk/garb ~/junk/garb/bin/hercules -f none still works

APPLE_patches.zip

Peter-J-Jansen commented 6 years ago

My initial Hyperion CMake attempt on Windows (10) used -DCMAKE_INSTALL_PREFIX=~/hyperion_prefix and when I afterwards copied the contents of ~/hyperion_prefix into C:\Program Files\Hercules\Hyperion the result did not work. I did not yet investigate this further, but could it be that this too has to do with similar RPATH logic problems, albeit under Windows instead of APPLE ?

srorso commented 6 years ago

Hi Enrico,

Thanks for the correction to the RPATH setup for macOS. I have integrated it into my working tree but have not run tests to match your results. I use the match to verify that I applied the patch correctly.

Again, thanks!

Best Regards, Steve Orso

srorso commented 6 years ago

Hi Peter,

Windows does not use an RPATH-like mechanism to locate the shared libraries to be loaded when an executable starts, so your issue likely has a different origin. Can you provide some an error message. I will try to duplicate as well, but I want to make sure any issue I find in that attempt matches your issue.

Best Regards, Steve Orso

srorso commented 6 years ago

Hi Peter,

I was unable to reproduce your issue using CMake, the Ninja build tool, and Visual Studio 2017 on Windows 10 Pro 1709. So information about your build (NMake?) and symptoms experienced would be most helpful. Also, it would be helpful if ctest (NMake test or NMake check) worked before you copied the binaries to the c:\Program Files directory.

It may make sense to open a separate github issue for your issue.

Best Regards, Steve Orso