guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile 1.8.2 Compile Error


From: Kevin Brott
Subject: Re: Guile 1.8.2 Compile Error
Date: Mon, 12 Nov 2007 13:37:52 -0800

Ludovic, et al;

On Mon, 2007-11-12 at 21:13 +0100, Ludovic Courtès wrote: 
> Hi,
> 
> "Kevin Brott" <address@hidden> 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 <address@hidden> 
 * 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]