List:General Discussion« Previous MessageNext Message »
From:root Date:March 26 1999 3:21pm
Subject:Compilation problems
View as plain text  
>Description:
	MYsql fails to compile on a linix machine. This script has
already gathered the details of the system so I won't repeat them here.

FIRST ERROR
~~~~~~~~~~~

c++ -I. -Iinclude -I/usr/local/src/mysql-3.22.20a/mit-pthreads/include -DPTHREAD_KERNEL -g
-O2 -I. -Iinclude -I/usr/local/src/mysql-3.22.20a/mit-pthreads/include -DPTHREAD_KERNEL -g
-O2 -Werror -c /usr/local/src/mysql-3.22.20a/mit-pthreads/pthreads/init.cc -o obj/init.o
cc1plus: warnings being treated as errors
include/pthread/sleep.h: In function `int machdep_gettimeofday(struct timespec *)':
In file included from include/pthread.h:54,
                 from /usr/local/src/mysql-3.22.20a/mit-pthreads/pthreads/init.cc:7:
include/pthread/sleep.h:52: warning: ANSI C++ forbids implicit conversion from `void *' in
argument passing
make[2]: *** [obj/init.o] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-3.22.20a/mit-pthreads'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-3.22.20a'
make: *** [all-recursive-am] Error 2

SECOND ERROR
~~~~~~~~~~~~

gcc -DDEFAULT_BASEDIR=\"/usr/local/packages/mysql\" -DHAVE_CONFIG_H
-I../mit-pthreads/include -I./../include -I../include -I..  -O6   -DDBUG_OFF -c
my_pthread.c
In file included from /usr/include/netinet/in.h:24,
                 from ../mit-pthreads/include/netdb.h:42,
                 from my_pthread.c:14:
../mit-pthreads/include/sys/socket.h:77: warning: `AF_MAX' redefined
/usr/include/linux/socket.h:67: warning: this is the location of the previous definition
In file included from /usr/include/netinet/in.h:24,
                 from ../mit-pthreads/include/netdb.h:42,
                 from my_pthread.c:14:
../mit-pthreads/include/sys/socket.h:33: redefinition of `struct sockaddr'
../mit-pthreads/include/sys/socket.h:38: redefinition of `struct linger'
../mit-pthreads/include/sys/socket.h:44: redefinition of `struct msghdr'
make[2]: *** [my_pthread.o] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-3.22.20a/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-3.22.20a'
make: *** [all-recursive-am] Error 2 

THIRD ERROR
~~~~~~~~~~~

MySql doesn't build with newer kernels. For example 2.2.3. This kernel
introduces a new type sa_family_t which is used in preference to
unsigned short in some of the network related header files. I will try to
build a version which works with this kernel and I suspect this is
related to the second error mentioned above.

>How-To-Repeat:
type:
	./configure
	make

on a linux machine.

>Fix:

The first error can be fixed by removing the -Werror from GNUMakefile in
mit-pthreads. I will work on the second and third errors. If I get something
going I can send you it but I suspect you will be faster than me as the
years have taken their toll.

>Submitter-Id:	ccx004@stripped
>Originator:	Colin Bruce
>Organization:
 Coventry University
 Priory Street,
 Coventry,
 CV1 5FB
 UK
>MySQL support: none
>Synopsis:	Fails to compile with this version of linux
>Severity:	non-critical
>Priority:	low
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.22.20a (Source distribution)

>Environment:
	
System: Linux talc 2.0.34 #9 Fri Sep 11 19:35:39 BST 1998 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure  --prefix=/usr/local/packages/mysql
Perl: This is perl, version 5.005_02 built for i586-linux
Thread
Compilation problemsroot26 Mar
  • Compilation problemsMichael Widenius28 Mar