[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It turns out, quite expectedly, that distutils doesn't reuse the various 
LDFLAGS recorded by sysconfig (why are there three of them?), but instead only 
uses LDSHARED:

 sysconfig.get_config_var('LDSHARED')
'gcc -pthread -shared'
 sysconfig.get_config_var('LDFLAGS')
'-m32 '
 sysconfig.get_config_var('PY_LDFLAGS')
'-m32'
 sysconfig.get_config_var('CONFIGURE_LDFLAGS')
'-m32'

I would suggest bumping this to critical or even release blocker, since 
building of extensions is broken when using non-default linker flags.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9437
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Following patch works here. I've added XXX tags in strange places.

--
keywords: +patch
Added file: http://bugs.python.org/file18598/m32.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9437
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Ok, there is also a failure in test_sysconfig (the patch makes no difference):

==
FAIL: test_ldshared_value (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File /home/antoine/py3k/m32/Lib/test/test_sysconfig.py, line 285, in 
test_ldshared_value
self.assertIn(ldflags, ldshared)
AssertionError: '-m32 ' not found in 'gcc -pthread -shared'

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9437
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9437] test_distutils failure with -m32

2010-08-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It appears that 2.7 has the same issue, although fewer tests fail (apparently 
not all 3.2 tests have been backported).

--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9437
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9437] test_distutils failure with -m32

2010-07-31 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

When I use the following configuration (in order to build a 32-bit Python a 
64-bit OS):
  ./configure --with-computed-gotos CFLAGS=-m32 LDFLAGS=-m32

I then get two failures in test_distutils:

test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... 
/tmp/tmpssz80G/tmp/tmpssz80G/xxmodule.o: could not read symbols: File in wrong 
format
collect2: ld a retourné 1 code d'état d'exécution
ERROR
[...]
test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... 
/tmp/tmphxwa1S/tempt/tmp/tmpuD17us/foo.o: could not read symbols: File in wrong 
format
collect2: ld a retourné 1 code d'état d'exécution
ERROR
[...]

==
ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase)
--
Traceback (most recent call last):
  File /home/antoine/py3k/m32/Lib/distutils/unixccompiler.py, line 254, in 
link
self.spawn(linker + ld_args)
  File /home/antoine/py3k/m32/Lib/distutils/ccompiler.py, line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
  File /home/antoine/py3k/m32/Lib/distutils/spawn.py, line 34, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
  File /home/antoine/py3k/m32/Lib/distutils/spawn.py, line 138, in 
_spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File /home/antoine/py3k/m32/Lib/distutils/tests/test_build_ext.py, line 65, 
in test_build_ext
cmd.run()
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 347, 
in run
self.build_extensions()
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 456, 
in build_extensions
self.build_extension(ext)
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 543, 
in build_extension
target_lang=language)
  File /home/antoine/py3k/m32/Lib/distutils/ccompiler.py, line 719, in 
link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
  File /home/antoine/py3k/m32/Lib/distutils/unixccompiler.py, line 256, in 
link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

==
ERROR: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase)
--
Traceback (most recent call last):
  File /home/antoine/py3k/m32/Lib/distutils/unixccompiler.py, line 254, in 
link
self.spawn(linker + ld_args)
  File /home/antoine/py3k/m32/Lib/distutils/ccompiler.py, line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
  File /home/antoine/py3k/m32/Lib/distutils/spawn.py, line 34, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
  File /home/antoine/py3k/m32/Lib/distutils/spawn.py, line 138, in 
_spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File /home/antoine/py3k/m32/Lib/distutils/tests/test_build_ext.py, line 
321, in test_get_outputs
cmd.run()
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 347, 
in run
self.build_extensions()
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 456, 
in build_extensions
self.build_extension(ext)
  File /home/antoine/py3k/m32/Lib/distutils/command/build_ext.py, line 543, 
in build_extension
target_lang=language)
  File /home/antoine/py3k/m32/Lib/distutils/ccompiler.py, line 719, in 
link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
  File /home/antoine/py3k/m32/Lib/distutils/unixccompiler.py, line 256, in 
link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

--
assignee: tarek
components: Distutils, Tests
messages: 112163
nosy: jyasskin, pitrou, tarek
priority: high
severity: normal
stage: needs patch
status: open
title: test_distutils failure with -m32
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9437
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com