Bug #33991 MySQL (6.0-bk) does not compile on Solaris Express Developer Edition
Submitted: 22 Jan 2008 19:21 Modified: 30 Sep 2010 11:21
Reporter: Georgi Kodinov Email Updates:
Status: Won't fix Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:6.0-opt BK OS:Solaris (Solaris 11 (SXDE))
Assigned to: CPU Architecture:Any

[22 Jan 2008 19:21] Georgi Kodinov
MySQL does not compile with the native C/C++ compiler in the VMware image.
Two problems so far :
1. The BUILD/* scripts default to gcc and disregard the native cc compiler
2. A lot of gcc specific warning flags passed to the compiler (even it's not a gcc)
3. There's too wide condition for a workaround in the NDB compile code (adding -instances=static, that is not recognized as an option of the native compiler
4. (6.0-specific) : Lot of undefined symbols when linking mysqld :
Undefined                       first referenced
 symbol                             in file
timeradd                            ../extra/libevent/libevent.a(event.o)
timersub                            ../extra/libevent/libevent.a(event.o)
__dtrace_mysql___external_lock      handler.o
__dtrace_mysql___update_start       sql_update.o
__dtrace_mysql___insert_start       sql_insert.o
__dtrace_mysql___insert_row_start   handler.o
__dtrace_mysql___insert_row_end     handler.o
__dtrace_mysql___select_start       sql_select.o
__dtrace_mysql___delete_start       sql_delete.o
__dtrace_mysql___insert_end         sql_insert.o
__dtrace_mysql___delete_end         sql_delete.o
__dtrace_mysql___filesort_end       filesort.o
__dtrace_mysql___filesort_start     filesort.o
__dtrace_mysql___update_end         sql_update.o
__dtrace_mysql___select_end         sql_select.o
ld: fatal: Symbol referencing errors. No output written to mysqld
collect2: ld returned 1 exit status

How to repeat:
Download the vmware image from http://developers.sun.com/sxde/ and try compiling a bk clone

Suggested fix:
[28 Jan 2008 17:50] Susanne Ebrecht

please let us know, which compiler you used and what happens with gcc.
Also I think, the installation team needs the exact data of the CPU.

[30 Apr 2008 7:12] Satya B
I have seen the 4th point MySQL 6.0 specific (dtrace errors)

I have done bk clone to get mysql 6.0 source and then 
./configure --prefix=/export/home/satya/MySQL/mysql-bin/ --without-readline

I have used the system's readline


Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)


SunOS satya 5.11 snv_80 i86pc i386 i86pc

Please let me know if you want any other details.

[3 Feb 2009 7:51] Hiroaki Kawai
I have solaris machine and I could build mysql-6.0.9-alpha successfully.

-bash-3.2$ uname -a
SunOS testbed 5.11 snv_79a i86pc i386 i86pc

-bash-3.2$ which cc
-bash-3.2$ cc -V
cc: Sun C 5.9 SunOS_i386 2007/11/15
usage: cc [ options] files.  Use 'cc -flags' for details

I dropped --without-readline because my solaris did not have readline.
./configure --prefix=/export/home/satya/MySQL/mysql-bin/
[3 Feb 2009 8:04] Daniel Fischer
Does this problem still exist?

While the scripts in BUILD/ are unsupported, several Sun Studio compiler issues have been fixed last year.
[6 Feb 2009 9:09] Georgi Kodinov
I don't have the setup anymore. Can somebody please double-check ?
[21 Dec 2009 8:32] Sveta Smirnova
Problem still exists if run BUILD/compile-* scripts, although mysqld can be compiled successfully if use: BUILD/autorun.sh; configure ....; make
[28 Sep 2010 17:14] Jonathan Perkin
I recommend closing this bug, in 5.5+ you can reasonably easily reproduce official builds across all our supported platforms thanks to the CMake work, including of course using Sun Studio as we do.

As for BUILD/, I imagine they will continue to be relatively unmaintained and fixed by whoever happens to use each individual script.