>Description:
>How-To-Repeat:
>Fix:

'bool' type and configure CXXFLAGS errors


Setup:
% uname -a
SunOS hurricane 5.6 Generic_105181-29 sun4u sparc SUNW,Ultra-60
% gcc --version
2.95.3
% setenv CFLAGS -O3
% setenv CXX gcc
% setenv CC gcc
% setenv CXXFLAGS "-O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 
-Wa,-xarch=v8plusa"
% ./configure --prefix=/storm/mysql --enable-assembler --with-mysqld-user=stormdba 
--with-low-memory


Error:
(gmake == GNU make)
% gmake
...
gcc -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I..     
-O3 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 
-Wa,-xarch=v8plusa=  -DHAVE_RWLOCK_T -c -o mysql.o `test -f mysql.cc || echo 
'./'`mysql.cc
In file included from client_priv.h:19,
                 from mysql.cc:32:
../include/my_global.h:759: declaration does not declare anything
gmake: *** [mysql.o] Error 1


Attempted workaround:
vi include/my_config.h
#define HAVE_BOOL 1


New error:
% gmake
...
gcc -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I..     
-O3 -DDBUG_OFF -O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 
-Wa,-xarch=v8plusa=  -DHAVE_RWLOCK_T -c -o mysql.o `test -f mysql.cc || echo 
'./'`mysql.cc
Assembler messages:
Error: invalid architecture -xarch=v8plusa=
gmake: *** [mysql.o] Error 1


Problems:
1. gcc is confused about 'bool' on the Ultra (not on same OS, same patch level on a 
sparc10)
2. configure puts an = on the end of my CXXFLAGS ; does it on a sparc10 system too

Either of the following done before configure results in a "...plusa=" in the Makefile
setenv CXXFLAGS "-O3 -felide-constructors -fno-exceptions -fno-rtti"
setenv CXXFLAGS "-O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 
-Wa,-xarch=v8plusa"

Note that with the 1st setenv, configure adds its own arch flags and still appends =


Final workaround:
% gmake clean
% setenv CFLAGS -O3
% setenv CXX gcc
% setenv CC gcc
% setenv CXXFLAGS "-O3 -felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 
-Wa,-xarch=v8plusa"
% ./configure --prefix=/storm/mysql --enable-assembler --with-mysqld-user=stormdba 
--with-low-memory
% vi config.status
:g/plusa=/s//plusa/g
% ./config.status
% vi config.h
#define HAVE_BOOL 1
% gmake

passes all tests in mysql-test except ctype_latin1_de
 (another problem that I'm researching, it can't connect to mysql server
  when running mysql-test-run; I have to have my own mysqld running separately,
  then the test fails on the actual data- maybe this is just configuration?)


Actual Fix: ??? do something in configure to get the = out and
to get HAVE_BOOL into config.h


>Submitter-Id:  <submitter ID>
>Originator:    John J. Allison
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:      'bool' type and configure CXXFLAGS errors
>Severity:      
>Priority:      
>Category:      mysql
>Class:         
>Release:       mysql-4.0.10-gamma (Source distribution)

>C compiler:    2.95.3
>C++ compiler:  2.95.3
>Environment:
        
System: SunOS hurricane 5.6 Generic_105181-29 sun4u sparc SUNW,Ultra-60
Architecture: sun4

Some paths:  /usr/bin/perl /usr/ccs/bin/make /opt/bin/gmake /opt/bin/gcc 
/opt/SUNWspro/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS='-O3'  CXX='gcc'  CXXFLAGS='-O3 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 -Wa,-xarch=v8plusa'  
LDFLAGS=''  ASFLAGS=''
LIBC: 
-rw-r--r--   1 bin      bin      1623504 Sep 25  2001 /lib/libc.a
lrwxrwxrwx   1 root     root          11 Sep 26  2001 /lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 bin      bin      1024888 Sep 25  2001 /lib/libc.so.1
-rw-r--r--   1 bin      bin      1623504 Sep 25  2001 /usr/lib/libc.a
lrwxrwxrwx   1 root     root          11 Sep 26  2001 /usr/lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 bin      bin      1024888 Sep 25  2001 /usr/lib/libc.so.1
Configure command: ./configure '--prefix=/storm/mysql' '--enable-assembler' 
'--with-mysqld-user=stormdba' '--with-low-memory' 'CC=gcc' 'CFLAGS=-O3' 'CXXFLAGS=-O3 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=v8 -Wa,-xarch=v8plusa' 'CXX=gcc'


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to