[New-bugs-announce] [issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

Martin Mokrejs report at bugs.python.org
Thu Jul 3 02:07:46 CEST 2008


New submission from Martin Mokrejs <mmokrejs at users.sourceforge.net>:

Hi,
  when building on Solaris 2.6 with gcc I get the following error:

building '_ctypes' extension
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/_ctypes.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/_ctypes.o
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/callbacks.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/callbacks.o
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/callproc.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/callproc.o
/usr/scratch/Python-2.5.2/Modules/_ctypes/callproc.c: In function
`_CallProc':
/usr/scratch/Python-2.5.2/Modules/_ctypes/callproc.c:921: warning:
implicit declaration of function `alloca'
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/stgdict.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/stgdict.o
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/cfield.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/cfield.o
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi/include
-Ibuild/temp.solaris-2.6-sun4u-2.5/libffi
-I/usr/scratch/Python-2.5.2/Modules/_ctypes/libffi/src -I. -IInclude
-I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include
-I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.o
/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.c: In function
`more_core':
/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error:
`MAP_ANONYMOUS' undeclared (first use in this function)
/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error:
(Each undeclared identifier is reported only once
/usr/scratch/Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error:
for each function it appears in.)
building '_ctypes_test' extension
gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include -I.
-IInclude -I./Include -I/usr/local/include
-I/usr/scratch/Python-2.5.2/Include -I/usr/scratch/Python-2.5.2 -c
/usr/scratch/Python-2.5.2/Modules/_ctypes/_ctypes_test.c -o
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/_ctypes_test.o
gcc -shared -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes
build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/_ctypes/_ctypes_test.o
-L/usr/local/lib -o build/lib.solaris-2.6-sun4u-2.5/_ctypes_test.so


Let me add that I see -fPIC in the top-level Makefile but do not know
why -static is not in the same variable as well. Anyway, it is not
a shared library problem I think as I already recompiled my bzip2,
openssl and ncurses libs with "-shared -fpic". ;-)

----------
messages: 69152
nosy: mmokrejs
severity: normal
status: open
title: Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3265>
_______________________________________


More information about the New-bugs-announce mailing list