From: "Robert A. Schmied" <ras@acm.org>
To: bug-guile@gnu.org
Subject: guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ...
Date: Mon, 18 Aug 2008 16:41:48 -0700 [thread overview]
Message-ID: <48AA08BC.1040603@acm.org> (raw)
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
next reply other threads:[~2008-08-18 23:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 23:41 Robert A. Schmied [this message]
2008-08-20 17:10 ` guile 1.8.5 solaris 10 sparc with gcc readdir_r problem Ludovic Courtès
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=48AA08BC.1040603@acm.org \
--to=ras@acm.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).