Bug #21168 cannot compile
Submitted: 19 Jul 2006 23:24 Modified: 20 Jul 2006 14:39
Reporter: John Fox Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:mysql-5.0.22 OS:Other (SCO 5.0.7)
Assigned to: CPU Architecture:Any
Tags: 77, compute sizeof (char)

[19 Jul 2006 23:24] John Fox
Description:
checking "Linux threads"... "no"
checking "SCO threads"... 3
"yes"
"yes"
checking "named thread libs:"... "-lgthreads -lsocket -lgthreads"
checking for strtok_r in -lpthread... no
checking for strtok_r in -lc_r... no
checking for strtok_r... no
checking for pthread_init... no
checking for dlopen in -ldl... yes
checking for dlopen... no
checking for dlerror... no
checking for unistd.h... (cached) yes
checking for restartable system calls... no
checking "need of special linking flags"... "none"
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for off_t... yes
checking for struct stat.st_rdev... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking needs mysys_new helpers... yes
checking for char... yes
checking size of char... configure: error: cannot compute sizeof (char), 77
See `config.log' for more details.

| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_TERM_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_CRYPT_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_LIBM 1
| #define HAVE_LIBSOCKET 1
| #define HAVE_LIBCRYPT 1
| #define HAVE_CRYPT 1
| #define HAVE_COMPRESS 1
| #define HAVE_LIBDL 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRUCT_STAT_ST_RDEV 1
...skipping backward
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define SPRINTF_RETURNS_INT 1
| #define HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_IEEEFP_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_PWD_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYS_TIMEB_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_TERM_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_CRYPT_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_LIBM 1
| #define HAVE_LIBSOCKET 1
| #define HAVE_LIBCRYPT 1
| #define HAVE_CRYPT 1
| #define HAVE_COMPRESS 1
| #define HAVE_LIBDL 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STRUCT_STAT_ST_RDEV 1
| #define HAVE_ST_RDEV 1
| #define TIME_WITH_SYS_TIME 1
| #define USE_MYSYS_NEW 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| long longval () { return (long) (sizeof (char)); }
| unsigned long ulongval () { return (long) (sizeof (char)); }
| #include <stdio.h>
| #include <stdlib.h>
| int
| main ()
| {
|
|   FILE *f = fopen ("conftest.val", "w");
|   if (! f)
|     exit (1);
|   if (((long) (sizeof (char))) < 0)
|     {
|       long i = longval ();
|       if (i != ((long) (sizeof (char))))
|       exit (1);
|       fprintf (f, "%ld\n", i);
|     }
|   else
|     {
|       unsigned long i = ulongval ();
|       if (i != ((long) (sizeof (char))))
|       exit (1);
|       fprintf (f, "%lu\n", i);
|     }
|   exit (ferror (f) || fclose (f) != 0);
|
|   ;
|   return 0;
| }
configure:28465: error: cannot compute sizeof (char), 77

FSU Pthreads (ver 3.9)                                              * *
GNU Development Tools (ver 5.0.7Kj)                                 * *
GNU Development Tools (ver 5.0.7g)                                  * *
SCO OpenServer Development System (ver 5.2.0Aa)
SCO OpenServer Enterprise System (ver 5.0.7Hw)
UnixWare and OpenServer Development Kit (ver 8.0.1Aa)               * *
SCO OpenServer Release 5.0.7 Maintenance Pack 4 (ver 1.0.0Lb)       * *

How to repeat:
configure
[20 Jul 2006 9:48] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

It looks like you have problems with compiler and system environment. Use ./configure --help to find how to set up LDFLAGS, CFLAGS and other you need.
[20 Jul 2006 13:45] John Fox
Privet
Followed instructions on
http://dev.mysql.com/doc/refman/5.1/en/sco.html
[20 Jul 2006 14:39] John Fox
Changed version of FSU-threads
from
FSUpthreads-3.9
to
FSU-threads-3.14
compiled!!