* Guile 1.8.2 Compile Error @ 2007-09-13 15:26 ericbambach1 2007-09-15 9:06 ` Ludovic Courtès 0 siblings, 1 reply; 5+ messages in thread From: ericbambach1 @ 2007-09-13 15:26 UTC (permalink / raw) To: guile-user Hello, Please CC Im not subscribed. When compiling on AIX 5.3 using IBM's supplied GCC 4.0.0 I get this error. -------snip----- gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -D_THREAD_SAFE -I/sys/usr/local/include -Wall -Wmissing-prototypes -Werror -MT libguile_la-discouraged.lo -MD -MP -MF .deps/libguile_la-discouraged.Tpo -c discouraged.c -DPIC -o .libs/libguile_la-discouraged.o In file included from ../libguile/gc.h:27, from ../libguile.h:73, from discouraged.c:22: ../libguile/hooks.h:43: error: parse error before '.' token ../libguile/hooks.h:63: error: parse error before '.' token ../libguile/hooks.h:67: error: parse error before '.' token make: The error code from the last command is 1. -------snip----- However, the only '.' token is in the comments! I tried seeing what the preprocessor thinks of the file, but I couldnt tell much from that either. Any ideas? Please tell me it's fiaxable or theres a workaround as upgrading the compiler is not an option yet. I need guile so I can run the testsuite on a new compiler. AIX has all sorts of weird issues so I can't user a compiler I cant test. user@hotname:/sys/usr/src/guile-1.8.2> gcc -v Using built-in specs. Target: powerpc-ibm-aix5.3.0.0 Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0 Thread model: aix gcc version 4.0.0 user@hotname:/sys/usr/src/guile-1.8.2> uname -a AIX hostname 3 5 00C9D68A4C00 user@hotname:/sys/usr/src/guile-1.8.2> echo $CFLAGS -I/sys/usr/local/include user@hotname:/sys/usr/src/guile-1.8.2> echo $LDFLAGS -L/sys/usr/local/lib user@hotname:/sys/usr/src/guile-1.8.2> echo nice ./configure --prefix=/sy> nice ./configure --prefix=/sys/usr/local/graft-packages/guile-1.8.2 user@hotname:/sys/usr/src/guile-1.8.2> _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Guile 1.8.2 Compile Error 2007-09-13 15:26 Guile 1.8.2 Compile Error ericbambach1 @ 2007-09-15 9:06 ` Ludovic Courtès 0 siblings, 0 replies; 5+ messages in thread From: Ludovic Courtès @ 2007-09-15 9:06 UTC (permalink / raw) To: guile-user Hi, ericbambach1@discover.com writes: > When compiling on AIX 5.3 using IBM's supplied GCC 4.0.0 I get > this error. > -------snip----- > gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -D_THREAD_SAFE > -I/sys/usr/local/include -Wall -Wmissing-prototypes -Werror -MT > libguile_la-discouraged.lo -MD -MP -MF .deps/libguile_la-discouraged.Tpo > -c discouraged.c -DPIC -o .libs/libguile_la-discouraged.o > In file included from ../libguile/gc.h:27, > from ../libguile.h:73, > from discouraged.c:22: > ../libguile/hooks.h:43: error: parse error before '.' token > ../libguile/hooks.h:63: error: parse error before '.' token > ../libguile/hooks.h:67: error: parse error before '.' token > make: The error code from the last command is 1. > -------snip----- This corresponds to the following declarations: typedef void *(*scm_t_c_hook_function) (void *hook_data, void *func_data, void *data); SCM_API void scm_c_hook_add (scm_t_c_hook *hook, scm_t_c_hook_function func, void *func_data, int appendp); SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, scm_t_c_hook_function func, void *func_data); Can you please try compiling a C file including similar declarations to see what's going on (normally `SCM_API' expands to `extern')? Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1194888764.4167.13.camel@vanguard.or.providence.org>]
[parent not found: <87fxzbql1e.fsf@chbouib.org>]
* Re: Guile 1.8.2 Compile Error [not found] ` <87fxzbql1e.fsf@chbouib.org> @ 2007-11-12 21:37 ` Kevin Brott 2007-11-12 23:14 ` Ludovic Courtès 0 siblings, 1 reply; 5+ messages in thread From: Kevin Brott @ 2007-11-12 21:37 UTC (permalink / raw) To: guile-user Ludovic, et al; On Mon, 2007-11-12 at 21:13 +0100, Ludovic Courtès wrote: > Hi, > > "Kevin Brott" <kevin.brott@providence.org> writes: > > > Hopefully I'm not out-of-line or violating protocol in some brutish > > fashion, but regarding this query/response on the guile-user mailing > > list archive ... > > Actually nobody replied to my query so I'll ask you the same so that we > can find out what's going on. :-) > > (Please make sure to answer on-list so that we don't lose track of > this.) Caveat Emptor: While I've had quite a bit of experience compiling code and debugging basic syntax errors and os-specific mis-assumptions, I've not had the need to be a C/C++ code-jockey of any more skill (yet) than to write anything more complex than output hacks for something as simple as hello.c (*toe*). :q Recap: I'm having a problem compiling guile 1.8.3 on AIX 5.2 using gcc 4.2.2, that's pretty much identical to the problem reported on guile 1.8.2 (and using the same gcc as previously reported on 1.8.2 I get the same error as previously reported). The error for 1.8.3 looks like this: In file included from ../libguile/gc.h:27, from ../libguile.h:73, from discouraged.c:22: ./libguile/hooks.h:43: error: expected ';', ',' or ')' before '.' token ./libguile/hooks.h:48: error: expected specifier-qualifier-list before 'scm_t_c_hook_function' ./libguile/hooks.h:62: error: expected declaration specifiers or '...' before 'scm_t_c_hook_function' ./libguile/hooks.h:63: error: expected ';', ',' or ')' before '.' token ./libguile/hooks.h:66: error: expected declaration specifiers or '...' before 'scm_t_c_hook_function' ./libguile/hooks.h:67: error: expected ';', ',' or ')' before '.' token gmake[3]: *** [libguile_la-discouraged.lo] Error 1 Were you asking to just put the quoted code lines in a .c file and see what happens when I apply gcc to it, or were you looking for something more specific? I'm willing to do whatever you like, but I might need a more specific set of directions (possibly an example of the code you want me to test)? In the hopes it's something simple -- if test.c is: ---cut--- typedef void *(*scm_t_c_hook_function) (void *hook_data, void *func_data, void *data); SCM_API void scm_c_hook_add (scm_t_c_hook *hook, scm_t_c_hook_function func, void *func_data, int appendp); SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, scm_t_c_hook_function func, void *func_data); ---cut--- and I do gcc -o test test.c ... I get ... test.c:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' test.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' Which are the SCM_API declarations. Now if I include all of the subsections that report error lines from the libguile compile, test2.c looks like (line numbers from original code - not in .c): ---cut--- 41: 42: typedef void *(*scm_t_c_hook_function) (void *hook_data, 43* void *func_data, 44: void *data); 45: 46: typedef struct scm_t_c_hook_entry { 47: struct scm_t_c_hook_entry *next; 48* scm_t_c_hook_function func; 49: void *data; 50: } scm_t_c_hook_entry; 51...60 61: SCM_API void scm_c_hook_add (scm_t_c_hook *hook, 62* scm_t_c_hook_function func, 63* void *func_data, 64: int appendp); 65: SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, 66* scm_t_c_hook_function func, 67* void *func_data); 68: ---cut--- I get ... test2.c:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' test2.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' Which are the SCM_API declarations again. Suggestions, correction for a more valid / informative test? Just to head off the inevitable, Yes, the gcc build I have does build working binaries/libs. I can build (for example) something as intensive and make-check breakable as gmp 4.2.2 with no problems. Guile 1.4.1 builds cleanly and passes all of 'make check' on this platform. Guile 1.6.8 builds a (seemingly) working copy (but 'make check' gives about 20 errors on srfi-4.test - everything else passes fine). -- #include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott@Providence.org> * Unix Systems Engineer - SA Group - Provtech * Providence Health Systems, Tigard, OR */ DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Guile 1.8.2 Compile Error 2007-11-12 21:37 ` Kevin Brott @ 2007-11-12 23:14 ` Ludovic Courtès 2007-11-12 23:30 ` Kevin Brott 0 siblings, 1 reply; 5+ messages in thread From: Ludovic Courtès @ 2007-11-12 23:14 UTC (permalink / raw) To: guile-user Hi, "Kevin Brott" <kevin.brott@providence.org> writes: > In file included from ../libguile/gc.h:27, > from ../libguile.h:73, > from discouraged.c:22: > ./libguile/hooks.h:43: error: expected ';', ',' or ')' before '.' token This is the second line of the typedef for `scm_t_c_hook_function'. Can you try compiling *only* that typedef? And then this: typedef void * (* foo_t) (void *, void *); Then: typedef void (* foo_t) (void *, void *); The `scm_t_c_hook_function' seems perfectly valid to me so if the compiler chokes, then I'm afraid it's a broken compiler. > Were you asking to just put the quoted code lines in a .c file and see > what happens when I apply gcc to it, or were you looking for something > more specific? The former. > In the hopes it's something simple -- if test.c is: > ---cut--- > > typedef void *(*scm_t_c_hook_function) (void *hook_data, > void *func_data, > void *data); > > SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > scm_t_c_hook_function func, > void *func_data, > int appendp); > > SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > scm_t_c_hook_function func, > void *func_data); > > ---cut--- > > and I do gcc -o test test.c ... I get ... > > test.c:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > test.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > Which are the SCM_API declarations. So now the typedef itself doesn't yield any error? Did you prepend "#define SCM_API extern"? It will fail without this. > ---cut--- > 41: > 42: typedef void *(*scm_t_c_hook_function) (void *hook_data, > 43* void *func_data, > 44: void *data); > 45: > 46: typedef struct scm_t_c_hook_entry { > 47: struct scm_t_c_hook_entry *next; > 48* scm_t_c_hook_function func; > 49: void *data; > 50: } scm_t_c_hook_entry; > 51...60 > 61: SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > 62* scm_t_c_hook_function func, > 63* void *func_data, > 64: int appendp); > 65: SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > 66* scm_t_c_hook_function func, > 67* void *func_data); > 68: > ---cut--- > > I get ... > test2.c:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > test2.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > Which are the SCM_API declarations again. Again, no error with the typedef? > Suggestions, correction for a more valid / informative test? If one of the above `foo_t' typedefs works, then you can try compiling this: extern void make_foo (void *x, foo_t function); Then maybe this: extern void make_foo (void *x, foo_t *function); This is all trial-and-error since I have no idea of what's wrong with this compiler. I quickly browsed the bug database at gcc.gnu.org and failed to find anything related. You might want to try that too... Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Guile 1.8.2 Compile Error 2007-11-12 23:14 ` Ludovic Courtès @ 2007-11-12 23:30 ` Kevin Brott 0 siblings, 0 replies; 5+ messages in thread From: Kevin Brott @ 2007-11-12 23:30 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guile-User On Tue, 2007-11-13 at 00:14 +0100, Ludovic Courtès wrote: .. > > In file included from ../libguile/gc.h:27, > > from ../libguile.h:73, > > from discouraged.c:22: > > ./libguile/hooks.h:43: error: expected ';', ',' or ')' before '.' token > > This is the second line of the typedef for `scm_t_c_hook_function'. Can > you try compiling *only* that typedef? And then this: > > typedef void * (* foo_t) (void *, void *); > > Then: > > typedef void (* foo_t) (void *, void *); > > > > > > > The `scm_t_c_hook_function' seems perfectly valid to me so if the > compiler chokes, then I'm afraid it's a broken compiler. > > > Were you asking to just put the quoted code lines in a .c file and see > > what happens when I apply gcc to it, or were you looking for something > > more specific? > > The former. > > > In the hopes it's something simple -- if test.c is: > > ---cut--- > > > > typedef void *(*scm_t_c_hook_function) (void *hook_data, > > void *func_data, > > void *data); > > > > SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > > scm_t_c_hook_function func, > > void *func_data, > > int appendp); > > > > SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > > scm_t_c_hook_function func, > > void *func_data); > > > > ---cut--- > > > > and I do gcc -o test test.c ... I get ... > > > > test.c:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > test.c:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > > > Which are the SCM_API declarations. > > So now the typedef itself doesn't yield any error? > > Did you prepend "#define SCM_API extern"? It will fail without this. > > > ---cut--- > > 41: > > 42: typedef void *(*scm_t_c_hook_function) (void *hook_data, > > 43* void *func_data, > > 44: void *data); > > 45: > > 46: typedef struct scm_t_c_hook_entry { > > 47: struct scm_t_c_hook_entry *next; > > 48* scm_t_c_hook_function func; > > 49: void *data; > > 50: } scm_t_c_hook_entry; > > 51...60 > > 61: SCM_API void scm_c_hook_add (scm_t_c_hook *hook, > > 62* scm_t_c_hook_function func, > > 63* void *func_data, > > 64: int appendp); > > 65: SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, > > 66* scm_t_c_hook_function func, > > 67* void *func_data); > > 68: > > ---cut--- > > > > I get ... > > test2.c:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > test2.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > > > Which are the SCM_API declarations again. > > Again, no error with the typedef? > > > Suggestions, correction for a more valid / informative test? > > If one of the above `foo_t' typedefs works, then you can try compiling > this: > > extern void make_foo (void *x, foo_t function); > > Then maybe this: > > extern void make_foo (void *x, foo_t *function); > > This is all trial-and-error since I have no idea of what's wrong with > this compiler. > > I quickly browsed the bug database at gcc.gnu.org and failed to find > anything related. You might want to try that too... > > Thanks, > Ludovic. -- #include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott@Providence.org> * Unix Systems Engineer - SA Group - Provtech * Providence Health Systems - 503-216-4703 */ DISCLAIMER: This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-12 23:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-09-13 15:26 Guile 1.8.2 Compile Error ericbambach1 2007-09-15 9:06 ` Ludovic Courtès [not found] <1194888764.4167.13.camel@vanguard.or.providence.org> [not found] ` <87fxzbql1e.fsf@chbouib.org> 2007-11-12 21:37 ` Kevin Brott 2007-11-12 23:14 ` Ludovic Courtès 2007-11-12 23:30 ` Kevin Brott
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).