code-google-com / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

gpu3ddemo does not build in linux #317

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. checkout rev. 1835 from svn
2. call >> cmake -G 'Unix Makefiles'
3. call >> make

What is the expected output? What do you see instead?
Everything builds fine except the Gpu3dDemo, which fails during the linking:

=====
Linking CXX executable AppGpu3dDemo
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `pthread_create'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `sem_wait'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `sem_init'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `sem_destroy'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `sem_post'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined
reference to `pthread_cancel'
collect2: ld returned 1 exit status
make[2]: *** [Demos/Gpu3dDemo/AppGpu3dDemo] Error 1
make[1]: *** [Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/all] Error 2
make: *** [all] Error 2
=====

What version of the product are you using? On what operating system?
I am using Ubuntu 8.04 and Bullet rev. 1835.

Please provide any additional information below.
It fixes the problem for me when I add 'pthread' to the list of libraries
in the CMakeLists.txt file in the Demos/Gpu3dDemo/ directory.

Original issue reported on code.google.com by eweitna...@gmail.com on 7 Dec 2009 at 2:07

GoogleCodeExporter commented 9 years ago
Ah, we can conditionally add this in the CMakeList.txt

Do you have a patch (that check for UNIX/Linux)?

Original comment by erwin.coumans on 8 Dec 2009 at 9:04

GoogleCodeExporter commented 9 years ago
I have run into the same issue and if you add pthread to the LINK_LIBRARIES line
it compiles OK.

LINK_LIBRARIES(
OpenGLSupport BulletMultiThreaded  BulletDynamics  BulletCollision LinearMath   
${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} pthread
)

Original comment by andysh...@gmail.com on 10 Dec 2009 at 4:05

GoogleCodeExporter commented 9 years ago
Whoops 
to the CMakeList.txt file in 
BULLET_ROOT/Demos/Gpu3Demo

Original comment by andysh...@gmail.com on 10 Dec 2009 at 4:06

GoogleCodeExporter commented 9 years ago
adding pthread will break the Windows build, that is not acceptable. 

We probably just disable/remove Gpu3Demo in the next 2.x release (it was some 
preparation for Bullet 3.x)

Original comment by erwin.coumans on 13 Dec 2009 at 2:55

GoogleCodeExporter commented 9 years ago
demo has been removed from the cmake build system

Original comment by erwin.coumans on 18 Dec 2009 at 1:17