View Issue Details

IDProjectCategoryLast Update
0021171AI War 2Bug - OtherMay 17, 2019 11:11 pm
ReporterBadgerBadger Assigned ToChris_McElligottPark  
Severityminor 
Status resolvedResolutionfixed 
Product VersionBETA 0.855 Galactic Markings 
Fixed in VersionBETA 0.861 Strength Of Remains 
Summary0021171: missing libsteam_api64.so on linux
DescriptionWhen I start the game on linux I see errors like
-----------
DllNotFoundException: libsteam_api64.so
Stack Trace: SteamNative.Platform+Linux64.SteamApi_SteamAPI_Init () (at <9f47993124584e41965ffe930fb3557d>:0)
SteamNative.SteamApi.SteamAPI_Init () (at <9f47993124584e41965ffe930fb3557d>:0)
Facepunch.Steamworks.Interop.NativeInterface.InitClient (Facepunch.Steamworks.BaseSteamworks steamworks) (at <9f47993124584e41965ffe930fb3557d>:0)
Facepunch.Steamworks.Client..ctor (System.UInt32 appId) (at <9f47993124584e41965ffe930fb3557d>:0)
ArcenGameController.Update () (at <35d601ba650f4952942acdc52b45c438>:0)
                                                                                                                                                                                                                                                           
That dll is sitting in ~/AIWar2 (ie the game install directory). I copied it into ReliableDLLStorage as well but it still claims to be unfindable.
TagsNo tags attached.

Relationships

related to 0021168 resolvedChris_McElligottPark Facepunch exception at game start 

Activities

Chris_McElligottPark

May 15, 2019 4:43 pm

administrator   ~0051607

Can you try copying it into AIWar2Linux_Data\Plugins\x86_64 and see if that helps? If not there, then AIWar2Linux_Data\Plugins\? If not there, then AIWar2Linux_Data\Managed?

One of those ought to fix it, but I don't know which one. I can then set up the scripts to handle that automatically. Thanks!

BadgerBadger

May 16, 2019 1:01 am

manager   ~0051612

Last edited: May 16, 2019 1:01 am

Here's what I have:
(23:00:23) hostname:~/AIWar2 find . | grep libsteam
./AIWar2Linux_Data/Managed/libsteam_api64.so
./AIWar2Linux_Data/Managed/libsteam_api.so
./AIWar2Linux_Data/Plugins/libsteam_api64.so
./AIWar2Linux_Data/Plugins/libsteam_api.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api64.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api.so
./ReliableDLLStorage/libsteam_api64.so
./ReliableDLLStorage/libsteam_api.so
./libsteam_api64.so
./libsteam_api.so

The problem still occurs

Chris_McElligottPark

May 16, 2019 10:10 am

administrator   ~0051625

Does this work?

https://github.com/Facepunch/Facepunch.Steamworks/issues/212

Chris_McElligottPark

May 16, 2019 10:11 am

administrator   ~0051626

Basically that would be: ./AIWar2Linux_Data/Mono/libsteam_api64.so

BadgerBadger

May 16, 2019 10:18 am

manager   ~0051627

The problem still occurs. Note that the directory is called MonoBleedingEdge, not Mono on Linux; unclear if that makes a difference

./AIWar2Linux_Data/Managed/libsteam_api64.so
./AIWar2Linux_Data/Managed/libsteam_api.so
./AIWar2Linux_Data/Plugins/libsteam_api64.so
./AIWar2Linux_Data/Plugins/libsteam_api.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api64.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api.so
./AIWar2Linux_Data/MonoBleedingEdge/libsteam_api64.so <===
./AIWar2Linux_Data/MonoBleedingEdge/libsteam_api.so <===
./ReliableDLLStorage/libsteam_api64.so
./ReliableDLLStorage/libsteam_api.so
./libsteam_api64.so
./libsteam_api.so

BadgerBadger

May 16, 2019 10:23 am

manager   ~0051628

I also tried a few more places. The problem still reproduces

