Mac OS X installation nightmare

Post Reply
lbodnar
Posts: 2
Joined: Tue Jul 24, 2012 10:38 pm

Mac OS X installation nightmare

Post by lbodnar »

I am just about to give up on Bullet after having spent two days trying to install it.
This is probably the worst software experience I had for the last 20 years :(

Anyway, I am pleading for help!

Here is what I do...
Bullet 2.80 Physics SDK Manual:
Windows developers can download the zipped sources of Bullet from http://bullet.googlecode.com. Mac OS X, Linux and other developers should download the gzipped tar archive.
Downloaded bullet-2.80-rev2531.tgz Bullet 2.80 Physics SDK SP1 (Unix line endings, svn r2531)
Ungzipped and untared into my home directory. I have admin right on this Mac.
Bullet 2.80 Physics SDK Manual:
Building using CMake
CMake adds support for many other build environments and platforms, including Microsoft Visual Studio, XCode for Mac OSX, KDevelop for Linux and Unix Makefiles. Download and install Cmake from http://cmake.org and use the CMake cmake-gui tool. See the Appendix for details.
You can also use cmake command-line. Run cmake without arguments to see the list of build system generators for your platform.
For example to generate Mac OSX Xcode project files , run
cmake . –G Xcode
Firstly there is no appendix in the manual. Therefore there are no details to look up. There is an unnumbered section called "Create Bullet Visual Studio projectfiles using CMake." The word "Xcode" is used in the manual exactly twice - both occurrences quoted here.
OK, no problem, pushing on...

Code: Select all

MacBookPro:~ leobodnar$ cd bullet
MacBookPro:bullet leobodnar$ cmake . –G Xcode
CMake Error: The source directory "/Users/leobodnar/bullet/Xcode" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Trying harder...

Code: Select all

MacBookPro:bullet leobodnar$ mkdir Xcode
MacBookPro:bullet leobodnar$ cmake . –G Xcode
CMake Error: The source directory "/Users/leobodnar/bullet/Xcode" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Still not giving up...
Bullet 2.80 Physics SDK Manual:
Building using autotools/automake
Open a shell terminal and go to the Bullet root directory. Then execute
./autogen.sh (this is optional and not needed for downloaded packages)
./configure
make
Not sure what is considered "downloaded package" so try anyway

Code: Select all

MacBookPro:bullet leobodnar$ ./autogen.sh
running aclocal
./autogen.sh: line 13: aclocal: command not found
An error occured, autogen.sh stopping.
MacBookPro:bullet leobodnar$ ./configure
-bash: ./configure: No such file or directory
MacBookPro:bullet leobodnar$ make
make: *** No targets specified and no makefile found.  Stop.
I have tried this on OS X 10.6 and 10.7 running on two separate Macs with the same useless result. I am just amazed that from three different installation options suggested in the manual neither works :twisted:

Is there anything else I can try to at least have a look at the demo?

Leo
Last edited by lbodnar on Wed Jul 25, 2012 8:33 am, edited 2 times in total.
goldleaf
Posts: 19
Joined: Fri Nov 20, 2009 6:41 am

Re: Mac OS X installation nightmare

Post by goldleaf »

Yeah, it can be a headache :)

So, when generating your Xcode project, put Xcode in quotations (i.e. cmake -G "Xcode") and you should get an Xcode project. I've had that work for me, though I usually just do makefiles (cmake -G "Unix Makefiles") to build Bullet's libraries/demos.

Did that work?
joen
Posts: 2
Joined: Tue Jul 24, 2012 3:27 am

Re: Mac OS X installation nightmare

Post by joen »

I used the command, too.
cmake . -G "Unix Makefiles"
If finding some OpenCL demos error, you could edit the source code and modify the device type to "CL_DEVICE_TYPE_GPU".

There exists a bug about querying the devices. If we use the "CL_DEVICE_TYPE_ALL", the program may get devices including the CPU.
The result doesn't fit our requirement, and we hope to use the GPU.

Best regards

Joen
lbodnar
Posts: 2
Joined: Tue Jul 24, 2012 10:38 pm

Re: Mac OS X installation nightmare

Post by lbodnar »

goldleaf wrote:Yeah, it can be a headache :)

So, when generating your Xcode project, put Xcode in quotations (i.e. cmake -G "Xcode") and you should get an Xcode project. I've had that work for me, though I usually just do makefiles (cmake -G "Unix Makefiles") to build Bullet's libraries/demos.

Did that work?

Code: Select all

MacBookPro:bullet leobodnar$ cmake . –G "Xcode"
CMake Error: The source directory "/Users/leobodnar/bullet/Xcode" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
MacBookPro:bullet leobodnar$ 
No, it did not work either. It's the third day now I am battling to install Bullet without any hope. I think it is pointless to press any further.
What a letdown.

Leo
nadro
Posts: 17
Joined: Tue Jul 03, 2007 10:37 am

Re: Mac OS X installation nightmare

Post by nadro »

If You have problems or don't like terminal You can also use CMake GUI ;) Just select a XCode project in a configuration window and next press a "generate" button.

BTW. If you are/want to be a programmer, you can't so easily give up :)
Dalorin
Posts: 7
Joined: Mon Jun 11, 2012 10:31 am

Re: Mac OS X installation nightmare

Post by Dalorin »

Hi Leo

What a shame you've had such a rough time of it. Have a look at the instructions at http://bulletphysics.org/mediawiki-1.5. ... stallation. Following that page, I had bullet installed on my Macbook in no time.

David
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Mac OS X installation nightmare

Post by Erwin Coumans »

Thanks for the feedback, I will fix this for the next release. Both autotools and cmake suck on Mac OSX: Apple doesn't want you to use automake/autoconf/libtoolize on OSX. I should have included the pre-generated configure files in the Bullet 2.80 release, so that ./configure would have worked, but that is a manual process easily forgotten.

