[MDEV-5268] cannot build on Solaris 11 x86 Created: 2013-11-09  Updated: 2014-05-06  Resolved: 2014-05-06

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10
Fix Version/s: 10.0.11

Type: Bug Priority: Major
Reporter: Eugene M. Zheganin Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Soaris 11.0 x86
gcc 4.5.2

CFLAGS="-mtune=i386 -D__sun -m64 -mtune=athlon64"
CXXFLAGS="-mtune=i386 -D__sun -m64 -mtune=athlon64"
LDFLAGS="-m64 -lmtmalloc -R/usr/sfw/lib/64"



 Description   

While building I get:

[  5%] Building C object mysys/CMakeFiles/mysys.dir/my_context.c.o
cd /home/emz/src/mariadb-5.5.33a/mysys && /usr/bin/gcc  -DHAVE_RWLOCK_T -DHAVE_CONFIG_H -Wall -mtune=i386 -D__sun -m64 -mtune=athlon64  -O2 -g -DDBUG_OFF -I/home/emz/src/mariadb-5.5.33a/include -I/home/emz/src/mariadb-5.5.33a/mysys   -fPIC -o CMakeFiles/mysys.dir/my_context.c.o   -c /home/emz/src/mariadb-5.5.33a/mysys/my_context.c
Assembler: my_context.c
        "/var/tmp//ccjnaObD.s", line 29 : Illegal mnemonic
        Near line: "    .cfi_escape 0x07, 16"
        "/var/tmp//ccjnaObD.s", line 29 : Syntax error
        Near line: "    .cfi_escape 0x07, 16"
        "/var/tmp//ccjnaObD.s", line 40 : Illegal mnemonic
        Near line: "    callq *%rsi"
        "/var/tmp//ccjnaObD.s", line 40 : Syntax error
        Near line: "    callq *%rsi"
        "/var/tmp//ccjnaObD.s", line 41 : Illegal mnemonic
        Near line: "    jmpq *56(%rbx)"
        "/var/tmp//ccjnaObD.s", line 41 : Syntax error
        Near line: "    jmpq *56(%rbx)"
        "/var/tmp//ccjnaObD.s", line 100 : Illegal mnemonic
        Near line: "    jmpq *%rax"
        "/var/tmp//ccjnaObD.s", line 100 : Syntax error
        Near line: "    jmpq *%rax"
        "/var/tmp//ccjnaObD.s", line 158 : Illegal mnemonic
        Near line: "    jmpq *%rax"
        "/var/tmp//ccjnaObD.s", line 158 : Syntax error
        Near line: "    jmpq *%rax"
gmake[2]: *** [mysys/CMakeFiles/mysys.dir/my_context.c.o] Error 1
gmake[2]: Leaving directory `/home/emz/src/mariadb-5.5.33a'
gmake[1]: *** [mysys/CMakeFiles/mysys.dir/all] Error 2
gmake[1]: Leaving directory `/home/emz/src/mariadb-5.5.33a'
gmake: *** [all] Error 2



 Comments   
Comment by Eugene M. Zheganin [ 2013-11-09 ]

Exactly same issue on 10.0.5.

Comment by Eugene M. Zheganin [ 2013-11-09 ]

Same thing on 5.5.32.
When building 32-bit version (no -m64 flag) - a bit different error set:

[...]
[ 5%] Building C object mysys/CMakeFiles/mysys.dir/my_context.c.o
cd /home/emz/src/mariadb-5.5.32/mysys && /usr/bin/gcc -DHAVE_RWLOCK_T -DHAVE_CONFIG_H -Wall -O2 -g -DDBUG_OFF -I/home/emz/src/mariadb-5.5.32/include -I/home/emz/src/mariadb-5.5.32/mysys -fPIC -o CMakeFiles/mysys.dir/my_context.c.o -c /home/emz/src/mariadb-5.5.32/mysys/my_context.c
Assembler: my_context.c
"/var/tmp//ccP6aaSb.s", line 30 : Illegal mnemonic
Near line: " .cfi_escape 0x07, 8"
"/var/tmp//ccP6aaSb.s", line 30 : Syntax error
Near line: " .cfi_escape 0x07, 8"
gmake[2]: *** [mysys/CMakeFiles/mysys.dir/my_context.c.o] Error 1
gmake[2]: Leaving directory `/home/emz/src/mariadb-5.5.32'
gmake[1]: *** [mysys/CMakeFiles/mysys.dir/all] Error 2
gmake[1]: Leaving directory `/home/emz/src/mariadb-5.5.32'
gmake: *** [all] Error 2

