OpenTomb icon indicating copy to clipboard operation
OpenTomb copied to clipboard

Building problem

Open FGAR55 opened this issue 6 years ago • 14 comments

-- 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 of tmpnam' 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..

FGAR55 avatar Sep 23 '18 15:09 FGAR55

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.

vvs- avatar Sep 23 '18 18:09 vvs-

it's ubuntu 64-bit version

FGAR55 avatar Sep 23 '18 19:09 FGAR55

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.

vvs- avatar Sep 23 '18 19:09 vvs-

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

FGAR55 avatar Sep 23 '18 20:09 FGAR55

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.

RICCIARDI-Adrien avatar Sep 23 '18 21:09 RICCIARDI-Adrien

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 avatar Sep 24 '18 18:09 FGAR55

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

FGAR55 avatar Sep 25 '18 18:09 FGAR55

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.

RICCIARDI-Adrien avatar Sep 25 '18 19:09 RICCIARDI-Adrien

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.

vvs- avatar Sep 26 '18 11:09 vvs-

Is this resolved?

Gh0stBlade avatar Oct 13 '18 17:10 Gh0stBlade

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

hoeppie avatar Dec 29 '18 20:12 hoeppie

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.

vvs- avatar Jan 01 '19 16:01 vvs-

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

hoeppie avatar Jan 10 '19 11:01 hoeppie

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.

RICCIARDI-Adrien avatar Jan 10 '19 14:01 RICCIARDI-Adrien