Opened 15 years ago
Closed 14 years ago
#1758 closed Patches (fixed)
Boost 1.35 fails to build under gcc 3.4 unix Solaris
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | Boost 1.37.0 | Component: | smart_ptr |
Version: | Boost 1.35.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
When I tried to build the boost libraries under gcc 3.4 unix Solaris, I repeatedly got an error message that looked like
/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.)
I traced the problem to the following lines in <detail\sp_counted_base.hpp>:
#elif defined(__GNUC__) && ( defined( __sparcv8 ) || defined( __sparcv9 ) ) # include <boost/detail/sp_counted_base_gcc_sparc.hpp>
which call the following command:
__asm__ __volatile__( "cas %0, %2, %1" : "+m" (*dest_), "+r" (swap_) : "r" (compare_) : "memory" );
It looks like sparcv8 is not sufficient to call this command, only sparcv9 is. Note also the <detail/sp_counted_base_solaris.hpp> is apparantly never included.
Joe Gottman
Change History (5)
comment:1 by , 15 years ago
Status: | new → assigned |
---|
comment:3 by , 15 years ago
This works. What are the advantages of compiling with instruction set 9 versus 8?
comment:4 by , 14 years ago
Milestone: | Boost 1.36.0 → Boost 1.37.0 |
---|
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
The problem here is that while UltraSPARC supports CAS even in 32 bit mode (the so-called V8+ instruction set), GCC doesn't define
__sparcv8plus
or__sparcv9
in 32 bit mode, even when V9 or V8+ is selected as a CPU. It only sets__sparcv9
in 64 bit builds, presumably for compatibility reasons. So there is no way to detect whethersp_counted_base_gcc_sparc.hpp
will work.