Comment by Eugene M. Zheganin [ 2013-11-09 ]

Just in case someone got interested: building with SolarisStudio fails too, but in different way:

[...]
[ 5%] Building C object unittest/strings/CMakeFiles/strings-t.dir/strings-t.c.o
Linking C executable strings-t
Undefined first referenced
symbol in file
rw_pr_rdlock CMakeFiles/strings-t.dir/strings-t.c.o
rw_pr_unlock CMakeFiles/strings-t.dir/strings-t.c.o
rw_pr_wrlock CMakeFiles/strings-t.dir/strings-t.c.o
rw_pr_destroy CMakeFiles/strings-t.dir/strings-t.c.o
PSI_server CMakeFiles/strings-t.dir/strings-t.c.o
rw_pr_init CMakeFiles/strings-t.dir/strings-t.c.o
strdup_root CMakeFiles/strings-t.dir/strings-t.c.o
ld: fatal: symbol referencing errors. No output written to strings-t
gmake[2]: *** [unittest/strings/strings-t] Error 2
gmake[1]: *** [unittest/strings/CMakeFiles/strings-t.dir/all] Error 2
gmake: *** [all] Error 2

Comment by Sergei Golubchik [ 2013-11-20 ]

How did you build? I'm building with gcc and your CFLAGS/CXXFLAGS/LDFLAGS and don't get this error, my_context.c is compiled successfully.

Comment by Eugene M. Zheganin [ 2013-11-23 ]

Well... as usual:

export CFLAGS="-g -m64"
export CXXFLAGS="-g -m64"
export LDFLAGS="-g -m64"

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mariadb
(cmake went just fine)
gmake

I've also tried to use a newer gcc 4.7.2 on a Solaris 10 x86 - got similar bunch of assembler errors.
Flags that I mentioned I took from a mariadb documentation, thought may be using them I'll get more luck but I didn't.

Comment by Sergei Golubchik [ 2014-02-06 ]

We have Solaris11 x86-64. MariaDB 10.0 builds there just fine (since yesterday).
I'll close this bug when I verify that MariaDB 5.5 builds fine too. Meanwhile I'll keep it open.

Comment by Predrag Zečević [ 2014-04-04 ]

Hi,

last MariaDB 10.0 which I managed to compile with gcc 3.4.3 on OpenIndiana was 10.0.8

When I try 10.0.10 it fails:

[ 37%] Built target mysys_ssl
[ 37%] Built target partition
[ 46%] Built target sql
Linking CXX executable explain_filename-t
Undefined                    first referenced
 symbol                             in file
_maria_sizeof_struct_st_plugin_     /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
thd_alloc_service                   /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
_maria_plugin_interface_version_    /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
thd_kill_statement_service          /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
my_snprintf_service                 /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
thd_autoinc_service                 /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
_maria_plugin_declarations_         /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
thd_wait_service                    /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
thd_error_context_service           /export/home/3eka/tmp/MariaDB/mariadb-10.0.10/storage/xtradb/plugin_exports
ld: fatal: symbol referencing errors. No output written to explain_filename-t
collect2: ld returned 1 exit status
gmake[2]: *** [unittest/mysys/explain_filename-t] Error 1
gmake[1]: *** [unittest/mysys/CMakeFiles/explain_filename-t.dir/all] Error 2
gmake: *** [all] Error 2

any clue?

Used this script:

export MariaDB=10.0.10
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="-D__sun -m32"
extra_configs="$max_configs --with-libevent"
 
LDFLAGS="-lmtmalloc -R/usr/gnu/lib -R/usr/sfw/lib"
export LDFLAGS
 
export just_configure=1
 
. "$path/FINISH.sh"
 
sed -i "s#CMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql#CMAKE_INSTALL_PREFIX:PATH=/opt/MariaDB/${MariaDB}#g" CMakeCache.txt
sed -i "s#INSTALL_SYSCONFDIR:STRING=#INSTALL_SYSCONFDIR:STRING=/opt/MariaDB/${MariaDB}/etc#g" CMakeCache.txt
 
gmake -j1

Thank you and regards.

Generated at Thu Feb 08 07:02:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.