Bug #861 Configure fails
Submitted: 17 Jul 2003 1:20 Modified: 26 Jul 2004 13:59
Reporter: Torben Nielsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.0.13 OS:MacOS (Mac OS X 10.2.6)
Assigned to: CPU Architecture:Any

[17 Jul 2003 1:20] Torben Nielsen
Description:
Configure fails with the following error message:

checking whether struct tm is in sys/time.h or time.h... time.h
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 libm.a
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!

Here are the last 20 rows from config.log:

#define PACKAGE "mysql"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PROTOCOL_VERSION 10
#define SIZEOF_CHAR 0
#define SPRINTF_RETURNS_INT 1
#define STDC_HEADERS 1
#define STDC_HEADERS 1
#define SYSTEM_TYPE "apple-darwin6.6"
#define TIME_WITH_SYS_TIME 1
#define VERSION "4.0.13"
#define off_t long
#endif
#ifdef __cplusplus
extern "C" void std::exit (int) throw (); using std::exit;

configure: exit 1

How to repeat:
Run configure on Mac OS X 10.2.6 with no changes to the source distribution.

I'm using GCC 3.3.
[17 Jul 2003 2:11] Michael Widenius
Unfortunately we can't solve this bug as the bug report doesn't include the reason why configure failed compiling the program that tests for sizeof(char).

We also don't yet have an Mac OSX 10.2.6 machine available that we could test this on ourselves.

Please update this bug report with the information from the config.log file around the string "checking size of char"

We fixed in 4.0.14 a similar bug for Solaris when there was a wrong libz.a installed and this may fix this problem also on Mac.

If not, we will fix this as soon we have got enough information what is the problem.

Until this, I suggest you use our MySQL binaries for Mac OS X that you can find on our download page.
[17 Jul 2003 2:46] Torben Nielsen
Attached is more output from config.log. There's mention of static libraries possibly missing. True; 
there are only dynamic libraries there and as far as I can tell, the static versions simply aren't 
there. I tried running the binaries, but I really need to force the location to be other than the 
default and I had difficulty with that using the binaries.

Thanks, Torben

 # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| if ((char *) 0)
|   return 0;
| if (sizeof (char))
|   return 0;
|   ;
|   return 0; 
| }
configure:15174: result: no
configure:15177: checking size of char
configure:15483: result: 0
configure:15498: 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 libm.a
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!
[17 Jul 2003 14:26] Torben Nielsen
The problem appears to involve gcc 3.3. When using gcc 2.95, configure runs to completion. I tried 
it by using "gcc_select 2" and all appears to be well.

Torben
[17 Jul 2003 15:39] Torben Nielsen
-no-cpp-precomp allows gcc 3.3 to make it through just fine.

This isn't a fix as such since there still has to be an underlying cause. But it is at least a work 
around.
[25 Jul 2004 6:45] Michael Stassen
I'd bet that this is the same bug I reported on the mailing list for 4.0.15, which was fixed in 
4.0.16.  You can read the thread in the mailing list archive <http://lists.mysql.com/mysql/
149577>.
[26 Jul 2004 13:59] Lenz Grimmer
Yes, that one should be fixed by now. Closing.