change Dockerfile to specific ubuntu version
Hello,
I am trying to compile and use otclient with Docker but it's failing to compile on ubuntu:latest docker image. I recommend to change the Dockerfile to ubuntu:16.04 which has no any problem.
@gunzino is the build still failing if you add PR #1001 ?
i suspect it's an OpenSSL >= 1.1.0 compatibility issue (which that PR attempts to address)
@gunzino PR #1001 was just merged, i think that fixes the modern ubuntu errors (and a guy commenting in #1001 said he tested it on ubuntu 18.04 with that patch and it worked), please retry now and let us know if it's still a problem (i think it's solved)
@divinity76 Hello,
Actually I have problem compiling it, I get: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../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
@gunzino and what happens if you add set(USE_STATIC_LIBS OFF) to line 152 here and re-compile? https://github.com/edubart/otclient/blob/aa19f45d94b48a364c5cb6951e3090b72838ecfc/src/framework/CMakeLists.txt#L152
(full recompile including cmake and make)
@divinity76 That helped. Thank you. Now after succesfull build I've got this: libGL error: failed to load driver: swrast X Error of failed request: GLXBadContext Major opcode of failed request: 154 (GLX) Minor opcode of failed request: 6 (X_GLXIsDirect) Serial number of failed request: 35 Current serial number in output stream: 34
I use Ubuntu 18.04 with nvidia-driver-390
@gunzino uhm.. missing opengl runtime libraries? what happens if you run sudo apt-get install -y mesa-utils libgl1-mesa-glx and run it again?
@divinity76
didn't help ;/
@gunzino i have just successfully compiled and started OTClient on Xubuntu 18.04,
notable changes i had to do in addition to the instructions posted at https://github.com/edubart/otclient/wiki/Compiling-on-Linux :
run sudo apt install libogg-dev
and run cmake .. -DUSE_STATIC_LIBS=OFF instead of cmake .. (also note that cmake won't apply this properly if you've previously run cmake .., so if you have done that previously then make sure to run rm -rf * first to make sure DUSE_STATIC_LIBS=OFF is properly applied)
here is my logfile from git clone to successful compilation, log created with the script command, can you try to do the same as i did in this log and tell me where you get stuck?
otc.log