Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure uses GNU ld flags with non-GNU compilers/linkers #40953

Closed
dschatt mannequin opened this issue Sep 25, 2004 · 3 comments
Closed

Configure uses GNU ld flags with non-GNU compilers/linkers #40953

dschatt mannequin opened this issue Sep 25, 2004 · 3 comments
Labels
build The build process and cross-build

Comments

@dschatt
Copy link
Mannequin

dschatt mannequin commented Sep 25, 2004

BPO 1034496
Nosy @loewis

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:

assignee = None
closed_at = <Date 2004-11-05.19:15:54.000>
created_at = <Date 2004-09-25.08:52:21.000>
labels = ['build']
title = 'Configure uses GNU ld flags with non-GNU compilers/linkers'
updated_at = <Date 2004-11-05.19:15:54.000>
user = 'https://bugs.python.org/dschatt'

bugs.python.org fields:

activity = <Date 2004-11-05.19:15:54.000>
actor = 'tmick'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Build']
creation = <Date 2004-09-25.08:52:21.000>
creator = 'dschatt'
dependencies = []
files = []
hgrepos = []
issue_num = 1034496
keywords = []
message_count = 3.0
messages = ['22551', '22552', '22553']
nosy_count = 3.0
nosy_names = ['loewis', 'tmick', 'dschatt']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1034496'
versions = ['Python 2.3']

@dschatt
Copy link
Mannequin Author

dschatt mannequin commented Sep 25, 2004

I was just attempting to build Python 2.3.4 on Solaris 9, using
Sun's Compilers and linkers (/opt/SUNWspro/bin/cc and /usr/ccs/
bin/ld).
The configure script correctly determined that I was not using
either GNU gcc or GNU ld. However, it continued to put GNU
specific variables into the Makefile (specifically, -Wl,<stuff>). This
broke several things, until I manually removed them. The first
place it broke was when it created the shared library, which,
because of the different ways that Sun's linker and GNU ld handle
options, ended up being named "name\=libpython2.3.so.1.0"
because Sun's compiler detected two -o flags (the first being in the
-Wl,-soname=libpython2.3.so.1.0 -o libpython2.3.so.1.0) - and
Sun's linker takes the first -o flag it sees (it helpfully tells you that,
though).
So... the GNU specific flags need to ONLY be used if the GNU ld/
gcc are being used.

@dschatt dschatt mannequin closed this as completed Sep 25, 2004
@dschatt dschatt mannequin added the build The build process and cross-build label Sep 25, 2004
@dschatt dschatt mannequin closed this as completed Sep 25, 2004
@dschatt dschatt mannequin added the build The build process and cross-build label Sep 25, 2004
@loewis
Copy link
Mannequin

loewis mannequin commented Sep 26, 2004

Logged In: YES
user_id=21627

I'm a bit surprised that you are saying that the C compiler
has problems with -Wl, options. Atleast in "Sun WorkShop 6
update 1 C 5.2 2000/09/11", the -Wl option is documented for
cc, and works fine.

Instead, it appears that the system linker does not support
the -soname option.

However, this option is only used if you build with
--enable-shared, which apparently is supported only for GCC
on Solaris. So as a work-around, don't use that option.

I have now replace -shared with -h in Makefile.pre.in
1.136.6.5 and 1.148, which should fix this bug. Since I
don't have SunPRO, I cannot test that scenario.

@tmick
Copy link
Mannequin

tmick mannequin commented Nov 5, 2004

Logged In: YES
user_id=34892

I have now replace -shared with -h in Makefile.pre.in
1.136.6.5 and 1.148, which should fix this bug. Since I
don't have SunPRO, I cannot test that scenario.

Verified that this works with the Sun PRO C compiler on
Solaris 2.6 and Solaris 8.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

0 participants