Boost C++ Libraries: Ticket #2545: building boost on Solaris with gcc https://svn.boost.org/trac10/ticket/2545 <p> The following change is necessary to compile boost on Solaris using the native linker. It will probably not work when using GNU binutils, but as the other OSes are checked unconditionally as well, I think this is only fair. </p> <p> --- ./tools/build/v2/tools/gcc.jam 2008/11/28 13:08:45 1.1 +++ ./tools/build/v2/tools/gcc.jam 2008/11/28 13:10:20 @@ -149,6 +149,10 @@ </p> <blockquote> <p> { </p> <blockquote> <p> linker = aix ; </p> </blockquote> <p> } </p> </blockquote> <p> + else if [ os.name ] = SOLARIS + { + linker = sun ; + } </p> <blockquote> <p> else { </p> <blockquote> <p> linker = gnu ; </p> </blockquote> </blockquote> <p> I find this comment from sun.jam a little bit confusing: </p> <p> # On gcc, there are separate options for dll path at runtime and # link time. On Solaris, there's only one: -R, so we have to use # it, even though it's bad idea. </p> <p> Even more as a few lines below, both -L and -R are used, which clearly demonstrates that separate library paths for compile time and run time are supported. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2545 Trac 1.4.3 Steven Watanabe Thu, 08 Jan 2009 03:27:23 GMT component changed; owner set https://svn.boost.org/trac10/ticket/2545#comment:1 https://svn.boost.org/trac10/ticket/2545#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">build</span> </li> </ul> Ticket Vladimir Prus Fri, 13 Mar 2009 07:57:35 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2545#comment:2 https://svn.boost.org/trac10/ticket/2545#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This was fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/49619" title="On Solaris host, assume sun linker. ">r49619</a>. As for -L/-R: on Linux, there are three options -- good old -L, and two options that affect dynamic linking -- -rpath and -rpath-link. To the best of my knowledge, Solaris has a single -R option. </p> Ticket anonymous Fri, 13 Mar 2009 09:25:22 GMT <link>https://svn.boost.org/trac10/ticket/2545#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2545#comment:3</guid> <description> <p> For the record: Solaris has two options: -L defines the link time path, -R (or -rpath or -Wl,-R, or whatever your compiler will pass on) defines the run time path to search for shared objects. Defining only one of these two is usually wrong, normally you have to define both. And in most cases, both paths are identical. Typical exceptions are if you link against a library you are about to install later, or if you are building for a chrooted environment. See </p> <p> <a class="ext-link" href="http://docs.sun.com/app/docs/doc/817-1984/chapter2-88783"><span class="icon">​</span>http://docs.sun.com/app/docs/doc/817-1984/chapter2-88783</a> </p> <p> chapters "Directories Searched by the Link-Editor" and "Directories Searched by the Runtime Linker". </p> </description> <category>Ticket</category> </item> </channel> </rss>