Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
On Tue, Mar 13, 2001 at 08:40:20PM +0200, Heikki Tuuri wrote: > I looked at the pthread header file which is, by the way, 52000 lines long :). When I sent it, it was a tar file with /usr/include/pthread.h and the complete subdir /usr/include/dce. The orverall length of all files may match the number you quote :-) > Obviously, one cannot cast such a struct to a long integer, and neither > can one pass NULL in place of such a struct. The compilation might > work if you on line 29 of os0thread.c write something like: > >return((os_thread_id_t) (pthread_self()->field1)); > > and on line 69 replace the NULL parameter with pthread_attr_default > > In os0thread.h you should return to the original typedef of os_thread_id_t: > > typedef unsigned long int os_thread_id_t > > These are of course just temporary fixes, and I will modify the next > version to adhere to strict Posix definitions. I have started a new compilation with these quick fixes and will see what breaks next :-) Best regards, 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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
Lutz, I looked at the pthread header file which is, by the way, 52000 lines long :). It seems that pthread_attr_t and pthread_t are not pointers like in some other Unixes, but structs of three fields: struct { field1; /* this is a pointer */ field2; /* a short int */ field3; /* a short int */ }; Obviously, one cannot cast such a struct to a long integer, and neither can one pass NULL in place of such a struct. The compilation might work if you on line 29 of os0thread.c write something like: return((os_thread_id_t) (pthread_self()->field1)); and on line 69 replace the NULL parameter with pthread_attr_default In os0thread.h you should return to the original typedef of os_thread_id_t: typedef unsigned long int os_thread_id_t These are of course just temporary fixes, and I will modify the next version to adhere to strict Posix definitions. > >Since threads are not well supported in HP-UX 10.20 I don't have experience > >with threads. I can send you the thread header files, if you think this > >might help. > > It would help. If you can, please send them to [EMAIL PROTECTED] > (especially pthread.h). >In the meantime sent in private email. Thank you! > Sorry, forgot to mention you should delete all .o files in subdirs. Type > in the innobase directory: > > rm ./*/*.o > > and only after that do the make. >Well, I decided for 'find . -name "*.o" | xargs rm' but that did not solve >my problem. The point is, that for reasons I don't see, the target definitions >are not propagated into the Makefiles, so there is nothing to be done. >To be more precise: In the "mysql configured" innobase, the os/Makefile has: >libos_a_OBJECTS = os0proc.o os0shm.o os0sync.o os0thread.o os0file.o >This line (and other lines) are missing in the one for which I called >automake and autoconf seperately. >It seems, that for the inclusion into the mysql distribution things have >been changed. >(Just like for berkeley-db there is no "make clean" target, so that you >cannot successfully "make clean" the mysql package anymore.) Yes, there was a last minute change to the Innobase automake files I was not aware of. The original ones would have worked :). I can send you the original automake files I have, but only tomorrow, as I am leaving for home now. I will also email Tim Smith, our automake expert. >Do you have a "standalone" version of innobase available that I can test >independent from the mysql distribution? Sorry not currently. I do have an old 'standalone' version, but its interface is very primitive compared to MySQL. I only wrote my own interface to run the TPC-C benchmark, it has absolutely no conveniences of a mature product like MySQL. Furthermore, the interface only works in NT. Best regards, Heikki >Best regards, > 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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
On Tue, Mar 13, 2001 at 06:42:19PM +0200, Heikki Tuuri wrote: > >Ok, let's try to narrow things down: I have switched to GCC for the time > >being and got a similar compile error: > >gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include-O6 -DDBUG_OFF > >-DHPUX -I/opt/dce/include -DHAVE_BROKEN_SNPRINTF -c os0thread.c > >os0thread.c: In function `os_thread_get_curr_id': > >os0thread.c:29: aggregate value used where an integer was expected > > Here I try to cast (convert) a thread object into a long integer. > Maybe a (handle to) thread object in HP-UX is represented as a struct, > and the typecast is not possible. Solution: change the typedef in > os0thread.h to: > > typedef pthread_t os_thread_id_t Actually, that did not help much. Rather/additionally, I removed the explicit cast to get rid of the error message. There are more occurences like that, it seems. In os0thread.c:98, an os_thread_id_t is converted to an "ulint", what must fail for the same reason. It is more difficult to fix this one. > >Since threads are not well supported in HP-UX 10.20 I don't have experience > >with threads. I can send you the thread header files, if you think this > >might help. > > It would help. If you can, please send them to [EMAIL PROTECTED] > (especially pthread.h). In the meantime sent in private email. > > ... > > 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. > > >Actually, I don't get any error. It steps into each directory and has nothing > >to do at all. Seems the .o and .c files are not propagated into the Makefiles. > > Sorry, forgot to mention you should delete all .o files in subdirs. Type > in the innobase directory: > > rm ./*/*.o > > and only after that do the make. Well, I decided for 'find . -name "*.o" | xargs rm' but that did not solve my problem. The point is, that for reasons I don't see, the target definitions are not propagated into the Makefiles, so there is nothing to be done. To be more precise: In the "mysql configured" innobase, the os/Makefile has: libos_a_OBJECTS = os0proc.o os0shm.o os0sync.o os0thread.o os0file.o This line (and other lines) are missing in the one for which I called automake and autoconf seperately. It seems, that for the inclusion into the mysql distribution things have been changed. (Just like for berkeley-db there is no "make clean" target, so that you cannot successfully "make clean" the mysql package anymore.) > Thank you for trying on HP-UX. On Solaris I was able to compile, but > obviously I still have overlooked some Posix thread subtleties. Do you have a "standalone" version of innobase available that I can test independent from the mysql distribution? Best regards, 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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
Lutz, I think you have found the problem. >Ok, let's try to narrow things down: I have switched to GCC for the time >being and got a similar compile error: >gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include-O6 -DDBUG_OFF >-DHPUX -I/opt/dce/include -DHAVE_BROKEN_SNPRINTF -c os0thread.c >os0thread.c: In function `os_thread_get_curr_id': >os0thread.c:29: aggregate value used where an integer was expected Here I try to cast (convert) a thread object into a long integer. Maybe a (handle to) thread object in HP-UX is represented as a struct, and the typecast is not possible. Solution: change the typedef in os0thread.h to: typedef pthread_t os_thread_id_t and replace comparisons like thr_id1 == thr_id2 by pthread_equal(thr_id1, thr_id2) Well, this needs some work from me, as the source code must be changed possibly on several lines. Another possibility is that if you from the header file pthread.h for HP-UX see how to convert a thread handle to a (unique) unsigned long integer, you could try that fix on line 29. >os0thread.c: In function `os_thread_create': >os0thread.c:69: warning: dereferencing `void *' pointer >os0thread.c:69: invalid use of void expression >gmake[4]: *** [os0thread.o] Error 1 Here some of the parameters I pass are not correct for the HP-UX pthread header file definitions, possibly the NULL that I pass as the second parameter. I looked in an online manual of HP-UX 10.30 that the second parameter should be pthread_attr_default, if default attributes are wanted for a pthread creation. You could try replacing the NULL on line 69 by pthread_attr_default. >Since threads are not well supported in HP-UX 10.20 I don't have experience >with threads. I can send you the thread header files, if you think this >might help. It would help. If you can, please send them to [EMAIL PROTECTED] (especially pthread.h). > 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. >Actually, I don't get any error. It steps into each directory and has nothing >to do at all. Seems the .o and .c files are not propagated into the Makefiles. Sorry, forgot to mention you should delete all .o files in subdirs. Type in the innobase directory: rm ./*/*.o and only after that do the make. Thank you for trying on HP-UX. On Solaris I was able to compile, but obviously I still have overlooked some Posix thread subtleties. Best regards, Heikki >Best regards, > 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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
On Tue, Mar 13, 2001 at 12:00:57AM +0200, Heikki Tuuri wrote: > >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. > 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. Ok, let's try to narrow things down: I have switched to GCC for the time being and got a similar compile error: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../../include -I../include-O6 -DDBUG_OFF -DHPUX -I/opt/dce/include -DHAVE_BROKEN_SNPRINTF -c os0thread.c os0thread.c: In function `os_thread_get_curr_id': os0thread.c:29: aggregate value used where an integer was expected os0thread.c: In function `os_thread_create': os0thread.c:69: warning: dereferencing `void *' pointer os0thread.c:69: invalid use of void expression gmake[4]: *** [os0thread.o] Error 1 Since threads are not well supported in HP-UX 10.20 I don't have experience with threads. I can send you the thread header files, if you think this might help. > 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. Actually, I don't get any error. It steps into each directory and has nothing to do at all. Seems the .o and .c files are not propagated into the Makefiles. Best regards, 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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
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
Re: Flags problem 3.23.34a with BDB support/Innobase on HP-UX 10.20
Lutz, what compiler are you using? GCC? HP:s own commercial compiler, I assume. >I am currently trying to compile 3.23.34a coming with BDB support. >I have zlib installed in the /usr/local (not normally searched for >libraries), so that until now I have > [CFLAGS etc ] LDFLAGS=-L/usr/local/lib ./configure >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. 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. 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. Best regards, Heikki Tuuri Innobase Oy >Best regards, > 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