On Tue, 4 Jan 2005, root wrote: | > Is this a known issue? | | it is now :-) | | i'll have to check what versions of the compiler i'm using. | i'll also check whether ptermio is used. Well, I think my brain is now somewhere in the middle of the atlantic ocean, so I'm getting better :-) I looked into edible.c. The code at issue is: #ifdef logterm { struct termio ptermio; char pbuff[1024]; tcgetattr(contNum, &ptermio); sprintf(pbuff, "child's settings: Lflag = %d, Oflag = %d, Iflag = %d\n", ptermio.c_lflag, ptermio.c_oflag, ptermio.c_iflag); write(logfd, pbuff, strlen(pbuff)); } #endif line 276 is struct termio ptermio; so: (1) it looks to me that the error is a mispelling: 'struct termios' should 'struct termio'. (2) ptermio is indeed used. Correcting (1) as indicated led to a successful compilation. The whole axiom build is still underway. ------------------------------------------------------------ further info --Sat, 22 Jan 2005 03:55:35 -0600 | On Tue, 4 Jan 2005, root wrote: | | | > Is this a known issue? | | | | it is now :-) | | | | i'll have to check what versions of the compiler i'm using. | | i'll also check whether ptermio is used. | | Well, I think my brain is now somewhere in the middle of the atlantic | ocean, so I'm getting better :-) I looked into edible.c. No, not better ;-/ | The code at issue is: | | #ifdef logterm | { | struct termio ptermio; | char pbuff[1024]; | tcgetattr(contNum, &ptermio); | sprintf(pbuff, "child's settings: Lflag = %d, Oflag = %d, Iflag = %d\n", | ptermio.c_lflag, ptermio.c_oflag, ptermio.c_iflag); | write(logfd, pbuff, strlen(pbuff)); | } | #endif | | line 276 is | struct termio ptermio; | | so: | (1) it looks to me that the error is a mispelling: | 'struct termios' should 'struct termio'. That is inverted: it is 'struct termio' (current code) that should be 'struct termios'. more info --Sat, 22 Jan 2005 03:57:08 -0600 | Gabriel, | | hmm, can you do me a favor and try the following: | | cd obj/linux/clef | gcc -E edible.c | | and look for the lines: | | /usr/include/termios.h The directive #include <termios.h> gets expanded as expected. | | and | | struct termios that strucrure is defined as expected -- it is at several place in edible.c. The only problematic place is at line 276, where "struct termio" (without 's') used used instead of of "struct termios". Correcting what I believe to be the missing "s", allowed me to build and install axiom. | these must be included in your system somewhere or the build | would fail at the include step. Indeed. | In fact, it would be interesting to see the output of the gcc -E edible.c | line. see attached. yet more info --Sat, 22 Jan 2005 03:58:45 -0600 | Gabriel, | | Steve Wilson points out that the CHANGELOG contains the lines: | | 20041116 tpd src/clef/edible.c termios -> termio | 20040730 sxw src/clef/edible.c termio -> termios | | so it appears that on some systems we need termio and | on others we need termios. I see. I can confirm that on GNU/Linux, and generally (recent) glibc systems, one needs termios. I also looked on solaris plateforms (apparently currently not supported by axiom), one needs termios there too. I guess that is something one would need to test for at configure time. | Steve believes that this is dead code because at the top | of the file we see: | | #ifdef unlikely | ... | #define logterm | | and the termios code is protected by | #ifdef logterm I can see that the fragment is guarded by #ifdef logterm but for some reasons that code is reached on my system (SuSE-9.0, with glibc-2.3.2). GCC with the option -dM dumps macros that are defined. I can confirm that gcc -E -dM edible.c shows a line where logterm is defined. More precisely, I have the following [....] #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE #define _GCC_SIZE_T #define CEOT CEOF #define logterm 1 /* <===== here */ #define __INO64_T_TYPE __UQUAD_TYPE #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES #define _IO_LINKED 0x80 [....] so my gut feeling is that that macro gets defined as internal to some system header files. That gut feeling turns out to be wrong, as replacing logterm with AXIOM_LOGTERM throughout edible.c still leads to the same problem. So I operated on a second assumption: the macro "unlikely" must have been defined somewhere else. Bingo! With the help of gcc -E -dM, I could spot [...] #define __KEY_T_TYPE __S32_TYPE #define sigev_notify_function _sigev_un._sigev_thread._function #define likely(x) __builtin_expect((x),1) /* <==== here */ #define FAPPEND O_APPEND #define _XOPEN_ENH_I18N 1 [...] #define F_ULOCK 0 #define errno (*__errno_location ()) #define unlikely(x) __builtin_expect((x),0) /* <=== here too */ #define EL2NSYNC 45 #define _IO_off64_t _G_off64_t [...] I can't tell you right now which system header files define those questionable macros (I know what they mean, but I don't see what they are doing there). It seems that some glibc-based systems have taken the right to hijack those names. Maybe Axiom might prefer to spell its macros all in caps, and probably prefixed with AXIOM_ ... | still checking.... I hope the above helps. continuing --Sat, 22 Jan 2005 04:00:35 -0600 =============================================================================================== | Gabriel, | | Ok. I'm closer. | I was working on a BSD port at the time and it is likely that | BSD wants termio while linux wants termios. ah, that is the most likely reason. | | Can you modify the pamphlet file back to the original form, | type make, and send me the console log? additional information --Mon, 24 Jan 2005 21:39:42 -0600 ========================================================================================= | Gabriel, | | Steve Wilson points out that the CHANGELOG contains the lines: | | 20041116 tpd src/clef/edible.c termios -> termio | 20040730 sxw src/clef/edible.c termio -> termios | | so it appears that on some systems we need termio and | on others we need termios. I see. I can confirm that on GNU/Linux, and generally (recent) glibc systems, one needs termios. I also looked on solaris plateforms (apparently currently not supported by axiom), one needs termios there too. I guess that is something one would need to test for at configure time. | Steve believes that this is dead code because at the top | of the file we see: | | #ifdef unlikely | ... | #define logterm | | and the termios code is protected by | #ifdef logterm I can see that the fragment is guarded by #ifdef logterm but for some reasons that code is reached on my system (SuSE-9.0, with glibc-2.3.2). GCC with the option -dM dumps macros that are defined. I can confirm that gcc -E -dM edible.c shows a line where logterm is defined. More precisely, I have the following [....] #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE #define _GCC_SIZE_T #define CEOT CEOF #define logterm 1 /* <===== here */ #define __INO64_T_TYPE __UQUAD_TYPE #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES #define _IO_LINKED 0x80 [....] so my gut feeling is that that macro gets defined as internal to some system header files. That gut feeling turns out to be wrong, as replacing logterm with AXIOM_LOGTERM throughout edible.c still leads to the same problem. So I operated on a second assumption: the macro "unlikely" must have been defined somewhere else. Bingo! With the help of gcc -E -dM, I could spot [...] #define __KEY_T_TYPE __S32_TYPE #define sigev_notify_function _sigev_un._sigev_thread._function #define likely(x) __builtin_expect((x),1) /* <==== here */ #define FAPPEND O_APPEND #define _XOPEN_ENH_I18N 1 [...] #define F_ULOCK 0 #define errno (*__errno_location ()) #define unlikely(x) __builtin_expect((x),0) /* <=== here too */ #define EL2NSYNC 45 #define _IO_off64_t _G_off64_t [...] I can't tell you right now which system header files define those questionable macros (I know what they mean, but I don't see what they are doing there). It seems that some glibc-based systems have taken the right to hijack those names. Maybe Axiom might prefer to spell its macros all in caps, and probably prefixed with AXIOM_ ... additional information --Mon, 24 Jan 2005 21:42:31 -0600 ================================================================================ Freshly updated from CVS tree fails to build on an x86-based GNU/Linux with the following error [...] make[3]: Entering directory `/home/gdr/src/axiom/src/clef' 3 making /home/gdr/src/axiom/obj/linux/clef/edible.o from /home/gdr/src/axiom/obj/linux/clef/edible.c edible.c: In function `main': edible.c:276: error: storage size of `ptermio' isn't known edible.c:276: warning: unused variable `ptermio' make[3]: *** [/home/gdr/src/axiom/obj/linux/clef/edible.o] Error 1 make[3]: Leaving directory `/home/gdr/src/axiom/src/clef' make[2]: *** [clefdir] Error 2 make[2]: Leaving directory `/home/gdr/src/axiom/src' make[1]: *** [srcdir] Error 2 make[1]: Leaving directory `/home/gdr/src/axiom' make: *** [all] Error 2 GCC is 3.3.1. Is this a known issue? ou2tr@email.com --unknown, Wed, 21 Jun 2006 10:29:44 -0500 Status: open => not reproducible property change --Bill Page, Wed, 12 Jul 2006 18:12:45 -0500 Status: not reproducible => closed |