bug-gnulib
[Top][All Lists]
Advanced

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

Build errors on IRIX 5.3


From: Tom G. Christensen
Subject: Build errors on IRIX 5.3
Date: Sat, 29 Oct 2011 13:17:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110927 Red Hat/3.1.15-1.el6_1 Thunderbird/3.1.15

Hello,

Building the usual full snapshot with tests on IRIX 5.3 resulted in some build errors and no tests being run.

These are the issues:

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/ tgcware/include -g -O2 -MT ffsl.o -MD -MP -MF $depbase.Tpo -c -o ffsl.o ffsl.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from ffsl.h:22,
                 from ffsl.c:4:
./string.h:482: error: syntax error before "__dest"
./string.h:560: error: syntax error before "__dst"
./string.h:592: error: syntax error before "__dst"
./string.h:854: error: syntax error before "__stringp"
make[4]: *** [ffsl.o] Error 1
depbase=`echo ffsll.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/ tgcware/include -g -O2 -MT ffsll.o -MD -MP -MF $depbase.Tpo -c -o ffsll.o ffsll.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from ffsl.h:22,
                 from ffsll.c:4:
./string.h:482: error: syntax error before "__dest"
./string.h:560: error: syntax error before "__dst"
./string.h:592: error: syntax error before "__dst"
./string.h:854: error: syntax error before "__stringp"
make[4]: *** [ffsll.o] Error 1

Those two errors are fixed by adding #include <config.h> to ffsl.h.

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/ tgcware/include -g -O2 -MT glob.o -MD -MP -MF $depbase.Tpo -c -o glob.o glob.c &&\
        mv -f $depbase.Tpo $depbase.Po
glob.c: In function `rpl_glob':
glob.c:625: error: too many arguments to function `getpwnam_r'
glob.c:750: error: too many arguments to function `getpwnam_r'

This happens because configure did not check if getpwnam_r has a POSIX signature (and it does not on IRIX 5.3).
Passing ac_cv_func_getpwnam_r=no works.

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I../intl -I/usr/ tgcware/include -g -O2 -MT poll.o -MD -MP -MF $depbase.Tpo -c -o poll.o poll.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from poll.c:33:
./poll.h:387: error: syntax error before "nfds_t"
poll.c:319: error: syntax error before "nfds_t"
poll.c: In function `rpl_poll':
poll.c:326: error: `nfds_t' undeclared (first use in this function)
poll.c:326: error: (Each undeclared identifier is reported only once
poll.c:326: error: for each function it appears in.)
poll.c:326: error: syntax error before "i"
poll.c:331: error: `nfd' undeclared (first use in this function)
poll.c:351: error: `pfd' undeclared (first use in this function)
poll.c:358: error: `timeout' undeclared (first use in this function)
poll.c:384: error: `i' undeclared (first use in this function)

The gnulib definition of nfds_t is only activated if the system lacks poll.h but IRIX 5.3 has poll.h but no definition of nfds_t. Moving the definition of nfds_t outside the scope of HAVE_POLL_H fixed this error.

There were also builds errors in the testsuite:
gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -MT test-poll-h.o -MD -MP -MF $depbase.Tpo -c -o test-poll-h.o test-poll-h.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from test-poll-h.c:21:
../gllib/poll.h:387: error: syntax error before "nfds_t"
gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -MT test-poll.o -MD -MP -MF $depbase.Tpo -c -o test-poll.o test-poll.c &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from test-poll.c:23:
../gllib/poll.h:387: error: syntax error before "nfds_t"
test-poll.c:26: error: syntax error before "nfds_t"
make[4]: *** [test-poll.o] Error 1

These go away with the fix to gnulib poll.h mentioned above.


gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-grantpt.o -MD -MP -MF $depbase.Tpo -c -o test-grantpt.o test-grantpt.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-grantpt.c:22: error: `grantpt' undeclared here (not in a function)
gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-ptsname.o -MD -MP -MF $depbase.Tpo -c -o test-ptsname.o test-ptsname.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-ptsname.c:22: error: `ptsname' undeclared here (not in a function)
test-ptsname.c: In function `main':
test-ptsname.c:77: warning: assignment makes pointer from integer without a cast test-ptsname.c:130: warning: assignment makes pointer from integer without a cast test-ptsname.c:160: warning: assignment makes pointer from integer without a cast gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-unlockpt.o -MD -MP -MF $depbase.Tpo -c -o test-unlockpt.o test-unlockpt.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-unlockpt.c:22: error: `unlockpt' undeclared here (not in a function)

All three functions have no prototypes in the system headers but curiously have manpages documenting them. If I provide the prototypes the build errors go away and tests pass (only grantpt, ptsname tested).


gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-lgamma.o -MD -MP -MF $depbase.Tpo -c -o test-lgamma.o test-lgamma.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-lgamma.c:24: error: `lgamma' undeclared here (not in a function)

In <math.h> the lgamma prototype is guarded by '#if defined (_XOPEN_SOURCE)'.

gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-nextafter.o -MD -MP -MF $depbase.Tpo -c -o test-nextafter.o test-nextafter.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-nextafter.c:24: error: `nextafter' undeclared here (not in a function)
gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-remainder.o -MD -MP -MF $depbase.Tpo -c -o test-remainder.o test-remainder.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-remainder.c:24: error: `remainder' undeclared here (not in a function)

In <math.h> the prototypes has two guards:
#if (defined(__EXTENSIONS__) && (!defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)))
...various other math functions...
#if (defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 400))
extern double   nextafter(double, double);
#pragma no side effects (nextafter)
extern double   remainder(double, double);
#pragma no side effects (remainder)
#endif
....

It seems that unmasking these in the system includes is not possible.

The header contains this note regarding the pragma:
 * Power C notes:
 *  - Power C assumes that all external functions (unless otherwise marked)
 *    might modify global data and therefore calls to such functions can
 *    not be safely concurrentized.
 *  - The pragma "no side effects" indicates that the named function is
 *    free from such side effects and calls to it can be concurrentized.


gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -I/usr/tgcware/include -g -O2 -M T test-select.o -MD -MP -MF $depbase.Tpo -c -o test-select.o test-select.c &&\
        mv -f $depbase.Tpo $depbase.Po
test-select.c:25: error: `select' undeclared here (not in a function)

The prototype for select() is in <unistd.h> and not <sys/select.h> also the manpage says:
#include <unistd.h>
#include <sys/types.h>
#include <bstring.h>
#include <sys/time.h>

If I include <unistd.h> before <sys/select.h> in test-select.c then the build error goes away.

I've dumped the full build log and a copy of config.log here:
http://jupiterrise.com/tmp/gnulib-gb3e1b8d-irix53-gcc346-build.log
http://jupiterrise.com/tmp/gnulib-gb3e1b8d-irix53-gcc346-config.log or
http://jupiterrise.com/tmp/gnulib-gb3e1b8d-irix53-gcc346-config.log.gz

-tgc



reply via email to

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