• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error Compiling in Ubuntu 15.04

n0tw3n

New Member
Joined
Dec 7, 2015
Messages
1
Reaction score
0
Im following otclient ubuntu compiling tutorial and im getting this error:

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libphysfs.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
CMakeFiles/otclient.dir/build.make:3702: recipe for target 'otclient' failed
make[2]: *** [otclient] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

Im in ubuntu 15.04 x64 and libboost is version 1.58 instead of 1.55

Any ideas?
 
I'm also having this problem, also using libboost 1.58, and ubuntu 15.04 x64. If anyone can give some input it would be much appreciated! Or if someone could upload a compiled client for linux for 10.82
 
*Bump*

I compiled a client on an older x32 machine. I had to add a bunch of backwards compatible libraries to open the client on my usual set-up. So I can still use the client as is.
...
However, I would still like to solve this issue so I can tinker with and add mods. ... This is the error I'm receiving during CMake. I would love some assistance in getting the libboost setup correctly on 15.04 x64. I don't really know where to start.


Code:
CMake Error at /usr/share/cmake-3.2/Modules/FindBoost.cmake:1202 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.58.0

  Boost include path: /usr/include

  Could not find the following static Boost libraries:

          boost_system
          boost_thread
          boost_filesystem
          boost_chrono

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
 
** Update**
I managed to get past my last problem with CMake, but I'm still receiving the original error of the thread when compiling reaches 100%
 
Try this one , it wont use static libraries on linux then ;)
I had similar issue, god knows why that happened, it works before, well this solved this problem for me.

In CMakeLists.txt find something like this, and make sure the option is OFF like below :

Code:
option(USE_STATIC_LIBS "Don't use shared libraries (dlls)" OFF)

But under windows, I rather wont recomend using this :p
 
Same problem here. I've followed @tarjei 's hint and edited src/framework/CMakeLists.txt but result is same as in the first post. I guess that physfs is not available for x64 compilers
 
Last edited:
Try this one , it wont use static libraries on linux then ;)
I had similar issue, god knows why that happened, it works before, well this solved this problem for me.

In CMakeLists.txt find something like this, and make sure the option is OFF like below :

Code:
option(USE_STATIC_LIBS "Don't use shared libraries (dlls)" OFF)

But under windows, I rather wont recomend using this :p
If you don't want to modify OTClient files, you can use:
Code:
cd build
# in case you ran 'cmake' before, clean build directory
rm -rf *
cmake .. -DUSE_STATIC_LIBS=OFF
in place of:
Code:
cd build
cmake ..

If anyone get there and still has this problem. There is a fix:
Error compiling for Ubuntu · Issue #885 · edubart/otclient (https://github.com/edubart/otclient/issues/885#issuecomment-373012124)
It also fix:
Code:
x86_64-linux-gnu/libogg.a(framing.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
Code:
Install mercurial:

sudo apt-get install mercurial

Download physfs source:

hg clone -r stable-2.0 http://hg.icculus.org/icculus/physfs/

Run:

cd physfs
sudo mkdir build
cd build

Now we want to start compile/install it:

sudo cmake ..
sudo make
sudo make install
sudo cp /usr/local/lib/libphysfs.a /usr/lib/gcc/x86_64-linux-gnu/
 
Last edited:
in xubuntu 18.04 i also got the "libphysfs.a: error adding symbols: Archive has no index; run ranlib to add one" error, after some investigation it turns out @Geisor's solution of running "cmake .. -DUSE_STATIC_LIBS=OFF" solved it, but DUSE_STATIC_LIBS is not properly applied when running cmake if cmake had been executed before, so i had to run "rm -rf *" to clean up from the previous cmake, THEN run "cmake .. -DUSE_STATIC_LIBS=OFF", and then the "Archive has no index" error was gone :)
 
Back
Top