Bug #3715 compile problem
Submitted: 11 May 2004 17:51 Modified: 9 Jun 2004 18:58
Reporter: Kovacs Janos Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1 OS:Solaris (Solaris 9)
Assigned to: Paul DuBois CPU Architecture:Any

[11 May 2004 17:51] Kovacs Janos
Description:
The sources from bk at Tue May 11 17:38:15 CEST 2004 dont compile on solaris 9 with gcc:

gcc -O3 -DDBUG_OFF -O3 -m64 -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -o charset2html "-DDEFAULT_BASEDIR=\"/home/mysql41x\"" "-DDATADIR=\"/home/mysql41x/var\"" "-DDEFAULT_CHARSET_HOME=\"/home/mysql41x\"" "-DSHAREDIR=\"/home/mysql41x/share/mysql\"" -DHAVE_CONFIG_H -I../include -I. -O3 -DDBUG_OFF -O3 -m64 -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -DMAIN ./charset2html.c  libmysys.a ../dbug/libdbug.a ../strings/libmystrings.a -lpthread -lthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread
Undefined                       first referenced
 symbol                             in file
strend                              libmysys.a(mf_pack.o)
strnmov                             libmysys.a(mf_pack.o)
bmove_upp                           libmysys.a(mf_pack.o)
strmov                              libmysys.a(my_error.o)
strmake                             libmysys.a(mf_pack.o)
ld: fatal: Symbol referencing errors. No output written to charset2html
collect2: ld returned 1 exit status
make[2]: *** [charset2html] Error 1
make[2]: Leaving directory `/home2/src/mysql-4.1/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home2/src/mysql-4.1'
make: *** [all] Error 2

# gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2

# /usr/local/bin/autoconf -V
autoconf (GNU Autoconf) 2.59

# /usr/local/bin/libtool --version
ltmain.sh (GNU libtool) 1.5 (1.1220 2003/04/05 19:32:58)

configure line:
CC=gcc CFLAGS="-O3 -m64" \
CXX=gcc CXXFLAGS="-O3 -m64 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --without-debug --without-extra-tools --with-charset=latin2 --with-extra-charsets=all --with-collation=latin2_hungarian_ci --enable-assembler --with-mysqld-ldflags=-all-static --prefix=/home/mysql41x

How to repeat:
just simple try to make it.
[11 May 2004 18:00] Kovacs Janos
sorry, I forget to mention some version:

# /usr/local/bin/automake --version
automake (GNU automake) 1.7.2
Written by Tom Tromey <tromey@redhat.com>.

# make -v
GNU Make 3.80
[12 May 2004 0:00] Lenz Grimmer
If you compile a 64bit binary, you need to remove the "--enable-assembler" option
from the configure line - the assembler code is 32bit only...
[12 May 2004 0:18] Timothy Smith
The documentation here shows examples of using -m64 and --enable-assembler: http://dev.mysql.com/doc/mysql/en/Solaris.html

This doesn't work, though.  The assembler can only be used in 32-bit binaries.
[12 May 2004 10:00] Kovacs Janos
In that case this should be corrected:

http://dev.mysql.com/doc/mysql/en/Solaris.html

"To create a 64-bit Solaris binary using gcc, add -m64 to CFLAGS and CXXFLAGS. Note that this works only with MySQL 4.0 and up; MySQL 3.23 does not include the required modifications to support this."

to:

"To create a 64-bit Solaris binary using gcc, add -m64 to CFLAGS and CXXFLAGS and remove --enable-assembler option from configure line. Note that this works only with MySQL 4.0 and up; MySQL 3.23 does not include the required modifications to support this."
[17 May 2004 20:37] Paul DuBois
I can fix the section indicated by previous discussion, but
this bug report cannot be closed yet. One of the buildmeisters
needs to look at this section in the manual:

http://dev.mysql.com/doc/mysql/en/MySQL_binaries.html

There is a Solaris 64-bit entry that has both -m64 and
--enable-assembler. According to this bug report, that
cannot be correct.  See the entry for:

Sun Solaris 8 SPARC 64-bit with gcc 3.2
[9 Jun 2004 18:58] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).