[issue9181] Solaris extension building does not work with 64 bit python

Charles Solar report at bugs.python.org
Tue Jul 6 17:17:13 CEST 2010


New submission from Charles Solar <charlessolar at gmail.com>:

On solaris, if you build a 64 bit python and use it to build an extension, it will not properly link the module.

Apparently solaris requires the -m64 flag in the linker as well as the compile steps.  Python distutils successfully compiles all the object files using -m64, but it fails to link with -m64 causing the entire build to fail if the extension needs a 64 bit library dependency ( will get 'incompatible library' errors from the linker ).

To reproduce:
build python with CFLAGS="-m64 -O3" LDFLAGS="-m64"
build a C extension that depends on a 64 bit library (python setup.py install)

I assume that it would work if the C extension does not need a specific 64 bit library as the linker will not go and look for the wrong version of file.  So its a very uncommon but annoying bug.

> ld --version
GNU ld (GNU Binutils) 2.20.1.20100303
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

----------
assignee: tarek
components: Distutils, Distutils2, Extension Modules
messages: 109396
nosy: redcomet, tarek
priority: normal
severity: normal
status: open
title: Solaris extension building does not work with 64 bit python
type: compile error
versions: Python 2.7

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


More information about the Python-bugs-list mailing list