unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6
@ 2007-05-10 14:51 anirkko
  2007-05-25 15:51 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: anirkko @ 2007-05-10 14:51 UTC (permalink / raw)
  To: bug-guile


Hi
The guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6
(see output below).

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
When that is corrected, dirent_r is called with too many arguments,
etc...


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

With that, the build continues - but there must be a better way
with a corrected configure...

Arto


output of 'gmake':
---------------------------------------------------------------
...
gcc -DHAVE_CONFIG_H -I. -I/build/guile-1.8.1/libguile -I.. -I.. -I/build/guile-1.8.1 -O2 -funswitch-loops -fgcse-after-reload -mcpu=supersparc -mno-app-regs -Wall -Wmissing-prototypes -Werror -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo -c /build/guile-1.8.1/libguile/filesys.c -o filesys.o
cc1: warnings being treated as errors
/build/guile-1.8.1/libguile/filesys.c: In function 'scm_readdir':
/build/guile-1.8.1/libguile/filesys.c:916: warning: implicit declaration of function 'readdir64_r'
gmake[3]: *** [filesys.lo] Error 1
gmake[3]: Leaving directory ...
...
...


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6
  2007-05-10 14:51 guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6 anirkko
@ 2007-05-25 15:51 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2007-05-25 15:51 UTC (permalink / raw)
  To: bug-guile

Hi,

Sorry for the late answer.

anirkko@insel.ch 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.



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-25 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 14:51 guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6 anirkko
2007-05-25 15:51 ` Ludovic Courtès

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).