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 [GAH]


From: Kevin Brott
Subject: Re: Guile 1.8.2 Compile Error [GAH]
Date: Tue, 13 Nov 2007 11:00:43 -0800

On Mon, 2007-11-12 at 16:08 -0800, Kevin Brott wrote:
> > 
> > Then just "gcc -c the-file.c".
> > 
> 
> Those two examples compile fine.  I'll retest the original test files
> the same way, and report back tomorrow, as I'm sodding off work for the
> day. :)
> 

Okay - so re-running everything via gcc -c file.c - here are the file
contents and the error output (scripted the run for uniformity):

===BEGIN: evt.c===
extern void make_foo (void *x, foo_t function);
===END: evt.c===
# gcc -c evt.c && echo OK || echo NOT OK 
evt.c:1: error: expected declaration specifiers or '...' before 'foo_t'
NOT OK


===BEGIN: evt2.c===
extern void make_foo (void *x, foo_t *function);
===END: evt2.c===
# gcc -c evt2.c && echo OK || echo NOT OK 
evt2.c:1: error: expected declaration specifiers or '...' before 'foo_t'
NOT OK


===BEGIN: test.c===
#define SCM_API extern
  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);
===END: test.c===
# gcc -c test.c && echo OK || echo NOT OK 
test.c:5: error: expected ')' before '*' token
test.c:9: error: expected ')' before '*' token
NOT OK


===BEGIN: test2.c===
#define SCM_API extern
typedef void *(*scm_t_c_hook_function) (void *hook_data,
                                         void *func_data,
                                        void *data);
typedef struct scm_t_c_hook_entry {
  struct scm_t_c_hook_entry *next;
  scm_t_c_hook_function func;
  void *data;
} scm_t_c_hook_entry;
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);
===END: test2.c===
# gcc -c test2.c && echo OK || echo NOT OK 
test2.c:10: error: expected ')' before '*' token
test2.c:14: error: expected ')' before '*' token
NOT OK


===BEGIN: test3.c===
  typedef void * (* foo_t) (void *, void *);
  foo_t
  doit (foo_t x)
  {
    return x;
  }
===END: test3.c===
# gcc -c test3.c && echo OK || echo NOT OK 
OK


===BEGIN: test4.c===
  typedef void * (* foo_t) (void *, void *);
  extern void make_foo (void *x, foo_t function);
  int
  stuff (int x)
  {
    return x;
  }
===END: test4.c===
# gcc -c test4.c && echo OK || echo NOT OK 
OK


===BEGIN: typedef1.c===
typedef void *(*scm_t_c_hook_function) (void *hook_data,
                                         void *func_data,
                                        void *data);
===END: typedef1.c===
# gcc -c typedef1.c && echo OK || echo NOT OK 
OK


===BEGIN: typedef2.c===
typedef void * (* foo_t) (void *, void *);
===END: typedef2.c===
# gcc -c typedef2.c && echo OK || echo NOT OK 
OK


===BEGIN: typedef3.c===
typedef void (* foo_t) (void *, void *);
===END: typedef3.c===
# gcc -c typedef3.c && echo OK || echo NOT OK 
OK


FWIW - guile 1.8.3 does compile, and passes all of 'make check' on
Ubuntu 7.10 (gutsy) using gcc version 4.1.3 20070929 (prerelease)
(Ubuntu 4.1.2-16ubuntu2).  

However, all of the code snippets listed above fail in exactly the same
way on Ubuntu as they did on AIX.  So I'm guessing that some config
guessing is wrong on AIX, and either it's trying to compile code
segments that isn't being compiled on Linux, or it's not including
something that is being included on Linux to stop the errors.

I'm diffing the config.h's now and will experiment a bit with changes to
see if I can find the magic "wtf" particle.

-- 
#include <stddisclaimer.h>
/* Kevin Brott <address@hidden> 
 * 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.




reply via email to

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