I've just built and installed the boost 1.34 libraries from source on a Centos 4.4 Linux intsall, along side the default 1.32 Boost version that comes with RedHat/CentOS 4. The boost libraries have been installed in /usr/local/lib, but have very long and specific names, like libboost_program_options-gcc34-mt-1_34.so, and so to link against them I have to specify, for example, boost_program_options-gcc34-mt-1_34 instead of boost_program_options. Is there any quick change that I can make to create the extra symlinks, or are the long names deliberate and sensible? Thanks in advance for any suggestions, Steven
Just add the following on the bjam command line: --layout=system
F. Bron
Steven Mackenzie
Is there any quick change that I can make to create the extra symlinks, or are the long names deliberate and sensible?
frederic.bron@alcan.com wrote:
Just add the following on the bjam command line: --layout=system
Thanks - that's what I was looking for! I used the ./configure && make build process, and that doesn't seem to be an option in there.
After ./configure, I manually modify the Makefile.
I add:
BJAM_CONFIG=-d2 link=static threading=single runtime-link=shared --layout=system
LIBS=release
and then make install...
F. Bron
___________________________________
Frédéric Bron (frederic.bron@alcan.com)
Unité ALT, Alcan CRV, BP 27, 38341 Voreppe
téléphone : +33 4 76 57 81 72
télécopie : +33 4 76 57 80 99
Steven Mackenzie
Is there any quick change that I can make to create the extra symlinks, or are the long names deliberate and sensible?
frederic.bron@alcan.com wrote:
Just add the following on the bjam command line: --layout=system
Thanks - that's what I was looking for! I used the ./configure && make build process, and that doesn't seem to be an option in there. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
frederic.bron@alcan.com writes:
Just add the following on the bjam command line: --layout=system
While this solves the library naming issue on the developer's system, it does not address the problem of someone else compiling the code on their system. In this case the user's self-compiled or distributor-provided version will most likely not have used this option, and the developer will have no prior knowledge of the toolchain in use (as I described in my earlier post). This is a very important use-case which desperately needs a reliable solution, such as pkg-config support. Otherwise, free software/open-source software has a terrible time trying to link to Boost libraries. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Am 16.07.2007 um 00:31 schrieb Roger Leigh:
frederic.bron@alcan.com writes:
Just add the following on the bjam command line: --layout=system
While this solves the library naming issue on the developer's system, it does not address the problem of someone else compiling the code on their system. In this case the user's self-compiled or distributor-provided version will most likely not have used this option, and the developer will have no prior knowledge of the toolchain in use (as I described in my earlier post).
This is a very important use-case which desperately needs a reliable solution, such as pkg-config support. Otherwise, free software/open-source software has a terrible time trying to link to Boost libraries.
Well, before I built boost with bjam for the first time - about three weeks ago -, I found this by calling bjam --help from the command line: --layout=<layout> Determines what kind of build layout to use. This allows one to control the naming of the resulting libraries, and the locations of the installed files. Default is 'versioned'. Possible values: versioned - Uses the Boost standard names which include version number for Boost the release and version and name of the compiler as part of the library names. Also installs the includes to a versioned sub-directory. system - Builds an install without the Boost standard names, and does not install includes to a versioned sub- directory. This is intended for system integrators to build for packaging of distributions. That's all ok for me - a software developer. But: I don't know how many users can handle this, and ... errm ... I don't know if it's in the documentation anywhere. By the way: great stuff, these boost libraries. Regards, Klaus
on Sat Jul 14 2007, Steven Mackenzie
I've just built and installed the boost 1.34 libraries from source on a Centos 4.4 Linux intsall, along side the default 1.32 Boost version that comes with RedHat/CentOS 4.
The boost libraries have been installed in /usr/local/lib, but have very long and specific names, like libboost_program_options-gcc34-mt-1_34.so, and so to link against them I have to specify, for example, boost_program_options-gcc34-mt-1_34 instead of boost_program_options.
Is there any quick change that I can make to create the extra symlinks, or are the long names deliberate and sensible?
they're deliberate, and their sense, such as it is, is explained in http://boost.org/more/getting_started/unix-variants.html#library-naming -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Thanks everyone for help and links. In migrating some (Boost Test) test code, and reading around, I've noticed that API changes are allowed between Boost library versions. In this case, if multiple releases of the Boost libaries are all going to be on the paths in /etc/ld.so.conf then the non-default libary library names need to be decorated at least with the release version. (At least, that is the simplest solution for me to understand and describe to a system admin when I hand over my software/source code). Is there a better option? The bjam --layout=system option states that it is intended for use by distributers (RedHat, Debian, et al), so personally for the software that I will write, I will require that the Boost libraries are installed from a distributers package, if I can use that Boost version without problem. In the case where I want to target a Boost version that is not the default shipped with my target plaform, then I will require installation of a specific version from source (via the traditional ./configure && make install), and I will specify my linker flags accordingly (that is, I will link to the decorated library names). I understand that my solution is too restrictive for someone like Roger who is willing to make the extra effort to allow his software accomodate the changing APIs of the libraries. Is a simple solution to Roger's problem to have the "./configure && make install" process create the symlinks to the short library names ONLY IF they don't already exist? Steven David Abrahams wrote:
on Sat Jul 14 2007, Steven Mackenzie
wrote: I've just built and installed the boost 1.34 libraries from source on a Centos 4.4 Linux intsall, along side the default 1.32 Boost version that comes with RedHat/CentOS 4.
The boost libraries have been installed in /usr/local/lib, but have very long and specific names, like libboost_program_options-gcc34-mt-1_34.so, and so to link against them I have to specify, for example, boost_program_options-gcc34-mt-1_34 instead of boost_program_options.
Is there any quick change that I can make to create the extra symlinks, or are the long names deliberate and sensible?
they're deliberate, and their sense, such as it is, is explained in http://boost.org/more/getting_started/unix-variants.html#library-naming
participants (5)
-
David Abrahams
-
frederic.bron@alcan.com
-
Klaus Backert
-
Roger Leigh
-
Steven Mackenzie