sonames under BSD systems (possible fix)

Hi all, As seen in http://lists.boost.org/boost/2005/06/28717.php it seems that the Boost libraries are not properly linked under, at least, NetBSD. The problem arises when using --layout=system (although it will probably happen w/o it, too), as the build process only creates .a and .so files for each of the libraries being built, but it fails to create .so.1.32.0 files (as one could expect). Trying the same thing under Linux results in the correct files being created (i.e., three for each library). One of the replies said that it may be because sonames are not being used under NetBSD, and that was correct. The attached patch fixes it; I'm not sure it's correct, though I hope it is. Note that it solves this issue under Dragonfly, FreeBSD and NetBSD, all of which support sonames. Thanks, -- Julio M. Merino Vidal <jmmv84@gmail.com> http://www.livejournal.com/users/jmmv/ The NetBSD Project - http://www.NetBSD.org/

On 6/18/05, Julio M. Merino Vidal <jmmv84@gmail.com> wrote:
Hi all,
As seen in http://lists.boost.org/boost/2005/06/28717.php it seems that the Boost libraries are not properly linked under, at least, NetBSD. The problem arises when using --layout=system (although it will probably happen w/o it, too), as the build process only creates .a and .so files for each of the libraries being built, but it fails to create .so.1.32.0 files (as one could expect).
Trying the same thing under Linux results in the correct files being created (i.e., three for each library). One of the replies said that it may be because sonames are not being used under NetBSD, and that was correct.
The attached patch fixes it; I'm not sure it's correct, though I hope it is. Note that it solves this issue under Dragonfly, FreeBSD and NetBSD, all of which support sonames.
The fix in the previous mail lacked some changes. Sorry; I forgot to apply them before generating the diff. The file attached here should be correct. Siezing the opportunity, I've also included a small fix for threading usage (it's just to use -lpthread rather than -pthread during link in NetBSD). Thanks, -- Julio M. Merino Vidal <jmmv84@gmail.com> http://www.livejournal.com/users/jmmv/ The NetBSD Project - http://www.NetBSD.org/

On Sat, Jun 18, 2005 at 06:24:40PM +0200, Julio M. Merino Vidal wrote:
Siezing the opportunity, I've also included a small fix for threading usage (it's just to use -lpthread rather than -pthread during link in NetBSD).
Is that really a fix? -pthread should imply -lpthread for GCC, except that passing -pthread to GCC will do the right thing wrt other flags such as -pg, so that it chooses -lpthread_pg - you've short-circuited that behaviour. If someone builds with -sGXX='g++ -pg' then your change will prevent GCC from expanding -pthread -> -lpthread_pg, is that intended? I'm not familiar with NetBSD, so if it is a fix, please explain why. jon -- "The value of a technical conversation is inversely proportional to how well the participants are dressed." - Larry McVoy
participants (2)
-
Jonathan Wakely
-
Julio M. Merino Vidal