Boost C++ Libraries: Ticket #1758: Boost 1.35 fails to build under gcc 3.4 unix Solaris https://svn.boost.org/trac10/ticket/1758 <p> When I tried to build the boost libraries under gcc 3.4 unix Solaris, I repeatedly got an error message that looked like </p> <pre class="wiki">/var/tmp//ccdt31Ke.s: Assembler messages: /var/tmp//ccdt31Ke.s:619: Error: Architecture mismatch on "cas". /var/tmp//ccdt31Ke.s:619: (Requires v9|v9a|v9b; requested architecture is v8.) </pre><p> I traced the problem to the following lines in &lt;detail\sp_counted_base.hpp&gt;: </p> <pre class="wiki">#elif defined(__GNUC__) &amp;&amp; ( defined( __sparcv8 ) || defined( __sparcv9 ) ) # include &lt;boost/detail/sp_counted_base_gcc_sparc.hpp&gt; </pre><p> which call the following command: </p> <pre class="wiki"> __asm__ __volatile__( "cas %0, %2, %1" : "+m" (*dest_), "+r" (swap_) : "r" (compare_) : "memory" ); </pre><p> It looks like <span class="underline">sparcv8 is not sufficient to call this command, only </span>sparcv9 is. Note also the &lt;detail/sp_counted_base_solaris.hpp&gt; is apparantly never included. </p> <p> Joe Gottman </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1758 Trac 1.4.3 Peter Dimov Wed, 02 Apr 2008 21:03:19 GMT status changed https://svn.boost.org/trac10/ticket/1758#comment:1 https://svn.boost.org/trac10/ticket/1758#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> The problem here is that while UltraSPARC supports CAS even in 32 bit mode (the so-called V8+ instruction set), GCC doesn't define <code>__sparcv8plus</code> or <code>__sparcv9</code> in 32 bit mode, even when V9 or V8+ is selected as a CPU. It only sets <code>__sparcv9</code> in 64 bit builds, presumably for compatibility reasons. So there is no way to detect whether <code>sp_counted_base_gcc_sparc.hpp</code> will work. </p> Ticket Peter Dimov Wed, 02 Apr 2008 21:28:25 GMT <link>https://svn.boost.org/trac10/ticket/1758#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1758#comment:2</guid> <description> <p> Can you please try a build with instruction-set=v9? </p> </description> <category>Ticket</category> </item> <item> <author>jgottman@…</author> <pubDate>Thu, 03 Apr 2008 14:38:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/1758#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1758#comment:3</guid> <description> <p> This works. What are the advantages of compiling with instruction set 9 versus 8? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Thu, 21 Aug 2008 15:15:53 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/1758#comment:4 https://svn.boost.org/trac10/ticket/1758#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.37.0</span> </li> </ul> Ticket Peter Dimov Wed, 17 Sep 2008 22:49:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1758#comment:5 https://svn.boost.org/trac10/ticket/1758#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/48837" title="Fix #1758. V9 is the default for g++ 4.2 or later, on 4.1 and earlier ...">[48837]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1758" title="#1758: Patches: Boost 1.35 fails to build under gcc 3.4 unix Solaris (closed: fixed)">#1758</a>. V9 is the default for g++ 4.2 or later, on 4.1 and earlier do not attempt to use CAS on V8. </p> Ticket