larsiusprime / SteamWrap

Haxe native extension for the Steam API
MIT License
106 stars 44 forks source link

Error loading steamwrap on Linux #20

Open kennygoff opened 6 years ago

kennygoff commented 6 years ago

I've run into a wall trying to get steamwrap to load on Linux, and would love some help trying to fix it.

I have a forked branch with a few new networking additions working on Mac and Windows, but I keep getting this error on Linux:

Steam.hx:448: Running non-Steam version (Could not load module steamwrap@SteamWrap__ClearAchievement__1)

I've tracked this down to be an error loading the C++ primitives from the steamwrap.ndll file but I cannot figure out why. I've tried rebuilding my steamwrap branch from scratch and have gotten no errors. I've confirmed several times that steamwrap.ndll, steam_appid.txt, and libsteam_api.so are all in my executable directory.

I thought it might be a silent failure in my steamwrap branch's builds, but I've also tried running the Test program using this repo's master branch and it's ndll's. That didn't work either, so I'm unsure if its just a linux issue or maybe hxcpp. Unfortunately hxcpp 3.4.188 won't work on linux for me, and 3.4.64 doesn't support C++11 (required for the YellowAfterlife's networking branch), so I'm stuck with the master build. I'm not too familiar with hxcpp native extensions so if this is where the problem is I could definitely use a hand.

Thanks for all the work you've done on this! And thanks in advance for any help you can provide. Once I get these last issues ironed out I'll throw up my api changes in a PR.

System Info

larsiusprime commented 6 years ago

Are you properly copying over the linux dependencies? One nice sanity check you can try is to download the Steam version of defender's quest and make sure your executable and its surrounding files looks the same as the layout I have (which is confirmed working). I can give you a steam key if you need it.

On Mon, Feb 26, 2018 at 6:43 PM, Kenny Goff notifications@github.com wrote:

I've run into a wall trying to get steamwrap to load on Linux, and would love some help trying to fix it.

I have a forked branch https://github.com/kennygoff/SteamWrap/tree/feature/p2p-session with a few new networking additions working on Mac and Windows, but I keep getting this error on Linux:

Steam.hx:448: Running non-Steam version (Could not load module steamwrap@SteamWrapClearAchievement1)

I've tracked this down to be an error loading the C++ primitives from the steamwrap.ndll file but I cannot figure out why. I've tried rebuilding my steamwrap branch from scratch and have gotten no errors. I've confirmed several times that steamwrap.ndll, steam_appid.txt, and libsteam_api.so are all in my executable directory.

I thought it might be a silent failure in my steamwrap branch's builds, but I've also tried running the Test program using this repo's master branch and it's ndll's. That didn't work either, so I'm unsure if its just a linux issue or maybe hxcpp. Unfortunately hxcpp 3.4.188 won't work on linux for me, and 3.4.64 doesn't support C++11 (required for the YellowAfterlife's networking branch), so I'm stuck with the master build. I'm not too familiar with hxcpp native extensions so if this is where the problem is I could definitely use a hand.

Thanks for all the work you've done on this! And thanks in advance for any help you can provide. Once I get these last issues ironed out I'll throw up my api changes in a PR.

System Info

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/larsiusprime/SteamWrap/issues/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtG-Jg_zCPoHTvIUt_R6S-rD0Z6TLJgks5tY0-4gaJpZM4SUKya .

-- www.fortressofdoors.com -- Games, Art, Design

kennygoff commented 6 years ago

I believe so, they are being copied to the location specified in include.xml, in the same directory as the executable. The following is what's relevant in the directory:

linux64/cpp/bin/GameExecutable
linux64/cpp/bin/steamwrap.ndll
linux64/cpp/bin/libsteam_api.so
linux64/cpp/bin/steam_appid.txt
...

I don't have a DQ copy to sanity check but can shoot me a steam key at me@kennygoff.com. Thanks for the help!

larsiusprime commented 6 years ago

Cool, I'll send that over first chance. Are you also making sure to set the right permissions on everything with chmod+rwx ?

On Mon, Feb 26, 2018 at 7:17 PM, Kenny Goff notifications@github.com wrote:

I believe so, they are being copied to the location specified in include.xml, in the same directory as the executable. The following is what's relevant in the directory:

linux64/cpp/bin/GameExecutable linux64/cpp/bin/steamwrap.ndll linux64/cpp/bin/libsteam_api.so linux64/cpp/bin/steam_appid.txt ...

I don't have a DQ copy to sanity check but can shoot me a steam key at me@kennygoff.com. Thanks for the help!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/larsiusprime/SteamWrap/issues/20#issuecomment-368711663, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtG-CiJEW6G7zBOHj1Z8z-fhOqlLqh8ks5tY1eXgaJpZM4SUKya .

-- www.fortressofdoors.com -- Games, Art, Design

kennygoff commented 6 years ago

Thanks! Hmm... I'm actually not sure, which files should I be doing that too? The files copied to my executable directory? Or the steam sdk files that are copied to my SteamWrap branch?

larsiusprime commented 6 years ago

I just run it recursively on the executable directory. I'm not exactly a linux whiz, but it's worth a shot.

I think what's more likely is that your CFFI modules aren't loading, however.

On Mon, Feb 26, 2018 at 7:35 PM, Kenny Goff notifications@github.com wrote:

Thanks! Hmm... I'm actually not sure, which files should I be doing that too? The files copied to my executable directory? Or the steam sdk files that are copied to my SteamWrap branch?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/larsiusprime/SteamWrap/issues/20#issuecomment-368715162, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtG-Do043e-AWSDI3Au2bpizorh-EOJks5tY1vjgaJpZM4SUKya .

-- www.fortressofdoors.com -- Games, Art, Design

kennygoff commented 6 years ago

Updating the permissions on the executable directory didn't fix it, unfortunately.

larsiusprime commented 6 years ago

Kay. Will try to sort this out for you tomorrow!

On Mon, Feb 26, 2018 at 10:30 PM, Kenny Goff notifications@github.com wrote:

Updating the permissions on the executable directory didn't fix it, unfortunately.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/larsiusprime/SteamWrap/issues/20#issuecomment-368743974, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtG-EVyYdTN02QGux2AhyWetD4YysM4ks5tY4TtgaJpZM4SUKya .

-- www.fortressofdoors.com -- Games, Art, Design

kennygoff commented 6 years ago

Hey quick update on this. I was prepping a build for Mac/Windows for a Steam deploy and as a sanity check tried to launch an older version of game (same SteamWrap though) through the Steam launcher on Linux and it worked and initializes Steam properly! Last time I tried doing this a week or two ago it crashed on startup. I updated the game to the latest build and sure enough, it works.

This means that it's actually only broken when trying to launch manually with steam_appid.txt. I primarily develop on Mac and Windows so I don't mind doing Linux testing through the full Steam deploy process.

Would still like to figure out why the "dev" build process doesn't work for documentation purposes, but definitely a lower priority problem. Thanks so far for the help!

larsiusprime commented 5 years ago

I'm doing my rounds on closing out issues and I think I just reproduced this myself :D Definitely mysterious.