Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm compiling PHP with --enable-fpm on Solaris 10 (sun4v sparc SUNW,Sun-Fire-T1000) and it stops at

#error Sparc v8 and predecessors are not and will not be supported (see bug report 53310)

Following the error, the CPU I have is a v9 ? Why is the error occurring? How should the compilation be signaled to include a -mcpu=v9 ? Would that help?


I've tried compiling both 5.3.8 and the latest 5.4.7 - and the error appears for both. PHP and PHP-CGI compiles fine.


The configure flag is -

./configure --enable-fpm

share|improve this question
What compiler are you using? – mghocke Sep 27 '12 at 19:04
You nailed it, thanks - # gcc -v Reading specs from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.6.3/specs COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/csw/libexec/gcc/sparc-sun-solaris2.10/4.6.3/lto-wrapper Target: sparc-sun-solaris2.10 Configured with: /home/maciej/src/opencsw/pkg/gcc4/trunk/work/solaris10-sparc/build-isa-sparcv8pl‌​us/gcc-4.6.3/configure – RedNax Oct 1 '12 at 8:18
Well, the compiling still breaks. – RedNax Oct 2 '12 at 10:25

It usually boils down to the compare-and-swap instruction, which isn't available in v8, but is available in v8+ and newer processors.

It's hard to tell what's wrong, because you didn't show your ./configure invocation, relevant environment variables, nor the exact place where it fails (configuration stage? compilation stage?). Sometimes there's a test that checks for v8+ but is badly written and misfires.

It's not obvious why does the error fire, because compilers default to v8+ these days, and not to v8. If you didn't set anything, you should get a v8+ binary (for a 32-bit build) and v9 binary (for a 64-bit build).

If you want to signal the build that you want -mcpu=v9, export that in the CFLAGS environment variable.

share|improve this answer
Thanks. Is this the correct setting? declare -x CFFLAGS="-mcpu=v9" – RedNax Oct 1 '12 at 7:41

Finally got it running.

Needed to compile with the following settings.

export CC=gcc
export CFLAGS="-m64"
export CXX=gcc
export CXXFLAGS="-m64"
export LDFLAGS="-m64 -L/lib/64 -L/usr/sfw/lib/64"
export LD_LIBRARY_PATH="/usr/local/lib/sparcv9/:/usr/local/lib:/usr/local/apache2/lib:/usr/sfw/lib/sparcv9:/usr/local/lib/sparcv9:/usr/lib/sparcv9"
export LDFLAGS="-lrt"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.