tags:

views:

89

answers:

2

I have a C++ project that have like 15+ external libraries installed with a package mananger. The problem is with the package change, the newest versions of some library break things (like libblob). I wanted to know if it exists a way to not relaying on some package manager for installing our library and to make sure we always have the version we want.

Thanks for your suggestion.

+4  A: 

One way to solve that problem is to staticaly link your libraries but that will increase your application size.

schmrz
A: 

If you don't want to use a package manager, then don't use a package manager. apt is a great tool and is there to help, but you aren't required to use it. On Ubuntu, you might want to just use dpkg instead of apt and so that none of the dependencies will be automatically updated and avoid upgrading the libraries that are causing problems. Or, just install everything directly from source. If you go that route, install to /usr/local or some non-standard location. (ie, do NOT configure --prefix=/usr && make && make install. Use the default /usr/local or $HOME for prefix.)

Note that doing this is a heinous kludge, and you have bigger problems. If you are relying on libraries that are unstable, then you probably ought to consider removing your dependency on those libraries. Also, mixing usage of dpkg with apt will cause maintenance headaches. If you do that, only do it on your developmental boxes (eg, not on production servers.) Your primary concern should be to get your package working correctly with the package management system, and one part of this may involve fixing the packaging of all the libraries you depend on.

William Pursell
That's how you shoot yourself in the foot when it comes to distributing your software.
schmrz
We don't distribute the software :). We always using it from the source. I'm not sure to understand why it's shooting in the foot. When you distribute your software you want your application to use the version of library you used during the development... no?
plcstpierre
If your are going to use this application internally then it's ok but users won't really like it if you say to them that they need to compile 15 libraries before they can use your software.
schmrz
@plcstpierre: no, you do not want your distributed app to use the same version of the library used during development. You want your app to use the newest compatible version, so that bugs fixed in the library are fixed in your app.
William Pursell