./AIWar2Linux_Data/Managed/libsteam_api64.so
./AIWar2Linux_Data/Managed/libsteam_api.so
./AIWar2Linux_Data/Plugins/libsteam_api64.so
./AIWar2Linux_Data/Plugins/libsteam_api.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api64.so
./AIWar2Linux_Data/Plugins/x86_64/libsteam_api.so
./AIWar2Linux_Data/libsteam_api64.so
./AIWar2Linux_Data/libsteam_api.so
./AIWar2Linux_Data/MonoBleedingEdge/libsteam_api64.so
./AIWar2Linux_Data/MonoBleedingEdge/libsteam_api.so
./AIWar2Linux_Data/Resources/libsteam_api64.so
./AIWar2Linux_Data/Resources/libsteam_api.so
./AIWar2Linux_Data/Mono/libsteam_api64.so
./AIWar2Linux_Data/Mono/libsteam_api.so
./ReliableDLLStorage/libsteam_api64.so
./ReliableDLLStorage/libsteam_api.so
./libsteam_api64.so
./libsteam_api.so
./MonoBleedingEdge/libsteam_api64.so
./MonoBleedingEdge/libsteam_api.so

BadgerBadger

May 16, 2019 10:26 am

manager   ~0051629

Last edited: May 16, 2019 10:34 am

I'm also seeing the message

Preloaded 'ScreenSelector.so'
Unable to preload the following plugins:
    libsteam_api.so
    libsteam_api64.so
    libsteam_api.so
    libsteam_api64.so

in the debug log. This is really weird, since ScreenSelector is found but the other two aren't, and they are all in the same directory:

(08:32:55) hostname:~/AIWar2/AIWar2Linux_Data/Plugins/x86_64 $ ls
libsteam_api64.so libsteam_api.so ScreenSelector.so

BadgerBadger

May 16, 2019 10:41 am

manager   ~0051630

Last edited: May 16, 2019 10:42 am

