run configure error on Leopard 10.6.1

nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

run configure error on Leopard 10.6.1

Post by nsdavidlj »

error on Leopard 10.6.1

1. cmake . -G Xcode
2. ./autogen.sh all successed
3. ./configure -----> ./configure: line 15221: syntax error near unexpected token `then'
./configure: line 15221: `fiif test $# -eq 0; then :'

how to fix it?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: run configure error on Leopard 10.6.1

Post by Erwin Coumans »

You should not combine cmake and autotools, please follow the instructions from the user manual:

Recommended is using cmake:

1) cmake . -G "Unix Makefiles"
2) make

or for Xcode:

1) cmake . -G Xcode
2) open the .xproj from XCode

or for Windows Visual Studio 2008:
1) cmake . -G "Visual Studio 9 2008"
2) open .sln solution from Visual Studio

Thanks,
Erwin
nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

Re: run configure error on Leopard 10.6.1

Post by nsdavidlj »

yes, I did it as unix makefile on Leopard 10.6.1.

because I want make it in command mode.

so I choice your first method.

but error reported:

[ 91%] Building CXX object Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/btGpuDemo3dCpuFunc.o
[ 91%] Building CXX object Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/btGpuDemoDynamicsWorld3D.o
Linking CXX executable AppGpu3dDemo
ld: library not found for -lBulletMultiThreaded
almatea
Posts: 29
Joined: Mon Nov 02, 2009 10:15 am

Re: run configure error on Leopard 10.6.1

Post by almatea »

i have same trouble:

Code: Select all

# cmake -G 'Unix Makefiles'
...
# make
...
[ 91%] Building CXX object Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/btGpuDemoDynamicsWorld3D.o
Linking CXX executable AppGpu3dDemo
/usr/bin/ld: cannot find -lBulletMultiThreaded
collect2: ld returned 1 exit status
make[2]: *** [Demos/Gpu3dDemo/AppGpu3dDemo] Ошибка 1
make[1]: *** [Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/all] Ошибка 2
make: *** [all] Ошибка 2
debian lenny amd x86-64
if i disable this demos, compile done ok, but i want to have this demos
almatea
Posts: 29
Joined: Mon Nov 02, 2009 10:15 am

Re: run configure error on Leopard 10.6.1

Post by almatea »

anybody can help? i can to disable this demos but i want to discower multithreading.

multithreaded module does not compile with debian lenny amd x 64 - why?
nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

Re: run configure error on Leopard 10.6.1

Post by nsdavidlj »

I have this problem too! Never compile demo complete all. Wait for help.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: run configure error on Leopard 10.6.1

Post by Erwin Coumans »

We re-enabled BulletMultiThreading compilation for 64 bit in the latest svn trunk, but some parts needs more testing. It was disabled in the Bullet/src/CMakeList.txt, and we commented it out now:

Code: Select all

#if (CMAKE_SIZEOF_VOID_P MATCHES "8")
#SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
#else (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
#endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
Can you try out the latest SVN trunk, and report your luck?
Thanks,
Erwin
nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

Re: run configure error on Leopard 10.6.1

Post by nsdavidlj »

Unfortunately,I have try svn trunk and uncomment lines manually in src/CMakeLists.txt. (cmake . -G "Unix Makefiles")

Problem report here:

Linking CXX executable AppGpu3dDemo
ld: library not found for -lBulletMultiThreaded
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
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: run configure error on Leopard 10.6.1

Post by Erwin Coumans »

The svn trunk version should work with unmodified CMakeList.txt So you should not manually edit or uncomment anything from any CMakeList.txt file.

In other words, the Bullet/src/CMakeList.txt should traverse and build BulletMultiThreaded.

Code: Select all

SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
Thanks,
Erwin
nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

Re: run configure error on Leopard 10.6.1

Post by nsdavidlj »

The CMakeLists.txt was commented this line.

Code: Select all

SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
So I turn it on.Now complete 100%.
Thanks for your help :)
rgbohner
Posts: 1
Joined: Thu Nov 05, 2009 1:47 am

Re: run configure error on Leopard 10.6.1

Post by rgbohner »

Looks like BulletMultiThreaded was commented out in the CMakeLists.txt in bullet/src and it had the same error:

Code: Select all

if (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
else (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
/usr/bin/ld: cannot find -lBulletMultiThreaded
collect2: ld returned 1 exit status
make[2]: *** [Demos/Gpu3dDemo/AppGpu3dDemo] Error 1
make[1]: *** [Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/all] Error 2

I placed BulletMultiThreaded back into the if statement and get some linking errors on posix functions. Shouldn't BulletMultiThreaded already have linked to posix?

[ 92%] Building CXX object Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/btGpuDemo3dCpuFunc.o
[ 92%] Building CXX object Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/btGpuDemoDynamicsWorld3D.o
Linking CXX executable AppGpu3dDemo
../../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 `pthread_create'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined reference to `pthread_cancel'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined reference to `sem_post'
../../src/BulletMultiThreaded/libBulletMultiThreaded.so: undefined reference to `sem_wait'
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

System: Red Hat EE5 64

EDIT:

doesn't matter two demos are not built for 64 bit
Gpu3dDemo
MiniCL_VectorAdd

Here is the link to thread on the problem with the fix: http://bulletphysics.org/Bullet/phpBB3/ ... b7f#p15251
nsdavidlj
Posts: 10
Joined: Mon Oct 26, 2009 3:40 pm

Re: run configure error on Leopard 10.6.1

Post by nsdavidlj »

Code: Select all

#if (CMAKE_SIZEOF_VOID_P MATCHES "8")
#SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
#else (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
#endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
almatea
Posts: 29
Joined: Mon Nov 02, 2009 10:15 am

Re: run configure error on Leopard 10.6.1

Post by almatea »

i get a svn distributive

Code: Select all

#cmake -G 'Unix Makefiles' --DBUILD_SHARED_LIB=ON
...
#make
....
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] Ошибка 1
make[1]: *** [Demos/Gpu3dDemo/CMakeFiles/AppGpu3dDemo.dir/all] Ошибка 2
make: *** [all] Ошибка 2
if i use a

Code: Select all

#cmake -G 'Unix Makefiles'
then all is ok, but in /usr/local/include and /usr/local/lib does not contain s multithreaded files and mutlithreadd demos executes does not exists. what may i do?
almatea
Posts: 29
Joined: Mon Nov 02, 2009 10:15 am

Re: run configure error on Leopard 10.6.1

Post by almatea »

i disable in demos/cmakelists.txt this two demos (appgpu and mini cl) - compile and install is ok, but if i launch a mulithreaded demo it have error - segmentation fault
almatea
Posts: 29
Joined: Mon Nov 02, 2009 10:15 am

Re: run configure error on Leopard 10.6.1

Post by almatea »

i comment

Code: Select all

//#define USE_PARALLEL_DISPATCHER 1
and demo work ok, but i see at system monitor and 1 core used... i'll try to discover this.