Bug #59258 MySQL 5.5.8 FTBFS on Solaris 9 SPARCStation10 (my_rdtsc.c)
Submitted: 3 Jan 2011 9:28 Modified: 5 Jan 2011 10:46
Reporter: Yanagihori Masayoshi Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5.8 OS:Solaris (SunOS5.9Generic_117171-07sun4m)
Assigned to: CPU Architecture:Any
Tags: compiling trouble error my_rdtsc.c Assembler messages

[3 Jan 2011 9:28] Yanagihori Masayoshi
When I build mysql-5.5.8 from source tar ball(mysql-5.5.8.tar.gz) ,I get an error while compiling it.

I execute cmake command listed below:
CC=gcc \
CXX=g++ \
CFLAGS="-O3 -mcpu=sparclite" \
CXXFLAGS="-O3 -msparclite -felide-constructors -fno-exceptions -fno-rtti" \
CMAKE_C_FLAGS="-O3 -mcpu=sparclite" \
CMAKE_CXX_FLAGS="-O3 -msparclite -felide-constructors -fno-exceptions -fno-rtti" \
CMAKE_EXE_LINKER_FLAGS="-mcpu=sparclite" \
LIBS="-lpthread" \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DWITH_ZLIB=bundled \

and I execute command "make mysqlclient libmysql" then.But I get an errors when the source code /PATH_TO_SOURCE/mysys/my_rdtsc.c . I accept the parameter just in case , I think these variables "CC,CXX,CFLAGS" are not needed.

[ 85%] Building C object mysys/CMakeFiles/mysys.dir/my_atomic.c.o
[ 85%] Building C object mysys/CMakeFiles/mysys.dir/my_getncpus.c.o
[ 86%] Building C object mysys/CMakeFiles/mysys.dir/my_rdtsc.c.o
/var/tmp//ccPt1Nmp.s: Assembler messages:
/var/tmp//ccPt1Nmp.s:9: Error: Architecture mismatch on "rd".
/var/tmp//ccPt1Nmp.s:9:  (Requires v9|v9a|v9b; requested architecture is v8.)
/var/tmp//ccPt1Nmp.s:9: Error: Architecture mismatch on "srlx".
/var/tmp//ccPt1Nmp.s:9:  (Requires v9|v9a|v9b; requested architecture is v8.)
make[3]: *** [mysys/CMakeFiles/mysys.dir/my_rdtsc.c.o] error 1
make[2]: *** [mysys/CMakeFiles/mysys.dir/all] error 2
make[1]: *** [libmysql/CMakeFiles/mysqlclient.dir/rule] error 2
make: *** [mysqlclient] error 2

I'd like to run the mysql on my SPARCStation-10,because I accept the kind of processor "sparclite",but it doesn't work.I try to build its parameter "v8",I got the same result.And I try to build changing parameters listed below 4 times(petterns),but I cannot fix it.





How Can I fix it? mysql-5.5.8 is not supported on the processor sparclite or v8?only v9 or higher?

SunOS 5.9 Generic_117171-07 sun4m sparc SUNW,SPARCstation-10
gmake 3.82
automake 2.68
bison 2.4.3
gawk 3.1.8
libtool 2.4
m4 1.4.7


How to repeat:
when sources are built,
[3 Jan 2011 13:42] Valeriy Kravchuk
What if you'll just call cmake and let it find out everything itself? I mean, do not set these

CFLAGS="-O3 -mcpu=sparclite" \
CXXFLAGS="-O3 -msparclite -felide-constructors -fno-exceptions -fno-rtti" \
CMAKE_C_FLAGS="-O3 -mcpu=sparclite" \
CMAKE_CXX_FLAGS="-O3 -msparclite -felide-constructors -fno-exceptions -fno-rtti" \
CMAKE_EXE_LINKER_FLAGS="-mcpu=sparclite" \

and do not use any -D options. I wonder if it will build successfully in this case.
[4 Jan 2011 1:28] Yanagihori Masayoshi
I appriciate for your support on this. Yes,I set the parameters for cmake.
I tried to build with executing cmake without non option,but I get an another error.

[ 29%] Built target dbug
Scanning dependencies of target comp_err
[ 29%] Building C object extra/CMakeFiles/comp_err.dir/comp_err.c.o
Linking C executable comp_err
[ 29%] Built target comp_err
Scanning dependencies of target GenError
[ 29%] Generating ../include/mysqld_error.h, ../sql/share/english/errmsg.sys
./comp_err: syntax error at line 1: `(' unexpected
make[2]: *** [include/mysqld_error.h] Error 2
make[1]: *** [extra/CMakeFiles/GenError.dir/all] Error 2
make: *** [all] Error 2
Tue Jan  4 10:15:34 JST 2011

# cd extra
# ls
CMakeFiles            comp_err              replace.c
CMakeLists.txt        comp_err.c            resolve_stack_dump.c
CTestTestfile.cmake   innochecksum.c        resolveip.c
Makefile              my_print_defaults.c   yassl
charset2html.c        mysql_waitpid.c
cmake_install.cmake   perror.c
# file comp_err
comp_err:       ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, d
ynamically linked, not stripped
# ./comp_err
./comp_err: syntax error at line 1: `(' unexpected

This comp_err was build on this time,it cannot display the command usage. I think that binary format is wrong because I apply those parameters for cc "-mcpu=sparclite" and cpp "-msparclite" when I execute "cmake".

I think that mysys/my_rdtsc.c has a problem at this time.

[4 Jan 2011 1:30] Yanagihori Masayoshi
I'm sorry, I was wrong my message.

I executed cmake without option.

I do that,"cd /path_to_source/; cmake .;make"

[5 Jan 2011 10:46] Yanagihori Masayoshi
I research about it again,and I found the article of news below on mysql-5.5.6.


Code was removed for the following no-longer-supported platforms: NetWare, MS-DOS, VMS, QNX, and 32-bit SPARC

I'm sorry to ask this question.

Thank you,