I ran the game through strace and I see
[pid 20436] openat(AT_FDCWD, "/home/username/AIWar2/AIWar2Linux_Data/Plugins/libsteam_api.so", O_RDONLY|O_CLOEXEC) = 8
[pid 20436] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320?\1\0004\0\0\0"..., 832) = 832
[pid 20436] close(8) = 0
[pid 20436] openat(AT_FDCWD, "/home/username/AIWar2/AIWar2Linux_Data/Plugins/libsteam_api64.so", O_RDONLY|O_CLOEXEC) = 8
[pid 20436] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320?\1\0004\0\0\0"..., 832) = 832
[pid 20436] close(8) = 0
<So here the game is opening those files, reading the first 832 bytes, then closing the files. Reading 832 is standard for ELF binaries, if I recall correctly>
[pid 20436] openat(AT_FDCWD, "/home/username/AIWar2/AIWar2Linux_Data/Plugins/x86_64/ScreenSelector.so", O_RDONLY|O_CLOEXEC) = 8
[pid 20436] read(8, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`!\0\0\0\0\0\0"..., 832) = 832
[pid 20436] fstat(8, {st_mode=S_IFREG|0775, st_size=133994, ...}) = 0
[pid 20436] mmap(NULL, 2135672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x7eff92853000
[pid 20436] mprotect(0x7eff9285d000, 2093056, PROT_NONE) = 0
[pid 20436] mmap(0x7eff92a5c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x9000) = 0x7eff92a5c000
[pid 20436] close(8) = 0
<Here for ScreenSelector.so it's reading 832 bytes and then opening the file for mmap>

Perhaps there's something wrong with the libsteam.so files? It seems like the game is looking at them and saying "Nope, this isn't what I'm looking for"

BadgerBadger

May 16, 2019 10:44 am

manager   ~0051631

(08:42:33) hostname:~/AIWar2 $ file libsteam_api*
libsteam_api64.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=de6a7fc5b061ccf3695e47b673847d7646030982, not stripped
libsteam_api.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=de6a7fc5b061ccf3695e47b673847d7646030982, not stripped
(08:42:36) hostname:~/AIWar2 $ ls -l libsteam_api*
-rwxrwxr-x 1 432696 May 1 00:21 libsteam_api64.so
-rwxrwxr-x 1 432696 May 1 00:21 libsteam_api.so

Are libsteam_api64 and libsteam_api intended to be literally the same file? Note the sha1 checksums match

Chris_McElligottPark

May 16, 2019 12:35 pm

administrator   ~0051634

This is... very strange indeed. Okay, so here's what I know:

1. Back in the past, there was a pair of libsteam_api64 and libsteam_api, and those were the 64bit and 32bit versions, respectively.

2. Valve still provides both of those.

3. Facepunch only supports 64bit stuff (same as us), so they apparently renamed libsteam_api64 to libsteam_api.

4. I for some reason couldn't find their version at the time I was messing with all this, and so I used the versions from Valve. This may be the root of the problem with both the OSX and Linux integrations right now.

5. With that in mind, you might want to try using the .so files from here: https://github.com/Facepunch/Facepunch.Steamworks/tree/master/UnityPlugin/redistributable_bin
OR, possibly from here:
https://github.com/Facepunch/Facepunch.Steamworks/tree/master/Facepunch.Steamworks

If those versions work, then I'll replace the versions in svn with those (or please feel free to do so yourself). Thanks for all the experimenting with this! It's a frustrating mystery why so much changed, but it shouldn't be something that repeatedly happens I don't think.

There is some added info here for both platforms, but honestly I think it's out of date: https://github.com/Facepunch/Facepunch.Steamworks/wiki/Library-Locations

BadgerBadger

May 17, 2019 1:40 am

manager   ~0051658

I took the file from https://github.com/Facepunch/Facepunch.Steamworks/blob/master/UnityPlugin/redistributable_bin/linux64/libsteam_api.so and stuck it in the AIWar2Linux_Data/Plugins/x86_64 (as both libsteam_api.so and libsteam_api64.so), then I also created a AIWar2Linux_Data/Mono directory and did the same (copied the libsteam_api.so as both that file and libsteam_api64.so) and that fixed the problem.

Chris_McElligottPark

May 17, 2019 11:11 pm

administrator   ~0051694

Thank you!

* Integrated revised versions of the Steamworks .so files for linux, and the related files for OSX as well.
** Thanks to Badger for chasing down what needed to change on Linux; please let us know if it still isn't showing you as logged in properly in the new builds in either of those two OSes, because that would likely mean that something didn't get copied properly in our build scripts.

Issue History

Date Modified Username Field Change
May 1, 2019 1:22 pm BadgerBadger New Issue
May 1, 2019 1:22 pm BadgerBadger Status new => assigned
May 1, 2019 1:22 pm BadgerBadger Assigned To => Chris_McElligottPark
May 1, 2019 1:25 pm BadgerBadger Relationship added related to 0021168
May 15, 2019 4:43 pm Chris_McElligottPark Note Added: 0051607
May 16, 2019 1:01 am BadgerBadger Note Added: 0051612
May 16, 2019 1:01 am BadgerBadger Note Edited: 0051612
May 16, 2019 10:10 am Chris_McElligottPark Note Added: 0051625
May 16, 2019 10:11 am Chris_McElligottPark Note Added: 0051626
May 16, 2019 10:18 am BadgerBadger Note Added: 0051627
May 16, 2019 10:23 am BadgerBadger Note Added: 0051628
May 16, 2019 10:26 am BadgerBadger Note Added: 0051629
May 16, 2019 10:34 am BadgerBadger Note Edited: 0051629
May 16, 2019 10:41 am BadgerBadger Note Added: 0051630
May 16, 2019 10:42 am BadgerBadger Note Edited: 0051630
May 16, 2019 10:44 am BadgerBadger Note Added: 0051631
May 16, 2019 12:35 pm Chris_McElligottPark Note Added: 0051634
May 17, 2019 1:40 am BadgerBadger Note Added: 0051658
May 17, 2019 11:11 pm Chris_McElligottPark Status assigned => resolved
May 17, 2019 11:11 pm Chris_McElligottPark Resolution open => fixed
May 17, 2019 11:11 pm Chris_McElligottPark Fixed in Version => BETA 0.861 Strength Of Remains
May 17, 2019 11:11 pm Chris_McElligottPark Note Added: 0051694