Open globalcitizen opened 3 years ago
Well, this is weird.
I downloaded the code in my mac, and tried the simplest possible program
main.lua
:
local steam = require "luasteam"
I tried running (love .
) and got exactly the same error (file system relative paths not allowed in hardened programs
).
Notice that it first didn't let me use the .so
(unsafe to open file) and I had to go in Security and Settings
and Allow anyway
so I didn't get this error anymore.
Then I tried to isolate the error: Ran also in my friends older mac, but it also didn't work, so it wasn't the Mac version.
Tried to rebuild the .so
with latest sdk but still got the same issue.
Then I downloaded an older version of LOVE, 0.10.2, and it worked.
I was about to come back here saying that it is about LOVE version, but I kept testing with different versions and now even the latest version (11.3) works without error.
So I think it's some security thing inside Mac that eventually allowed me to use the .so
and stopped complaining. No idea why it didn't just work after I "Allowed anyway", but still took a while after that. Sorry about the lack of a better answer.
That said, I believe when packaging the game this problem won't show up, because the .so
goes inside the .app
folder and Mac probably allows everything to run at once.
Also, the cpath
hack is for packaging, so you can place the .so
next to the .love
file.
So I think it's some security thing inside Mac
Yes, that is also my impression.
when packaging the game this problem won't show up
That's great but doesn't help with just using / potentially hacking on a codebase someone has shared, which was my intent.
In any event, the instructions don't work. Perhaps it would be a good idea to update them to prevent other people wasting time on this.
Environment
Issue
When downloading this codebase and following the luasteam instructions....
... and renaming to
luasteam.ext
, the library is not found:This appears to be verified by third parties as per the comments in issue #14.
Attempted resolutions
Renaming to luastream.so
Renaming to
luasteam.so
appears to work better (also as per those comments), however still yields the error:Adding cpath hack to main.lua
As per this suggestion hack
cpath
.Didn't work, same error as above.
Situation
Can't use library following documentation's instructions on OSX. This is different to the other issue #14, which is about releasing on OSX.