unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ...
@ 2008-08-18 23:41 Robert A. Schmied
  2008-08-20 17:10 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Robert A. Schmied @ 2008-08-18 23:41 UTC (permalink / raw)
  To: bug-guile

in attempt to build guile 1.8.5 i ran into this problem when compiling
libguile/filesys.c into filesys.o

.
.
.
. /usr/include/dirent.h
.. /usr/include/sys/dirent.h
filesys.c: In function `scm_readdir':
filesys.c:919: error: too many arguments to function `readdir_r'
. ../libguile/filesys.x
gmake[3]: *** [filesys.lo] Error 1
gmake[3]: Leaving directory `/usr/local/src/guile-1.8.5/libguile'


the sol10 manpage for readdir_r includes:

SYNOPSIS
     #include <sys/types.h>
     #include <dirent.h>

     struct dirent *readdir(DIR *dirp);

     struct dirent *readdir_r(DIR *dirp, struct dirent *entry);

  Standard conforming
     cc [ flag... ] file... -D_POSIX_PTHREAD_SEMANTICS [ library... ]

     int readdir_r(DIR *restrict dirp,  struct  dirent  *restrict
     entry, struct dirent **restrict result);

with the addition of -D_POSIX_PTHREAD_SEMANTICS on the compile line
the compile succeeds. more specifically:
gcc -D_POSIX_PTHREAD_SEMANTICS \
 -DHAVE_CONFIG_H -I.. -I.. -I.. -I/usr/local/include -O -H -mcpu=v9 \
 -mfpu -Wall -Wmissing-prototypes -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo \
 -c filesys.c  -fPIC -DPIC -o .libs/filesys.o
works

gcc -DHAVE_CONFIG_H -I.. -I.. -I.. -I/usr/local/include -O -H -mcpu=v9 \
 -mfpu -Wall -Wmissing-prototypes -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo \
 -c filesys.c  -fPIC -DPIC -o .libs/filesys.o
fails

i expect i will need to add something about threads to the various linker
lines in order to appropriately load the correct thread libs, but how and
where?

do i need to specify something else to configure to trigger the use of
the solaris standards conforming directive(s)?

or am i just at the mercy my older gcc and solaris10?

ahha -- maybe at the very end of the readdir_r manpage is the clue i need:
     For       POSIX.1c-conforming       applications,        the
     _POSIX_PTHREAD_SEMANTICS  and _REENTRANT flags are automati-
     cally turned on by defining the _POSIX_C_SOURCE flag with  a
     value >= 199506L.


gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SunOS twok 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Blade-1000


thanks for any advice you can provide, yell if there's something more
i can do.

aloha

ras





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

end of thread, other threads:[~2008-08-20 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 23:41 guile 1.8.5 solaris 10 sparc with gcc readdir_r problem Robert A. Schmied
2008-08-20 17:10 ` 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).