You could do this in a current Bullet release:

Code: Select all

ftp http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar zxf autoconf-2.68.tar.gz 
cd autoconf-2.68
./configure 
make
sudo make install

ftp http://ftpmirror.gnu.org/automake/automake-1.11.tar.gz
tar -zxf automake-1.11.tar.gz 
cd automake-1.11
./configure
make
sudo make install


ftp http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz
tar -zxf libtool-2.4.tar.gz 
cd libtool-2.4
./configure 
make
sudo make install

Now you have autoconf/autotools/libtool installed and you can go to the bullet folder and use
./autogen.sh
./configure
make
The next Bullet release supports premake for OSX (and Windows, Linux), this is already in the Subversion trunk at googlecode.

Can you open a terminal on OSX and do the following and see if that works?

Code: Select all

svn co http://bullet.googlecode.com/svn/trunk bullet
Now you have 4 options to build Bullet:

Code: Select all

cd bullet/build
./premake4_osx xcode4
open xcode4/0BulletSolution.xcworkspace
or

Code: Select all

cd bullet/build
./premake4_osx gmake
cd gmake
make
or

Code: Select all

open bullet/Extras/AllBulletDemosOSX/AllBulletDemos.xcodeproj
or

Code: Select all

cd bullet
mkdir make
cd make
cmake .. -G "Unix Makefiles"
make
Hope this helps,
Erwin
frank28_nfls
Posts: 7
Joined: Wed Jul 18, 2012 4:54 am

Re: Mac OS X installation nightmare

Post by frank28_nfls »

Hi Erwin,

Thanks for the details. I just follow one of the four methods that you said,
Erwin Coumans wrote:

Code: Select all

cd bullet/build
./premake4_osx xcode4
open xcode4/0BulletSolution.xcworkspace
and in xcode, I could only see several projects including 4 libs and 3 apps, compared to msvc, it lacks a lot of other projects.

Is this normal as expected or did I still miss some thing?

Thanks,

Frank
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Mac OS X installation nightmare

Post by Erwin Coumans »

Good point, this is normal. By default it doesn't build all the demos and I haven't enabled all demos for premake yet. I could change the default.

You can use this to enable more demos:

Code: Select all

 ./premake4_osx --with-demos xcode4
Thanks,
Erwin
frank28_nfls wrote: and in xcode, I could only see several projects including 4 libs and 3 apps, compared to msvc, it lacks a lot of other projects.
Is this normal as expected or did I still miss some thing?
Thanks,
Frank
jokooon
Posts: 15
Joined: Wed Apr 20, 2011 12:42 pm

Re: Mac OS X installation nightmare

Post by jokooon »

I don't know if the fix provided here is still valid, but everything build fine in XCode, except the installation where it seems to not have the permission to copy it in /usr/local/lib

What me do ? Should I use automake erwin's solution instead ? Any other new fix since ?
jokooon
Posts: 15
Joined: Wed Apr 20, 2011 12:42 pm

Re: Mac OS X installation nightmare

Post by jokooon »

I installed libtool, automake and autoconf. I tried

Code: Select all

./autogen.sh
-bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory
I don't really know what to do from here.

I guess I should use the repo version to use premake.

EDIT:

I tried to build from the repo directly running

Code: Select all

open bullet/Extras/AllBulletDemosOSX/AllBulletDemos.xcodeproj
here is the stack

Code: Select all

#0	0x0004705e in btMatrix3x3::getOpenGLSubMatrix(float*) const at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/../../src/LinearMath/btMatrix3x3.h:360
#1	0x00046de7 in btTransform::getOpenGLMatrix(float*) const at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/../../src/LinearMath/btTransform.h:141
#2	0x003ea62b in ForkLiftDemo::renderme() at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/../../Demos/ForkLiftDemo/ForkLiftDemo.cpp:438
#3	0x003eaba3 in ForkLiftDemo::clientMoveAndDisplay() at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/../../Demos/ForkLiftDemo/ForkLiftDemo.cpp:543
#4	0x0000626e in -[BTDemo display:] at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/src/BTDemo.mm:294
#5	0x00004360 in -[BTOpenGLView update] at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/src/toolkit/BTOpenGLView.m:466
#6	0x99ca5914 in __NSFireTimer ()
#7	0x9006c0d6 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#8	0x9006ba75 in __CFRunLoopDoTimer ()
#9	0x90050892 in __CFRunLoopRun ()
#10	0x9004fd6a in CFRunLoopRunSpecific ()
#11	0x9004fbdb in CFRunLoopRunInMode ()
#12	0x9a28c8aa in RunCurrentEventLoopInMode ()
#13	0x9a28c619 in ReceiveNextEventCommon ()
#14	0x9a28c494 in BlockUntilNextEventMatchingListInMode ()
#15	0x90fa9a5a in _DPSNextEvent ()
#16	0x90fa928c in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#17	0x90f9f6dc in -[NSApplication run] ()
#18	0x90f428e6 in NSApplicationMain ()
#19	0x000028db in main at /Users/eion/_code/bullet-svn/bullet/Extras/AllBulletDemosOSX/main.m:13
#20	0x948e2725 in start ()
Got a EXC_BAD_ACCESS error.

Should I really open the xcodeproj ? does it build the lib ?
jokooon
Posts: 15
Joined: Wed Apr 20, 2011 12:42 pm

Re: Mac OS X installation nightmare

Post by jokooon »

I managed to build it and the example works fine, sorry for spamming this thread :x

I'm having trouble linking the libs with my Ogre3D project, I have this error:

file was built for archive which is not the architecture being linked (i386).

I don't really understand, I tried "standard" or 32 bit everywhere.
Post Reply