Bug 51883 - static linking of C/C++ & glibc fails with looping error message
Summary: static linking of C/C++ & glibc fails with looping error message
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-16 14:43 UTC by greg hosler
Modified: 2016-11-24 15:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-08-17 16:56:24 UTC
Embargoed:


Attachments (Terms of Use)
output of make (12.78 KB, text/plain)
2001-08-16 23:24 UTC, greg hosler
no flags Details

Description greg hosler 2001-08-16 14:43:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.6-3.1smp i686; Nav)

Description of problem:
I have a relatively large C/C++/X/Motif application. linking it
dynamically works fine. linking it statically yields the following
ld failure message:

/usr/bin/ld: /lib/ld-linux.so.2: indirect symbol `__libc_internal_tsd_set'
to `__libc_internal_tsd_set@@GLIBC_2.0' is a loop
/lib/ld-linux.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. have not tried w/ smaller test cases. If necessary I will try
to generate one.
2.
3.
	

Actual Results:  failed link

Expected Results:  successful link (or at least a list of missing symbols,
a common situation with static links)

Additional info:

Comment 1 Glen Foster 2001-08-16 18:59:26 UTC
This defect is considered SHOULD-FIX for Fairfax.

Comment 2 Jakub Jelinek 2001-08-16 19:57:37 UTC
This probably means you're passing explicit shared library filename
in the link command.
Can you please check if that's true?
By explicit shared library filename I mean something like
/usr/lib/libfoo.so, ie. not -lfoo (the latter would just moan
that it could not find the library if only .so existed and not .a).

Comment 3 greg hosler 2001-08-16 23:24:04 UTC
no explicit libraries referenced. The attached file has the link line, and the
output error message.

Comment 4 greg hosler 2001-08-16 23:24:51 UTC
Created attachment 28215 [details]
output of make

Comment 5 Jakub Jelinek 2001-08-17 16:56:19 UTC
Yeah, but you have -lComboBox -lXmt before -Wl,-Bstatic, which means
that those libs (if they are shared) will be linked in shared, while the rest
will be linked in statically.
I don't know what all you'd like to link in statically, if all X libs too or not,
in any case it would be good to add -Wl,-Bdynamic at the end of the command line.

Comment 6 greg hosler 2001-08-18 11:24:16 UTC
adding -Wl,-Bdynamic at the end of the command line resolves the static link



Note You need to log in before you can comment on or make changes to this bug.