bug-guile
[Top][All Lists]
Advanced

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

guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ...


From: Robert A. Schmied
Subject: guile 1.8.5 solaris 10 sparc with gcc readdir_r problem ...
Date: Mon, 18 Aug 2008 16:41:48 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20060629

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





reply via email to

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