On Tue, Mar 13, 2001 at 12:00:57AM +0200, Heikki Tuuri wrote:
> what compiler are you using? GCC? HP:s own commercial compiler, I assume.
I tend to prefer HPs commercial compiler (the code tends to be smaller
and faster when running at high optimization levels).

> >BTW, the compilation of innobase fails with
> >cc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX
> -Dinline= >-
> >I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF -Ae +O3 +Olibcalls
> >+Onolim
> >it +DAportable  -DHAVE_BROKEN_SNPRINTF -c os0thread.c
> >cc: warning 454: Option +O3 overrides previous setting of +O2.
> >cc: "os0thread.c", line 29: error 1527: Incompatible types in cast: Must
> cast >fr
> >om scalar to scalar or to void type.
> >cc: "os0thread.c", line 69: error 1554: Indirection must be through a pointer.
> >cc: "os0thread.c", line 69: warning 563: Argument #2 is not the correct type.
> >cc: "os0thread.c", line 69: error 1718: Types are not assignment-compatible.
> >cc: "os0thread.c", line 69: warning 563: Argument #3 is not the correct type.
> >cc: "os0thread.c", line 69: warning 604: Pointers are not
> >assignment-compatible.
> >cc: "os0thread.c", line 69: warning 563: Argument #4 is not the correct type.
> >gmake[4]: *** [os0thread.o] Error 1
> >I have not yet analyzed the precise reason of the failure. Since it affects
> >thread functions and the platform is HP-UX 10.20, I am not sure whether
> >there is a solution at all.
> 
> The solution might be to turn the compiler warning level to be less strict.
> I think the flag +DAportable is a HP compiler flag which produces an
> error from some less serious compiler warnings. Also the flag -Ae
> is suspect.
-Ae is extended ANSI mode. The alternate switch would be -Ac to fall back
to pure K&R, so -Ae is the correct way to go.
+DAportable tells the backend to produce code that will also run on the older
PA-1.1 CPUs (approximately before 1997), it does not affect the problem
shown above.

> But the easiest solution probably is to use the GNU C compiler if you
> have one on your machine. I have not compiled Innobase on the HP's
> commercial compiler and it will take some time to eliminate all
> compiler warnings there. Also the 'inline' keyword and inlined
> functions will probably cause problems on the HP compiler.
Yes, that is true. My CPPFLAGS already include -Dinline=, so this should
not be too much of a problem. I will try GCC tomorrow (well, today :-)

> I will check how one could generate makefiles with less strict
> warnings control. One possibility is to create a file Makefile.i to
> the directory:
>  ...your mysql source dir... /innobase/include
> 
> and put the following define there:
> 
> CFLAGS = -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include  -DHPUX
> -Dinline= -I/opt/dce/include -I/usr/local/include  -O -DDBUG_OFF 
> 
> It should override the flags generated by automake.
> Then go to the innobase subdirectory and regenerate new Makefiles:
> 
> automake
> autoconf
> ./configure
> 
> Ignore the warnings automake and autoconf give. Then type
> 
> make
> 
> Probably you will get new errors from the HP compiler now :), I can help you
> tomorrow if you report the next problems you encounter.

Read you tomorrow,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to