>>>>> "Kimmo" == Kimmo Mustonen <kmustone@stripped> writes:
Kimmo> Hello!
Kimmo> I have problems when compiling. In the documentation there were many
Kimmo> different instructions for Digital Unix and I've tried all of the but
Kimmo> there's always something that complains and doesn't compile. :(
Kimmo> AlphaServer 800, Digital Unix 4.0b or 4.0d, egcs-2.91.57
Kimmo> cd mysql-3.22.25
Kimmo> rm config.cache
Kimmo> ./configure
Kimmo> make
<cut>
Kimmo> I get the following kind of warnings:
Kimmo> ------
Kimmo> gcc -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I.. -O6
Kimmo> -DDBUG_OFF -c -DPIC getopt.c -o .libs/getopt.lo
Kimmo> In file included from ../include/global.h:88,
Kimmo> from getopt.c:49:
Kimmo> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/math.h:106:
Kimmo> warning: conflicting types for built-in function `cosf'
Kimmo> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/math.h:109:
Kimmo> warning: conflicting types for built-in function `fabsf'
Kimmo> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/math.h:118:
Kimmo> warning: conflicting types for built-in function `sinf'
Kimmo> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/math.h:120:
Kimmo> warning: conflicting types for built-in function `sqrtf'
You can ignore the above (Wonder if this is fixed in gcc 2.95.1)
Kimmo> ------
Kimmo> c++ -DUNDEF_THREADS_HACK -I./../include -I../include
Kimmo> -I./.. -I.. -I.. -O -fno-implicit-templates -DDBUG_OFF -c mysql.cc
Kimmo> In file included from ../include/global.h:123,
Kimmo> from mysql.cc:14:
Kimmo> /usr/include/alloca.h:71: warning: declaration of `void * alloca(int)'
Kimmo> /usr/include/alloca.h:71: warning: conflicts with built-in declaration
Kimmo> `void * alloca(long unsigned int)'
Kimmo> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -I.. -O6
Kimmo> -I./include -O -DDBUG_OFF -c resolveip.c
Kimmo> resolveip.c: In function `main':
Kimmo> resolveip.c:171: warning: type mismatch in implicit declaration for
Kimmo> built-in function `memcpy'
You can ignore the above (Will be fixed in 3.22.26)
Kimmo> ------
Kimmo> gcc -O6 -I./include -O -DDBUG_OFF -o re split.o debug.o main.o libregex.a
Kimmo> ../strings/libmystrings.a -lm -lpthread -lmach -lexc -lc
Kimmo> /bin/ld:
Kimmo> Unresolved:
Kimmo> fflush
Kimmo> Strange. That fflush() shouldn't be too difficult...
I agree. Can you find out in which library this is definied?
(with 'nm' and 'grep')
Kimmo> The other warnings/errors I have got with different setups suggested in
Kimmo> INSTALL-SOURCE...
Kimmo> ------
Kimmo> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -O6
Kimmo> -DDBUG_OFF -c str2int.c
Kimmo> In file included from ../include/my_sys.h:21,
Kimmo> from str2int.c:28:
Kimmo> ../include/my_pthread.h:262: warning: `pthread_mutex_init' redefined
Kimmo>
> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/pthread.h:1084:
Kimmo> warning: this is the location of the previous definition
Kimmo> ../include/my_pthread.h:266: warning: `pthread_cond_init' redefined
Kimmo>
> /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0b/egcs-2.91.57/include/pthread.h:1237:
Kimmo> warning: this is the location of the previous definition
Kimmo> ------
I haven't seen the above before; This means that pthread_mutex_init()
was not properly detected by configure and my_pthread.h couldn't
redefine it because it was a macro.
What configure options did you use in this case?
<cut>
Kimmo> Any idea?
Kimmo> If using cc:
Kimmo> unsetenv CFLAGS
Kimmo> setenv CC "cc"
Kimmo> ./configure
Kimmo> make clean
Kimmo> make
Kimmo> cc -std1 -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -I./../include -I./.. -I..
Kimmo> -O -DDBUG_OFF -c bind.c
Kimmo> cc: Warning: bind.c, line 208: Non-void function
Kimmo> "rl_unbind_function_in_map" does not contain a return statement.
Kimmo> int
Kimmo> ^
The above is a minior fault in the readline package that can be ignored.
Kimmo> cc -std1 -DUNDEF_THREADS_HACK -I./../include -I../include -I./.. -I.. -I..
Kimmo> -O -DDBUG_OFF -c -DPIC libmysql.c -o .libs/libmysql.lo
Kimmo> cc: Warning: ./../include/mysql.h, line 76: In this declaration, type
Kimmo> "unsigned long long" is a language extension.
Kimmo> typedef unsigned long long my_ulonglong;
Kimmo> --------^
Which cc compiler are you using? You must probably add a flag to
CFLAGS and CXXFLAGS to get it to understand longlong.
Kimmo> cc -std1 -O -DDBUG_OFF -o test_thr_alarm -DDEFAULT_BASEDIR=\"/usr/local\"
Kimmo> -DDATADIR=\"/usr/local/var\" -DHAVE_CONFIG_H -I./../include -I../include
Kimmo> -I.. -O -DDBUG_OFF -DMAIN ./thr_alarm.c libmysys.a ../dbug/libdbug.a
Kimmo> ../strings/libmystrings.a -lm -lpthread -lmach -lexc -lc
Kimmo> ld:
Kimmo> Unresolved:
Kimmo> asm
The above is probably a bug in the cc compiler; It's not compatible
with it's own include files :(
Kimmo> -----
Kimmo> This far I haven't been able to find any combination that would compile.
Kimmo> :(
Kimmo> Kimmo Mustonen
Last time I succeeded in building MySQL on Dec, I used gcc. Any
change you can try with gcc 2.95 and try to find out why the 'fflush'
wasn't found (try man fflush).
Regards,
Monty