Compilation / Installation question

Thomi
Posts: 3
Joined: Sat Mar 10, 2007 11:54 am

Compilation / Installation question

Post by Thomi »

Hi,

I've managed to get Bullet compiled, and the demos work well. I now want to write my own code, but I can't figure out a few things:

when I run cmake & make, only static libraries are built. Is it possible to get a .so build? I assume there's a good reason .so files aren't being build... what is it?

Second, I'd like to install the bullet header files in /usr/local/include/bullet. Is there an automated method of doing this? (make install seems to do nothing).

I've never used cmake before, so I may be missing something!


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

Post by Erwin Coumans »

Bullet is not meant as a system-wide library. The behaviour changes with different versions, and you don't want a new version of a .dll/.so change and break existing other applications that use Bullet.

The manual tells how to use Bullet: simply add the Bullet/src folder to your project, compile, link and run your application. Please you static linked library, just like the Bullet demos do. You application (just like the Bullet demos) can be build with MSVC projectfiles, CMake and jam. No support for system-wide libraries or .dll/.so from me (but perhaps others).

Thanks,
Erwin
Thomi
Posts: 3
Joined: Sat Mar 10, 2007 11:54 am

Post by Thomi »

Thanks for the clarification. I was hoping to remove the bullet code from the rest of my code via a shared lib.

I don't care if every time I have up update bullet I also have to update y own code, but I guess I'll just bite the bullet (hahaaaa!!!) and do as you suggest.





p.s.- I'm so sorry, I usually tell really bad jokes...
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

haha.

Alternatively you can also use jam. jam is distributed with Bullet, see Bullet/jam-2.5, so no excuse not having it.

Just do

./configure
jam
jam install

This should copy ('install') the include files and static libraries globally.
seventhguardian
Posts: 1
Joined: Sun May 20, 2007 1:45 pm

Post by seventhguardian »

Hello!

I just have a few questions/comments about the current library policy for unix'es.

There's no need to prevent library/header installation with cmake. After all the built libraries are static, and as so only meant for development. Applications using bullet that are distributed as binary packages should already have it linked in. On the other hand, source packages should compile as long as bullet is installed, and keep on working even if it is removed.

Also, shared libraries are good. You just need to keep a copy of the versions you need for a particular program (this is done automatically by the distro's package system) and it should work perfectly. I can't imagine the chaos it would be if every piece of software provided its own version of every library it used (hum, I suppose it would turn out like window$ :P oh sorry for the rant :) ...)

Summing up, there's no point in forcing a specific use on the users. Versatility is the key here, I suppose..

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

Post by Erwin Coumans »

Yes I agree: there is no reason to prevent things from happening.
Indeed, there are 2 separate issues/cases that are not supported, but it should be possible for a user to enable them:
  • - installation of header files in a global location (/usr/include etc)
    - creation of dynamic libraries (Bullet.so or Bullet.dll)
This means, right now Bullet builds as a static library, and the supported method to integrate Bullet into your own application is to simply copy the Bullet/src folder into your project.

If you can provide some documentation and patches for cmake (or jam) to support dynamic libraries and/or global installation of header files (untested so far) it would be a nice contribution.
Thanks for clarification,
Erwin