opentomb / OpenTomb

An open-source Tomb Raider 1-5 engine remake
http://opentomb.github.io/
GNU Lesser General Public License v3.0
1.39k stars 145 forks source link

Building problem #558

Open FGAR55 opened 6 years ago

FGAR55 commented 6 years ago

-- Could NOT find Threads (missing: Threads_FOUND) -- Configuring done -- Generating done -- Build files have been written to: /home/ferchu/Descargas/OpenTomb-master [100%] Built target lua5.3 [100%] Built target freetype2 [100%] Built target bullet [100%] Linking CXX executable OpenTomb extern/lua/liblua5.3.a(loslib.c.o): En la función os_tmpname': loslib.c:(.text+0x177): aviso: the use oftmpnam' is dangerous, better use `mkstemp' /usr/bin/x86_64-linux-gnu-ld: CMakeFiles/OpenTomb.dir/src/fmv/stream_codec.c.o: referencia sin definir al símbolo 'pthread_create@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/OpenTomb.dir/build.make:2498: recipe for target 'OpenTomb' failed make[2]: [OpenTomb] Error 1 CMakeFiles/Makefile2:69: recipe for target 'CMakeFiles/OpenTomb.dir/all' failed make[1]: [CMakeFiles/OpenTomb.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

i've installed every library but i don't know why i can't build the source..

vvs- commented 6 years ago

I suppose you are using Linux. But what is your distribution and its version?

First I'd look at what CMake modules are actually installed. And as you are running 64-bit OS, its multilib dependencies could interfere as well.

FGAR55 commented 6 years ago

it's ubuntu 64-bit version

vvs- commented 6 years ago

I assume that different Ubuntu versions might have different problems. Which version exactly?

Personally, I'm not using Ubuntu, so I'm not sure what problems it might have with CMake or glibc. But someone else probably could if there'd be more specific information.

FGAR55 commented 6 years ago

I assume that different Ubuntu versions might have different problems. Which version exactly?

lsb_release -a

Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic

RICCIARDI-Adrien commented 6 years ago

Hi, I'm building OpenTomb on the same Ubuntu version and it's working well. Using dpkg -l | grep -i thread I found I have libpthread-stubs0-dev:amd64 package installed. It's described as "pthread stubs not provided by native libc, development files". I didn't try to remove it to see if it was mandatory for the build, but you may check if you have this package.

FGAR55 commented 6 years ago

Hi, I'm building OpenTomb on the same Ubuntu version and it's working well. Using dpkg -l | grep -i thread I found I have libpthread-stubs0-dev:amd64 package installed. It's described as "pthread stubs not provided by native libc, development files". I didn't try to remove it to see if it was mandatory for the build, but you may check if you have this package.

i've to format my pc so i'm reinstalling every single library and ubuntu of course, anyways thank you!!!!!

FGAR55 commented 6 years ago

Hi, I'm building OpenTomb on the same Ubuntu version and it's working well. Using dpkg -l | grep -i thread I found I have libpthread-stubs0-dev:amd64 package installed. It's described as "pthread stubs not provided by native libc, development files". I didn't try to remove it to see if it was mandatory for the build, but you may check if you have this package.

this package is already installed in my OS too. dpkg -l | grep -i thread

libboost-thread 1.65.1:amd64

RICCIARDI-Adrien commented 6 years ago

I have the package you mentionned installed by default too. Are you getting the same build error with your fresh Ubuntu install ? If yes, you can try installing libpthread-stubs0-dev.

vvs- commented 6 years ago

libboost-thread 1.65.1:amd64

I doubt that package has anything to do with OpenTomb which doesn't use Boost in the first place.

Gh0stBlade commented 6 years ago

Is this resolved?

hoeppie commented 5 years ago

Hi, I manged to build a version on ubuntu 18.10 64 bit. I added in CMakeLists.txt: set(CMAKE_EXE_LINKER_FLAGS "-pthread -no-pie -static-libgcc") set(CMAKE_CXX_FLAGS "-std=c++11") and for linking: /usr/lib/x86_64-linux-gnu/libc.so /usr/lib/x86_64-linux-gnu/libdl.so regards Hoeppie

vvs- commented 5 years ago

C++11 is already enabled in CMakeLists.txt. As for pthread, cmake should care for this automatically. If that doesn't work then something else is preventing cmake from working properly. Putting it explicitly is merely a workaround for real problem.

hoeppie commented 5 years ago

Mh, intersting, I found it only for the windows compiling path.

RICCIARDI-Adrien commented 5 years ago

Hi, I never had to modify CMakeLists.txt to build on Ubuntu (I'm building since Ubuntu 17.10 with all Ubuntu versions). It might be due to a problem on your system.