python / cpython

The Python programming language
https://www.python.org
Other
63.2k stars 30.26k forks source link

Python 2.6.5 fails to build on AIX 5.3 #53006

Closed c75ccee3-2b93-4940-a492-f0f357936026 closed 14 years ago

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago
BPO 8760
Nosy @theller, @amauryfa, @pitrou, @tarekziade

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = 'https://github.com/theller' closed_at = created_at = labels = ['build', 'invalid'] title = 'Python 2.6.5 fails to build on AIX 5.3' updated_at = user = 'https://bugs.python.org/oirraza' ``` bugs.python.org fields: ```python activity = actor = 'amaury.forgeotdarc' assignee = 'theller' closed = True closed_date = closer = 'amaury.forgeotdarc' components = ['Build'] creation = creator = 'oirraza' dependencies = [] files = [] hgrepos = [] issue_num = 8760 keywords = [] message_count = 10.0 messages = ['106011', '106069', '106086', '106142', '106183', '106192', '106198', '106217', '106239', '106243'] nosy_count = 5.0 nosy_names = ['theller', 'amaury.forgeotdarc', 'pitrou', 'oirraza', 'tarek'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = None status = 'closed' superseder = None type = 'compile error' url = 'https://bugs.python.org/issue8760' versions = ['Python 2.6'] ```

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago

Build of Python 2.6.5 on AIX 5.3 fails with the below error message.

The configure line is: ./configure

[...]
building '_multiprocessing' extension
cc_r -qlanglvl=extc89 -DNDEBUG -O -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/sw_install/python-2.6.5/./Include -I. -IInclude -I./Include -I/usr/local/include -I/sw_install/python-2.6.5/Include -I/sw_install/python-2.6.5 -c /sw_install/python-2.6.5/Modules/_multiprocessing/multiprocessing.c -o build/temp.aix-5.3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/multiprocessing.o
cc_r -qlanglvl=extc89 -DNDEBUG -O -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/sw_install/python-2.6.5/./Include -I. -IInclude -I./Include -I/usr/local/include -I/sw_install/python-2.6.5/Include -I/sw_install/python-2.6.5 -c /sw_install/python-2.6.5/Modules/_multiprocessing/socket_connection.c -o build/temp.aix-5.3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/socket_connection.o
cc_r -qlanglvl=extc89 -DNDEBUG -O -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/sw_install/python-2.6.5/./Include -I. -IInclude -I./Include -I/usr/local/include -I/sw_install/python-2.6.5/Include -I/sw_install/python-2.6.5 -c /sw_install/python-2.6.5/Modules/_multiprocessing/semaphore.c -o build/temp.aix-5.3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/semaphore.o
./Modules/ld_so_aix cc_r -qlanglvl=extc89 -bI:Modules/python.exp build/temp.aix-5.3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/multiprocessing.o build/temp.aix-5./multim3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/socket_connection.o build/temp.aix-5.3-2.6/sw_install/python-2.6.5/Modules/_multiprocessing/semaphore.o -L/usr/local/lib -o build/lib.aix-5.3-2.6/_multiprocessing.so
checking build system type... powerpc-ibm-aix5.3.0.0
checking host system type... powerpc-ibm-aix5.3.0.0
checking target system type... powerpc-ibm-aix5.3.0.0
checking for a BSD-compatible install... /sw_install/python-2.6.5/Modules/_ctypes/libffi/install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /sw_install/python-2.6.5/Modules/_ctypes/libffi/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... cc_r -qlanglvl=extc89
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc_r -qlanglvl=extc89 accepts -g... yes
checking for cc_r -qlanglvl=extc89 option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc_r -qlanglvl=extc89... none
checking dependency style of cc_r -qlanglvl=extc89... none
checking whether cc_r -qlanglvl=extc89 and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for non-GNU ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... cc_r -qlanglvl=extc89 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... xlC_r
checking whether we are using the GNU C++ compiler... no
checking whether xlC_r accepts -g... yes
checking dependency style of xlC_r... none
checking how to run the C++ preprocessor... xlC_r -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 18432
checking command to parse /usr/bin/nm -B output from cc_r -qlanglvl=extc89 object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for cc_r -qlanglvl=extc89 option to produce PIC...
checking if cc_r -qlanglvl=extc89 static flag -bnso -bI:/lib/syscalls.exp works... no
checking if cc_r -qlanglvl=extc89 supports -c -o file.o... yes
checking whether the cc_r -qlanglvl=extc89 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... aix5.3.0.0 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... yes
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking for ANSI C header files... (cached) yes
checking for memcpy... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for double... yes
checking size of double... 8
checking for long double... yes
checking size of long double... 8
checking whether byte ordering is bigendian... yes
checking assembler .cfi pseudo-op support... no
checking whether .eh_frame section should be read-only... no
checking for __attribute__((visibility("hidden")))... no
cc_r: 1501-210 command option t contains an incorrect subargument
configure: creating ./config.status
config.status: creating include/ffi.h
sed: Command line is too long.
config.status: creating fficonfig.py
sed: Command line is too long.
config.status: creating fficonfig.h
config.status: linking /sw_install/python-2.6.5/Modules/_ctypes/libffi/src/powerpc/ffitarget.h to include/ffitarget.h
config.status: linking /sw_install/python-2.6.5/Modules/_ctypes/libffi/include/ffi_common.h to include/ffi_common.h
config.status: executing depfiles commands
config.status: executing include commands
config.status: executing src commands
Traceback (most recent call last):
  File "./setup.py", line 1919, in <module>
    main()
  File "./setup.py", line 1914, in main
    'Lib/smtpd.py']
  File "/sw_install/python-2.6.5/Lib/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/sw_install/python-2.6.5/Lib/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/sw_install/python-2.6.5/Lib/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/sw_install/python-2.6.5/Lib/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
  File "/sw_install/python-2.6.5/Lib/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/sw_install/python-2.6.5/Lib/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/sw_install/python-2.6.5/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "./setup.py", line 201, in build_extensions
    build_ext.build_extensions(self)
  File "/sw_install/python-2.6.5/Lib/distutils/command/build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
  File "./setup.py", line 234, in build_extension
    if not self.configure_ctypes(ext):
  File "./setup.py", line 1730, in configure_ctypes
    extra_compile_args = fficonfig['ffi_cflags'].split()
KeyError: 'ffi_cflags'
make: 1254-004 The error code from the last command is 1.

Stop.

Thanks.

Orlando

pitrou commented 14 years ago

According to your log, the interpreter itself compiled fine (you can check that with "./python" and even run the test suite: "./python -m test.regrtest -w"), but the _ctypes extension failed configuring.

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago

Antonie, you are right, the interpreter was compiled fine, this is the output when i run python

root@host:python-2.6.5# ./python 'import site' failed; use -v for traceback Python 2.6.5 (r265:79063, May 18 2010, 19:19:48) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>>

but when i run ./python -m test.regrtest -w , the output is: root@host:python-2.6.5# ./python -m test.regrtest -w 'import site' failed; use -v for traceback Could not import runpy module

Thanks

Orlando Irrazabal El 19/05/2010 10:30, Antoine Pitrou escribió:

Antoine Pitrou\pitrou@free.fr\ added the comment:

According to your log, the interpreter itself compiled fine (you can check that with "./python" and even run the test suite: "./python -m test.regrtest -w"), but the _ctypes extension failed configuring.

---------- assignee: -> theller nosy: +pitrou, theller


Python tracker\report@bugs.python.org\ \http://bugs.python.org/issue8760\


amauryfa commented 14 years ago

There is a message:: 'import site' failed; use -v for traceback what do you get when you run "./python -v"?

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago

Sorry, i didn't send that because the output is the same:

root@host:python-2.6.5# ./python -m test.regrtest -w -v 'import site' failed; use -v for traceback Could not import runpy module

root@catastrix:python-2.6.5# ./python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook 'import site' failed; traceback: ImportError: No module named site Python 2.6.5 (r265:79063, May 19 2010, 17:31:05) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>>

If I run the command ../python -m test.regrtest -w -v from the Lib directory, I get the below output:

root@host:Lib# ../python -m test.regrtest -w -v
'import site' failed; use -v for traceback
Traceback (most recent call last):
   File "runpy.py", line 122, in _run_module_as_main
     "__main__", fname, loader, pkg_name)
   File "runpy.py", line 34, in _run_code
     exec code in run_globals
   File "/sw_install/python-2.6.5/Lib/test/regrtest.py", line 124, in 
<module>
     import cStringIO
ImportError: No module named cStringIO

Thanks

Orlando

amauryfa commented 14 years ago

no, the input is not the same, there is "ImportError: No module named site". I have tree more questions:

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago

I answer your questions

thanks

/sw_install/python-2.6.5/Lib/site.py

El 20/05/2010 18:42, Amaury Forgeot d'Arc escribió:

Amaury Forgeot d'Arc\amauryfa@gmail.com\ added the comment:

no, the input is not the same, there is "ImportError: No module named site". I have tree more questions:

  • Do you have a file named: /sw_install/python-2.6.5/Lib/site.py
  • what it the output when you type "import sys; print sys.path"
  • is there a file named "cStringIO.so" somewhere in the build tree?

----------


Python tracker\report@bugs.python.org\ \http://bugs.python.org/issue8760\


amauryfa commented 14 years ago

Do you have set the PYTHONHOME environment variable? this does not work from a build directory.

c75ccee3-2b93-4940-a492-f0f357936026 commented 14 years ago

Amoury, you are right, when i unset the PYTHONHOME environment variable the program run. The output was:

root@host:python-2.6.5# ./python -m test.regrtest -w
test_grammar
test_opcodes
test_dict
test_builtin
test_exceptions
test_types
test_unittest
test_doctest
test_doctest skipped -- No module named thread
test_doctest2
test_MimeWriter
test_SimpleHTTPServer
test_StringIO
test___all__
test___future__
test__locale
test_abc
test_abstract_numbers
test_aepack
test_aepack skipped -- No module named aepack
test_aifc
test_al
test_al skipped -- No module named al
test_anydbm
test_applesingle
test_applesingle skipped -- No module named macostools
test_array
test_ast
test_asynchat
test_asynchat skipped -- No module named thread
test_asyncore
test_asyncore skipped -- No module named thread
test_atexit
test_audioop
test_augassign
test_base64
test_bastion
test_bigaddrspace
test_bigmem
test_binascii
test_binhex
test_binop
test_bisect
test_bool
test_bsddb
test_bsddb skipped -- No module named _bsddb
test_bsddb185
test_bsddb185 skipped -- No module named bsddb185
test_bsddb3
test_bsddb3 skipped -- Use of the `bsddb' resource not enabled
test_buffer
test_bufio
test_bytes
test_bz2
test_bz2 skipped -- No module named thread
test_calendar
test_call
test_capi
test_capi skipped -- No module named thread
test_cd
test_cd skipped -- No module named cd
test_cfgparser
test_cgi
test_charmapcodec
test_cl
test_cl skipped -- No module named cl
test_class
test_cmath
test test_cmath failed -- Traceback (most recent call last):
   File "/sw_install/python-2.6.5/Lib/test/test_cmath.py", line 366, in 
test_specific_values
     self.fail(error_message)
AssertionError: atan0000: atan(complex(0.0, 0.0))
Expected: complex(0.0, 0.0)
Received: complex(0.0, -0.0)
Received value insufficiently close to expected value.

test_cmd
test_cmd skipped -- No module named thread
test_cmd_line
test_cmd_line_script
test_code
test_codeccallbacks
test_codecencodings_cn
test_codecencodings_hk
test_codecencodings_jp
test_codecencodings_kr
test_codecencodings_tw
test_codecmaps_cn
test_codecmaps_cn skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_hk
test_codecmaps_hk skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_jp
test_codecmaps_jp skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_kr
test_codecmaps_kr skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_tw
test_codecmaps_tw skipped -- Use of the `urlfetch' resource not enabled
test_codecs
test_codeop
test_coding
test_coercion
test_collections
test_colorsys
test_commands
test_compare
test_compile
test_compiler
test_complex
test_complex_args
test_contains
test_contextlib
test_contextlib skipped -- No module named thread
test_cookie
test_cookielib
test_copy
test_copy_reg
test_cpickle
Exception RuntimeError: 'maximum recursion depth exceeded in 
__subclasscheck__' in <type 'exceptions.RuntimeError'> ignored
test test_cpickle failed -- multiple errors occurred; run in verbose 
mode for details
test_cprofile
test_crypt
test_csv
test_ctypes
test_ctypes skipped -- No module named _ctypes
test_curses
test_curses skipped -- No module named _curses_panel
test_datetime
test_dbm
test_decimal
test_decorators
test_defaultdict
test_deque
test_descr
test_descrtut
test_difflib
test_dircache
test_dis
test_distutils
unable to execute ./Modules/ld_so_aix: No such file or directory
test test_distutils failed -- Traceback (most recent call last):
   File 
"/sw_install/python-2.6.5/Lib/distutils/tests/test_build_ext.py", line 
261, in test_get_outputs
     cmd.run()
   File "/sw_install/python-2.6.5/Lib/distutils/command/build_ext.py", 
line 340, in run
     self.build_extensions()
   File "/sw_install/python-2.6.5/Lib/distutils/command/build_ext.py", 
line 449, in build_extensions
     self.build_extension(ext)
   File "/sw_install/python-2.6.5/Lib/distutils/command/build_ext.py", 
line 531, in build_extension
     target_lang=language)
   File "/sw_install/python-2.6.5/Lib/distutils/ccompiler.py", line 769, 
in link_shared_object
     extra_preargs, extra_postargs, build_temp, target_lang)
   File "/sw_install/python-2.6.5/Lib/distutils/unixccompiler.py", line 
258, in link
     raise LinkError, msg
LinkError: command './Modules/ld_so_aix' failed with exit status 1

test_dl
test_dl skipped -- Could not open any shared libraries
test_docxmlrpc
test_docxmlrpc skipped -- No module named thread
test_dumbdbm
test_dummy_thread
test_dummy_threading
test_email
test_email_codecs
test_email_renamed
test_enumerate
test_eof
test_epoll
test_epoll skipped -- test works only on Linux 2.6
test_errno
test_exception_variations
test_extcall
test_fcntl
test_file
test_file skipped -- No module named thread
test_filecmp
test_fileinput
test_fileio
test test_fileio failed -- Traceback (most recent call last):
   File "/sw_install/python-2.6.5/Lib/test/test_fileio.py", line 157, in 
testAbles
     self.assertEquals(f.seekable(), False)
AssertionError: True != False

test_float test_fnmatch test_fork1 test_fork1 skipped -- No module named thread test_format test_fpformat test_fractions test_frozen test_ftplib test_ftplib skipped -- No module named thread test_funcattrs test_functools test_future test_future3 test_future4 test_future5 test_future_builtins test_gc test_gdbm test_gdbm skipped -- No module named gdbm test_generators test_genericpath test_genexps test_getargs test_getargs2 test_getopt test_gettext test_gl test_gl skipped -- No module named gl test_glob test_global test_grp test_gzip test_hash test_hashlib test_heapq test_hmac test_hotshot Segmentation fault (core dumped)

Thanks

amauryfa commented 14 years ago

Closing as Invalid. PYTHONHOME should not be set when building Python.