voxcraft / voxcraft-sim

a GPU-accelerated voxel-based physics engine
Creative Commons Zero v1.0 Universal
48 stars 11 forks source link

CMake fails Installing voxcraft-sim on Ubuntu 16.04 #1

Closed jrieffel closed 4 years ago

jrieffel commented 4 years ago

I've followed all the instructions so far (I had to update the CMakeCache file to point to my nvcc binary). And now

cmake -DCMAKE_BUILD_TYPE=Release -DCUDA_DEBUG=OFF ..

Gives me the following error (Error Log and Output attached)

/usr/bin/ld: cannot find -lpthreads

Note that

ldconfig -p | grep pthread
    libpthread.so.0 (libc6,x86-64, OS ABI: Linux 2.6.32) => /lib/x86_64-linux-gnu/libpthread.so.0
    libpthread.so.0 (libc6, OS ABI: Linux 2.6.32) => /lib/i386-linux-gnu/libpthread.so.0
    libpthread.so.0 (libc6, OS ABI: Linux 2.6.32) => /lib32/libpthread.so.0
    libgpgme-pthread.so.11 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgpgme-pthread.so.11

CMakeOutput.log CMakeError.log

liusida commented 4 years ago

According to the CMakeError.log, the error seemed to be caused by

CMakeFiles/cmTC_ac559.dir/CheckSymbolExists.cxx.o: In function `main':
CheckSymbolExists.cxx:(.text+0x16): undefined reference to `pthread_create'

I am wondering, where is this cmTC_ac559 come from? Is that about what you mentioned, "I had to update the CMakeCache file to point to my nvcc binary"?

jrieffel commented 4 years ago

Unlikely. The only change I made was:

CMAKE_CUDA_COMPILER:UNINITIALIZED=/usr/bin/nvcc

On Mon, Jun 22, 2020 at 7:43 PM Liu Sida notifications@github.com wrote:

According to the CMakeError.log, the error seemed to be caused by

CMakeFiles/cmTC_ac559.dir/CheckSymbolExists.cxx.o: In function main': CheckSymbolExists.cxx:(.text+0x16): undefined reference topthread_create'

I am wondering, where is this cmTC_ac559 come from? Is that about what you mentioned, "I had to update the CMakeCache file to point to my nvcc binary"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/voxcraft/voxcraft-sim/issues/1#issuecomment-647823405, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSZGKUIPFEBEN75P4EQZJDRX7UBRANCNFSM4OE7JGGQ .

liusida commented 4 years ago

It was produced by CMake, sorry.

I did some search and found this https://stackoverflow.com/questions/31948521/building-error-using-cmake-cannot-find-lpthreads

May be you can try

sudo apt install libc6-dev

and try to run cmake again.

If this not solve the problem, you can try to make a simple CMakeLists.txt as that page says, and see if pthread_create exists in your system.

Unlikely. The only change I made was: CMAKE_CUDA_COMPILER:UNINITIALIZED=/usr/bin/nvcc On Mon, Jun 22, 2020 at 7:43 PM Liu Sida @.***> wrote: According to the CMakeError.log, the error seemed to be caused by CMakeFiles/cmTC_ac559.dir/CheckSymbolExists.cxx.o: In function main': CheckSymbolExists.cxx:(.text+0x16): undefined reference topthread_create' I am wondering, where is this cmTC_ac559 come from? Is that about what you mentioned, "I had to update the CMakeCache file to point to my nvcc binary"? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSZGKUIPFEBEN75P4EQZJDRX7UBRANCNFSM4OE7JGGQ .

jrieffel commented 4 years ago

it was actually a CMake issue. I had to install from source the newest version of CMake (you might want to add that to the readme). Then I reinstalled the CUDA drivers.