compile error svn1482 [SOLVED]

slackydeb
Posts: 14
Joined: Sat Aug 09, 2008 7:15 pm

compile error svn1482 [SOLVED]

Post by slackydeb »

Hi.


Compiling svn1482 of Bullet I got this error
[ 89%] Building CXX object src/BulletMultiThreaded/CMakeFiles/BulletMultiThreaded.dir/PosixThreadSupport.o
/home/user/bullet_root/src/BulletMultiThreaded/PosixThreadSupport.cpp: In function ‘sem_t* createSem(const char*)’:
/home/user/bullet_root/src/BulletMultiThreaded/PosixThreadSupport.cpp:58: error: ‘O_CREAT’ was not declared in this scope
make[2]: *** [src/BulletMultiThreaded/CMakeFiles/BulletMultiThreaded.dir/PosixThreadSupport.o] Error 1
make[1]: *** [src/BulletMultiThreaded/CMakeFiles/BulletMultiThreaded.dir/all] Error 2
make: *** [all] Error 2

I am on an up-to-date Debian GNU/Linux testing "Lenny" on x86 32bit (single core CPU).
I am using cmake/make/gcc as found in Debian repository.


I tried to add

Code: Select all

#include <semaphore.h>
but it didn't help.


Thanks for your great work.
Luca Favatella
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: compile error svn1482

Post by Erwin Coumans »

There was a 'named semaphore' contribution, that was mainly for Apple platform.

Can you try to add this define around the USE_NAMES_SEMAPHORE

Code: Select all

#if (defined (__APPLE__))
#define NAMED_SEMAPHORES
#endif
Hope this helps, and thanks for the feedback!
Erwin
slackydeb
Posts: 14
Joined: Sat Aug 09, 2008 7:15 pm

Re: compile error svn1482

Post by slackydeb »

Sorry for my late reply.

I tried your patch and it works.

I also tried to compile a clean svn1492, and it works too.


Problem solved.
Thanks.