MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:September 12 2003 5:48am
Subject:mysql 4.0.15: configure fails
View as plain text  
I have Mac OS X 10.2.6 with December 2002 Dev Tools and the Dec 2002 gcc
updater, which means I'm using gcc 3.3.  Following the directions in
INSTALL-SOURCE, I ran configure with:

CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
CXX=gcc \
CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti"
./configure --prefix=/usr/local/mysql \
             --localstatedir=/usr/local/mysql/data \
             --with-extra-charsets=complex \
             --enable-thread-safe-client \
             --enable-local-infile \

Configure identified my system as "powerpc-apple-darwin6.6", chugged 
along for awhile, then died with:

checking for char... no
checking size of char... 0
configure: error: No size for char type.
A likely cause for this could be that there isn't any
static libraries installed. You can verify this by checking if you have
in /lib, /usr/lib or some other standard place.  If this is the problem,
install the static libraries and try again.  If this isn't the problem,
examine config.log for possible errors.  If you want to report this, use
'scripts/mysqlbug' and include at least the last 20 rows from config.log!

After some time spent learning that the warning about libm.a was a red 
herring, I looked in config.log and found the following:

configure:14729: checking for char
configure:14756: gcc -c -O -DDBUG_OFF -O3 -fno-omit-frame-pointer
-traditional-cpp -DHAVE_DARWIN
PATH -DFN_NO_CASE_SENCE  conftest.c >&5
In file included from configure:14760:
/usr/include/gcc/darwin/3.3/inttypes.h:39: error: syntax error at '#' token
/usr/include/gcc/darwin/3.3/inttypes.h:39: error: parse error before "if"
/usr/include/gcc/darwin/3.3/inttypes.h:40: error: syntax error at '#' token
/usr/include/gcc/darwin/3.3/inttypes.h:41: error: syntax error at '#' token
/usr/include/gcc/darwin/3.3/inttypes.h:42: error: syntax error at '#' token

It seems the test didn't fail so much as conftest.c didn't even compile. 
Looking back through config.log, I saw the same thing happened in the 
tests for off_t and stat.st_rdev.

Then I noticed that configure added -traditional-cpp to the CFLAGS for 
these tests.  A simple test revealed that gcc 3.3 likes inttypes.h 
without -traditional-cpp, but thinks it's badly broken with 

Looking through configure, I found (starting on line 12763)

     if test "$ac_cv_c_compiler_gnu" = "yes"
       FLAGS="-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE 

I deleted -traditional-cpp from the FLAGS in configure, then reran it as 
before.  Configure completed successfully, after which I was able to 
build with make.  Running `make test` resulted in "all tests passed." 
I've installed it, and it seems to be working.

Unless someone tells me otherwise, I'm going to conclude that this was a 
configure bug and that removing -traditional-cpp was the correct fix. 
In that case, configure ought to be fixed for everyone.


mysql 4.0.15: configure failsMichael Stassen12 Sep
  • Re: mysql 4.0.15: configure failsLenz Grimmer12 Sep
    • Re: mysql 4.0.15: configure failsMichael Stassen12 Sep
      • Re: mysql 4.0.15: configure failsLenz Grimmer15 Sep