Closed ghost closed 8 years ago
Thanks for pointing this out. I thought I had tested this on another machine, but I suppose that machine may have had subhook installed.
Did you use a release tarball, or build from source?
I see what the problem is. This is working fine for people using install.sh
, and not for people using the prepackaged binaries because CMake is setting an absolute path for subhook. I'll see about having it statically link subhook.
@Arvife can you please try 1.1-r4 and tell me if that fixes the problem?
@RomanHargrave That fixed issues with libsubhook.so but now I'm getting the same error with libssl.so.1.0.2
Ah. You should make sure you have that installed, which you probably do.
Do you mind telling me what distro & version you are using?
I'm using Arch Linux. Edit: Looking through /usr/lib/ I have libssl.so.1.0.0 but not libssl.so.1.0.2, I'll try to get 1.0.2 right now and see if that fixes the problem
I had a look at Arch's package search and it looks like you have the correct version of openssl, but the library file is symlinked incorrectly. Can you please (carefully) run the following as root:
cp /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.1.0.2
And then, even though it shouldn't matter, run ldconfig
(as root also).
If that causes trouble, remove the link.
I ended up linked libssl.so.1.0.2 to libssl.so.1.0.0 which looks fine. I am now getting a different error:
/home/me/.local/share/Steam/steamapps/common/PAYDAY 2/payday2_release: /home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.8' not found (required by ./libblt_loader.so)
@Arvife Now that is very strange. Not only am I, nor anyone else I have asked, having that issue, but it looks like it's a steam runtime issue. I checked to see if steam is shipping a copy of the c++ standard library, and it is not.
Now, I don't want to say that you should delete it, but it obviously should not be there. It's possible that it's left over from an older steam install. Can you try removing it?
I removed it and it launched but it seems to crash as soon as I reach the main menu (passing all of the startup videos and the press any key screen).
08:48:01 PM Info: installing BLT LUA API
08:48:01 PM Info: Loading BLT Base
08:48:01 PM Info: luaL_loadfile() = 0
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_manager.txt', no data loaded...
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_keybinds.txt', no data loaded...
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_updates.txt', no data loaded...
08:48:01 PM Lua: [Mods] Loading mods for state (table: 0x7f268c15a880)
08:48:01 PM Info: open dir: mods/
08:48:01 PM Lua: [Mods] Loading mod: base...
08:48:01 PM Info: lua_pcall(...) = 0
08:48:01 PM Info: installing BLT LUA API
08:48:01 PM Info: Loading BLT Base
08:48:01 PM Info: luaL_loadfile() = 0
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_manager.txt', no data loaded...
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_keybinds.txt', no data loaded...
08:48:01 PM Lua: [Warning] Could not load file 'mods/saves/mod_updates.txt', no data loaded...
08:48:01 PM Lua: [Mods] Loading mods for state (table: 0x7f268c158240)
08:48:01 PM Info: open dir: mods/
08:48:01 PM Lua: [Mods] Loading mod: base...
08:48:01 PM Info: lua_pcall(...) = 0
08:48:04 PM Lua: [Updates] Attempting to remove temporary hook dll...
08:48:04 PM Lua: [Warning] Could not remove hook dll: IPHLPAPI_temp.dll: No such file or directory
08:48:04 PM Info: http transfer thread created for `http://api.paydaymods.com/updates/retrieve/?mod[0]=payday2blt&mod[1]=payday2bltdll`
Game removed: AppID 218620 "PAYDAY 2", ProcID 22727
It looks like it crashed right after starting an http transfer. My guess is a CURL version difference.
Could you try following the manual build instructions and then copy libblt_loader.so
to your PAYDAY folder?
Clone the repo and then run this:
Manual build:
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make
I ran into issues building it so I reverted the CMakeLists.txt file to commit d677f766d89fb052d690f9eeb3100e06dbfd83fc which fixed it. Anyway, running with my compiled version gave me this error and crashed upon starting the game
/home/me/.local/share/Steam/steamapps/common/PAYDAY 2/payday2_release: /home/me/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libcurl.so.4: version 'CURL_OPENSSL_4' not found (required by ./libblt_loader.so)
After I saw that error I removed the libcurl.so.4 from the steam runtime and it seemed to fix it. No more crashes and the mod I was trying to use seems to work fine.
Do you want any more tests/info done or can the issue be closed?
Which issues did you run in to when building?
Other than that, sounds good. I hope that's not too big of an issue. My main concern with the binary releases is that they work on SteamOS, since that's most likely to be the group of users that won't be terribly familiar with building from source.
Here's the issue I was having:
[ 9%] Building CXX object CMakeFiles/blt_loader.dir/src/hook.cc.o
/home/me/building/blt4l/src/hook.cc:5:21: fatal error: subhook.h: No such file or directory
compilation terminated.
CMakeFiles/blt_loader.dir/build.make:206: recipe for target 'CMakeFiles/blt_loader.dir/src/hook.cc.o' failed
make[2]: *** [CMakeFiles/blt_loader.dir/src/hook.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/blt_loader.dir/all' failed
make[1]: *** [CMakeFiles/blt_loader.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Did you have the submodule checked out? I tested a fresh-repo-build by cloning and running the install script, which clones the submodules.
I have no idea, I'm not very good with git. I ran git clone https://github.com/blt4linux/blt4l.git
and entered that directory then went through the steps listed under 'Building & Manual Install'.
Ah. I should add the submodule bits.
Yeah. When you clone the repo, you can run git clone --recursive ...
, or if you have already cloned the repo you can run git submodule init
and then git submodule update
Closing since it seams like issue was resolved. Be sure you are using the latest, btw, because that rev you checked out may not support HTTP properly. Keep me up to date here, even if the issue is closed.
I am having the same build error. I followed the README's build instructions and also tried install.sh, they result in the same error.
[user@pc blt4l]$ sh install.sh
which: no dpkg in (/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/bin)
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/hardening-wrapper/bin/c++
-- Check for working CXX compiler: /usr/lib/hardening-wrapper/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/temp/blt4l/installer_build
Scanning dependencies of target blt_loader
[ 9%] Building C object CMakeFiles/blt_loader.dir/subhook/subhook.c.o
In file included from /home/user/temp/blt4l/subhook/subhook.c:52:0:
/home/user/temp/blt4l/subhook/subhook_x86.c: In function ‘subhook_make_jmp’:
/home/user/temp/blt4l/subhook/subhook_x86.c:237:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jmp->psh_addr = (uint32_t)dst; // Truncate
^
[ 18%] Building CXX object CMakeFiles/blt_loader.dir/src/event.cc.o
[ 27%] Building CXX object CMakeFiles/blt_loader.dir/src/zip.cc.o
[ 36%] Building CXX object CMakeFiles/blt_loader.dir/src/fs.cc.o
[ 45%] Building CXX object CMakeFiles/blt_loader.dir/src/http.cc.o
[ 54%] Building CXX object CMakeFiles/blt_loader.dir/src/log.cc.o
[ 63%] Building CXX object CMakeFiles/blt_loader.dir/src/hook.cc.o
/home/user/temp/blt4l/src/hook.cc:5:21: fatal error: subhook.h: No such file or directory
compilation terminated.
CMakeFiles/blt_loader.dir/build.make:206: recipe for target 'CMakeFiles/blt_loader.dir/src/hook.cc.o' failed
make[2]: *** [CMakeFiles/blt_loader.dir/src/hook.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/blt_loader.dir/all' failed
make[1]: *** [CMakeFiles/blt_loader.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
could not find /home/user/temp/blt4l/installer_build/libblt_loader.so
I also have the same steam-runtime errors as here, but after removing libstdc++.so.6, the output says it can't find libcurl-gnutls.so.4, which I think is explicitly mentioned as unsupported in the README, so I'm unsure how to proceed.
@xiyzzc Did you try doing what RomanHargrave said? If you did and it didn't work then open CMakeFiles.txt and replace the whole file's contents with the one I'll have below, otherwise try what he said and see if it compiles.
`cmake_minimum_required(VERSION 3.0.0) project(blt4l)
add_subdirectory(subhook)
add_definitions(-D_GNU_SOURCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fpermissive --std=gnu++11")
include_directories(include subhook)
set(SOURCE_FILES src/event.cc src/zip.cc src/fs.cc src/http.cc src/log.cc src/hook.cc src/lapi.cc src/lapi_http.cc )
add_library(blt_loader SHARED ${SOURCE_FILES} src/blt_main.cc)
target_link_libraries(blt_loader subhook dl curl ssl z) `
@Arvife If you are referring to submodules in git, yes that was all done. Following your directions lets it compile, and after removing steam's libcurl it will launch, so thanks.
PD2 seems to crash when I set the launch option (loading BLT). Looking in the dump files I found this
/home/me/.local/share/Steam/steamapps/common/PAYDAY 2/payday2_release: error while loading shared libraries: libsubhook.so: cannot open shared object file: No such file or directory
I'm guessing the subhook binary isn't included in release versions?