Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building problem #558

Open
FGAR55 opened this issue Sep 23, 2018 · 14 comments
Open

Building problem #558

FGAR55 opened this issue Sep 23, 2018 · 14 comments

Comments

@FGAR55
Copy link

FGAR55 commented Sep 23, 2018

-- 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..

@vvs-
Copy link
Contributor

vvs- commented Sep 23, 2018

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
Copy link
Author

FGAR55 commented Sep 23, 2018

it's ubuntu 64-bit version

@vvs-
Copy link
Contributor

vvs- commented Sep 23, 2018

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
Copy link
Author

FGAR55 commented Sep 23, 2018

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
Copy link
Contributor

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
Copy link
Author

FGAR55 commented Sep 24, 2018

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
Copy link
Author

FGAR55 commented Sep 25, 2018

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
Copy link
Contributor

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-
Copy link
Contributor

vvs- commented Sep 26, 2018

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
Copy link
Member

Is this resolved?

@hoeppie
Copy link

hoeppie commented Dec 29, 2018

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-
Copy link
Contributor

vvs- commented Jan 1, 2019

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
Copy link

hoeppie commented Jan 10, 2019

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

@RICCIARDI-Adrien
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants