This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: build dumps core (binutils 2.13/solaris)
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: arkoenig, gvanrossum, loewis, nnorwitz
Priority: normal Keywords:

Created on 2002-08-17 13:44 by arkoenig, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test-dynload arkoenig, 2002-08-17 13:44 shell script to check that dynamic linking works
configure arkoenig, 2002-09-20 17:17 patch to "configure" to work around the problem
configure.in arkoenig, 2002-09-20 17:19 patch to "configure.in" to work around the problem
configure.in arkoenig, 2002-09-20 17:19 patch to "configure.in" to work around the problem
elflink.h arkoenig, 2002-11-13 15:59 Patch to binutils 2.13.1
Messages (13)
msg12026 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-08-17 13:44
Installing Python 2.2.1 on Solaris causes a core dump
during build (just after trying to load struct.so) if I
am using binutils 2.13.  This happens with either gcc
3.1.1 or gcc 3.2, on either solaris 7 or solaris 8.  I
suspect it happens on other combinations as well.

It works just fine with binutils 2.12.1, so the problem
appears to be in binutils, not Python per se.  The
attached file, contributed by Zack Weinberg
(zack@codesourcery.com), tests for the presence of the
problem; if it executes to completion, the problem
isn't there.

Perhaps it might make sense to put a similar test into
the Python installation procedure?

msg12027 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-09-20 17:17
Logged In: YES 
user_id=418174

I have learned from Nick Clifton at Red Hat that the source
of the problem is a change in the default linker options
between 2.12 and 2.13.  The specific option that causes the
trouble is -zcombreloc, which is the default in 2.13, and
which apparently produces a dll that doesn't work under
Solaris.  Don't know whether this is a Solaris bug or not,
but a workaround is clearly indicated.

Attached are patch files that can be applied to configure
and configure.in (in the Python root directory) to work
around the problem.
msg12028 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-09-20 17:19
Logged In: YES 
user_id=418174

Here's the patch to configure.in
msg12029 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-20 22:26
Logged In: YES 
user_id=6380

Looks harmless to me, but I can't test it. Only the
configure.in patch is really needed; we generate configure
using autoconf (and then check it in for the benefit of others).

Assigning to MvL.

Martin, can you test this on Solaris with the indicated GCC
release? Or should we just jump the gun???  (Hm, what about
older GCC releases -- it needs to be tested there too.)

I'd still like to understand what "combreloc" does...
msg12030 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-09-20 23:14
Logged In: YES 
user_id=21627

combreloc is not a compiler option, but a linker option. For
GNU binutils, it was first implemented in 2.12. The system
linker supports this option since Solaris 7. Older binutils
versions ignore -z options that they don't recognize, so
there is no need for a version check here.

The option arranges to combine multiple relocation sections,
sorting them by symbol so that multiple relocations for the
same symbol follow each other. The dynamic linker can cache
the most-recently looked-up symbol from relocation to
relocation, so that combreloc reduces the number of symbol
lookups.

I somehow doubt the validity of this patch, though: the
entire approach was pioneered by Sun for Solaris, so if it
causes problems with GNU binutils, it is likely a binutils bug.

Therefore, I'd postpone this patch until the issue has been
fully studied by binutils maintainers, and would advise
against using binutils 2.13 on Solaris for the moment.

msg12031 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-11-13 15:00
Logged In: YES 
user_id=418174

Binutils 2.13.1 is still not right.  I am told that 2.13.2
will be out soon and will fix the problem.
msg12032 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-13 15:40
Logged In: YES 
user_id=21627

I will wait before making changes until the entire issue is
settled (or until the 2.3 release is getting near). Thanks
for the update.
msg12033 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-11-13 15:54
Logged In: YES 
user_id=418174

At this point, I do not believe that any changes to Python
are necessary.  The main point is for people installing
Python on Solaris (and perhaps elsewhere) to realize that
they must not use binutils 2.13 or 2.13.1.  The attached
patch will make binutils 2.13.1 work.
msg12034 - (view) Author: Andrew Koenig (arkoenig) Date: 2002-11-13 15:59
Logged In: YES 
user_id=418174

Here is a patch (to binutils) that makes it possible to
build Python with binutils 2.13.1.
msg12035 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-13 17:40
Logged In: YES 
user_id=21627

I still have the plan of adding a comment to README pointing
out what binutils releases need to be avoided, but that can
be done when we know what binutils release to use.
msg12036 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-03 16:41
Logged In: YES 
user_id=33168

Andrew reported (on python-dev) the problem is fixed.
Martin, is there anything you want to do for this bug
report?  You mentioned writing something in the README.
msg12037 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-01-03 16:59
Logged In: YES 
user_id=21627

Skip just mentioned he would update the README; if that is
done, this can be closed.
msg12038 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-03 17:26
Logged In: YES 
user_id=33168

Skip checked in the change, so I'm closing.
History
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37048
2002-08-17 13:44:32arkoenigcreate