unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@chbouib.org (Ludovic Courtès)
To: bug-guile@gnu.org
Subject: Re: guile-1.8.1 build fails at libguile/filesys.c on Solaris2.6
Date: Fri, 25 May 2007 17:51:09 +0200	[thread overview]
Message-ID: <87abvsyk9e.fsf@chbouib.org> (raw)
In-Reply-To: 200705101451.QAA25543@neuro.insel.ch

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


      reply	other threads:[~2007-05-25 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87abvsyk9e.fsf@chbouib.org \
    --to=ludo@chbouib.org \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).