Bug 1004507 - libgcj.a not installed with any gcc / libgcj related RPM
libgcj.a not installed with any gcc / libgcj related RPM
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
19
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-04 15:28 EDT by Joel
Modified: 2013-09-04 15:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-04 15:32:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joel 2013-09-04 15:28:39 EDT
Description of problem:
libgcj.a is needed to be able to have the gcj compiler work with the '-static-libgcj' parameter.  libgjc.a is nowhere to be found on the filesystem.

Version-Release number of selected component (if applicable):
libgcj-4.8.1-1.fc19.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1.Create a simple "hello world" type Java source file.
2.Compile with 'gcj -static-libgcj --main=HelloWorld ./HelloWorld.java -o Hello'
3.Witness the error.

Actual results:
[joel@f19 ~]$ gcj -static-libgcj ./HelloWorld.java -o Hello
/usr/bin/ld: cannot find -lgcj
collect2: error: ld returned 1 exit status

Expected results:
A binary that has statically linked with the libgcj libraries.

Additional info:
Building without the '-static-libgcj' works fine, but of course it now dynamically links to /lib64/libgcj.so.14 which is what we're trying to avoid.
Comment 1 Jakub Jelinek 2013-09-04 15:32:14 EDT
Statically linking gcj doesn't really work, which is why we are intentionally not shipping libgcj.a.
If you want to compile/link programs that don't depend on particular libgcj.so version, use -findirect-dispatch (both for compilation and linking).

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