bug-guile
[Top][All Lists]
Advanced

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

Re: guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6


From: Ludovic Courtès
Subject: Re: guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6
Date: Fri, 25 May 2007 17:51:09 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

Sorry for the late answer.

address@hidden writes:

> Reason: in file libguile/_scm.h, the wrong selection is taken in
>     #if HAVE_STAT64
>     #define CHOOSE_LARGEFILE(foo,foo64)     foo64
>     #else
>     #define CHOOSE_LARGEFILE(foo,foo64)     foo
>     #endif

This means either that `HAVE_STAT64' gets defined at configure-time
while it shouldn't (unlikely), or that some additional macro needs to be
defined for Solaris to provide the actual function prototypes (more
likely), or that some of the feature macros we define are mutually
exclusive (e.g., `_LARGEFILE64_SOURCE' is not compatible with some other
thing).

> When that is corrected, dirent_r is called with too many arguments,
> etc...

The error message you copied does not mention `dirent_r ()', can you
explain what's wrong with it?

> workarounds (quick and dirty):
> insert
>     #undef HAVE_STAT64
> before the above block in file libguile/_scm.h
>
> and remove / comment out
>     //### #define _GNU_SOURCE              /* ask glibc for everything */
>     //### #define _LARGEFILE64_SOURCE      /* ask for stat64 etc */
> and insert
>     #define __EXTENSIONS__ (or #define _REENTRANT ?)
>     #define _POSIX_PTHREAD_SEMANTICS
>     #include <sys/types.h>
>     #include <dirent.h>
> in file libguile/filesys.c

`_GNU_SOURCE' cannot do any harm on Solaris I guess.  ;-)

`_LARGEFILE64_SOURCE' should normally have the same effect on Solaris as
on GNU.  Can you please try to compile a C source file along the lines
of:

  #define _LARGEFILE64_SOURCE

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>

  int
  main (int argc, char *argv[])
  {
    struct stat64 st;

    return (stat64 ("/etc/fstab", &st));
  }

(Note: You could also probably compile the whole thing without
`-Werror'...)

Thanks,
Ludovic.





reply via email to

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