Open BielBdeLuna opened 6 months ago
Hi, Can You provide output of
there is only one xr_3da executable installed in the system:
/usr/local/bin/xr_3da
as well as only one xr_3da autocompletion bash script in the system:
/usr/local/share/bash-completion/completions/xr_3da
I'm seeing that ldd /usr/local/bin/xr_3da
shows that: xrGame.so => /lib/x86_64-linux-gnu/xrGame.so (0x00007ee637200000)
while the install script from cmake states that:
/usr/local/lib/xrGame.so
-- Set non-toolchain portion of runtime path of "/usr/local/lib/xrGame.so" to ""
and in the system there are indeed two xrGame.so:
one in:
/usr/local/lib/xrGame.so
and another in:
/lib/x86_64-linux-gnu/xrGame.so
it seems that in ubuntu /lib/
is a symbolic link to /usr/lib/
I think that 'sudo make Install' is not installing it correctly:
I've unistalled it all with 'sudo make uninstall' and I saw that a couple of "xrsomething.so" files related to the xray engine where still in /usr/lib/x86_64-linux-gnu/
I erased them manually, now I made a new build and re-installed it with 'sudo make install'
and this time the error message with xr_3da changed:
xr_3da: error while loading shared libraries: xrGame.so: cannot open shared object file: No such file or directory
also ldd shows that indeed xrGame.so and a couple of "xrsomething.so" aren't found:
$ ldd /usr/local/bin/xr_3da
linux-vdso.so.1 (0x00007ffd5c19a000)
xrGame.so => not found
xrEngine.so => not found
xrCore.so => not found
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007958a5c00000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007958a5fce000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007958a5800000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007958a5ee3000)
/lib64/ld-linux-x86-64.so.2 (0x00007958a6021000)
now 'sudo make install' made an installation of those files but it seems the engine is not looking for those files where 'sudo make install' installed them
'sudo make install' installs the files in /usr/local/lib/xrGame.so
and not in /usr/lib/x86_64-linux-gnu/xrGame.so
where the engine goes to look for them
Can you run: find /usr -name xrGame.so 2> /dev/null Then set: LD_LIBRARY_PATH to catalog containing file and try again ldd on xr_3da binary?
Also can you try: dpkg -S /usr/lib/x86_64-linux-gnu/xrGame.so
find /usr -name xrGame.so 2> /dev/null returns: /usr/local/lib/xrGame.so
~how do I set the LD_LIBRARY_PATH ?~ I'm reading that it's better to export LD_LIBRARY_PATH before using the program rather than keep the it always pointed to a single place, o maybe this could be added to the cmake file so the program already points to that path?
after:
$ export LD_LIBRARY_PATH=/usr/local/lib/
then:
$ ldd /usr/local/bin/xr_3da
Does running xr_3da now works with set LD_LIBRARY_PATH?
yes :)
could /usr/local/lib/
be added to the cmake in some way? so it's user configurable
Can you try adding -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE during config? What happens when you set it to FALSE?
Also: objdump -x /usr/local/bin/xr_3da |grep 'R.*PATH'
Can you try adding -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE during config? What happens when you set it to FALSE?
this worked without the need to $ export LD_LIBRARY_PATH=/usr/local/lib/
It's easier to follow https://github.com/OpenXRay/xray-16/wiki/%5BEN%5D-How-to-build-and-setup-on-Linux
This problem is fixed, can be closed.
Describe the bug engine doesn't start because "undefined symbol: xrGame"
To Reproduce just type "xr_3da" and enjoy
Expected behavior open the engine without any error
BugTrap error report $ xr_3da xr_3da: symbol lookup error: xr_3da: undefined symbol: xrGame
Desktop (please complete the following information):
Additional context simply: $ git pull --recurse-submodules $ cd build $ make clean $ cmake .. (no extra options) $ make --jobs=14 $ sudo make install