[Python-bugs-list] [ python-Bugs-690317 ] 2.3a2 build fails on Solaris: posixmodule

SourceForge.net noreply@sourceforge.net
Thu, 27 Mar 2003 17:03:28 -0800


Bugs item #690317, was opened at 2003-02-20 23:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=690317&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Bauer (jeffbauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.3a2 build fails on Solaris: posixmodule

Initial Comment:
gcc 2.95.2
SunOS 5.6 sparc

gcc  -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include  -DPy_BUILD_CORE      -c
./Modules/posixmodule.c -o Modules/posixmodule.o

In file included from Include/stringobject.h:10,
                 from Include/Python.h:83,
                 from ./Modules/posixmodule.c:16:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/include/stdarg.h:170:
warning                                                                                                          
: redefinition of `va_list'
/usr/include/stdio.h:90: warning: `va_list' previously
declared here
./Modules/posixmodule.c: In function `posix_access':
./Modules/posixmodule.c:1261: warning: implicit
declaration of function `access'
./Modules/posixmodule.c: In function `posix_ttyname':
./Modules/posixmodule.c:1302: warning: implicit
declaration of function
`ttyname                                                                                                          
'

----  <snip> <snip> <snip>  ---


                             f'
./Modules/posixmodule.c: In function `posix_confstr':
./Modules/posixmodule.c:6443: warning: implicit
declaration of function
`confstr                                                                                                          
'
./Modules/posixmodule.c: In function `posix_sysconf':
./Modules/posixmodule.c:6985: warning: implicit
declaration of function
`sysconf                                                                                                          
'
./Modules/posixmodule.c: In function
`setup_confname_table':
./Modules/posixmodule.c:7024: warning: implicit
declaration of function `qsort'
make: *** [Modules/posixmodule.o] Error 1



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-03-28 02:03

Message:
Logged In: YES 
user_id=21627

Yes, _POSIX_C_SOURCE is defined as 200112L; together with
_XOPEN_SOURCE (600) and _XOPEN_SOURCE_EXTENDED (1).

Can you please locate the block that sets
define_xopen_source in configure and see whether setting
this to no helps?

It looks to me that Solaris 2.6 is quite broken in this
respect, but I would accept adding it to the list of
known-broken systems, along with a comment that explains how
precisely it breaks.

----------------------------------------------------------------------

Comment By: Stuart Bishop (zenzen)
Date: 2003-03-28 01:42

Message:
Logged In: YES 
user_id=46639

Lots (possibly all) of the HAVE_*_H tests in configure are
failing:
    In file included from /usr/include/sys/wait.h:25,
                 from /usr/include/stdlib.h:22,
                 from configure:2876:
    /usr/include/sys/siginfo.h:204: field `__value' has
incomplete type

I think the offending bits of code in sys/siginfo.h are:

#if (!defined(_POSIX_C_SOURCE) && !defined(_XPG4_2)) || \
        (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)

union sigval {
        int     sival_int;      /* integer value */
        void    *sival_ptr;     /* pointer value */
};

#else                           /* needed in siginfo_t
structure */

union __sigval {
        int     __sival_int;    /* integer value */
        void    *__sival_ptr;   /* pointer value */
};

#endif

[...]

#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
                                        union sigval    __value;
#else
                                        union __sigval  __value;
#endif


Would  _POSIX_C_SOURCE be getting set to a value > 2, which
would break siginfo.h?

PS. This Solaris 2.6 machine isn't mine and I can't give
access to it.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-28 00:55

Message:
Logged In: YES 
user_id=21627

This gets more and more confusing. Include/Python.h does
include both <unistd.h> and <stdlib.h>. Can you find out why
it isn't included on your system?

----------------------------------------------------------------------

Comment By: Stuart Bishop (zenzen)
Date: 2003-03-27 21:54

Message:
Logged In: YES 
user_id=46639

Adding a #include <unistd.h> Fixes the following:

./Modules/posixmodule.c: In function `posix_fchdir':
./Modules/posixmodule.c:1200: `fchdir' undeclared (first use
in this function)
./Modules/posixmodule.c:1200: (Each undeclared identifier is
reported only once
./Modules/posixmodule.c:1200: for each function it appears in.)
./Modules/posixmodule.c: In function `posix_chroot':
./Modules/posixmodule.c:1237: `chroot' undeclared (first use
in this function)
./Modules/posixmodule.c: In function `posix_fsync':
./Modules/posixmodule.c:1249: `fsync' undeclared (first use
in this function)
./Modules/posixmodule.c: In function `posix_fdatasync':
./Modules/posixmodule.c:1267: `fdatasync' undeclared (first
use in this function

Adding #include <stdlib.h> fixes the following:
./Modules/posixmodule.c: In function `posix_system':
./Modules/posixmodule.c:1868: warning: implicit declaration
of function `system'
./Modules/posixmodule.c: In function `posix_execv':
./Modules/posixmodule.c:2110: warning: implicit declaration
of function `malloc'
./Modules/posixmodule.c: In function `posix_openpty':
./Modules/posixmodule.c:2613: warning: function declaration
isn't a prototype
./Modules/posixmodule.c:2632: warning: function declaration
isn't a prototype
./Modules/posixmodule.c:2634: warning: implicit declaration
of function `grantpt'
./Modules/posixmodule.c:2639: warning: implicit declaration
of function `unlockpt'
./Modules/posixmodule.c: In function `posix_putenv':
./Modules/posixmodule.c:5486: warning: implicit declaration
of function `putenv'
./Modules/posixmodule.c: In function `posix_tempnam':
./Modules/posixmodule.c:5917: warning: implicit declaration
of function `free'
./Modules/posixmodule.c: In function `setup_confname_table':
./Modules/posixmodule.c:6903: warning: implicit declaration
of function `qsort'

Changing line 187 from:
extern char *getcwd(char *, int);
to:
extern char *getcwd(char *, size_t);

And everything builds happily.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-05 16:40

Message:
Logged In: YES 
user_id=21627

I find several things confusing in this report:

- why is va_list redefined? To my knowledge, gcc 2.95.2
supports Solaris 2.6 correctly, so it shouldn't provide a
conflicting va_list definition. The typical cause is that
the gcc installation doesn't match the operating system
version (i.e. fixincludes was run for different headers).
Since the gcc installation appears to have been built for
2.6, I infer that the system being used might not be Solaris
2.6.

- All the problems reported are warnings, which don't cause
compilation to fail. What is the actual error (use -w to
suppress all warnings).

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-02-21 00:08

Message:
Logged In: YES 
user_id=33168

Jeff, I don't know if anyone has access to Solaris 5.6.  Can
you provide a patch to get posixmodule to compile?  From the
bug report, I only see warnings, not an actual error which
is breaking the build.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=690317&group_id=5470