Bug 1004507 - libgcj.a not installed with any gcc / libgcj related RPM
Summary: libgcj.a not installed with any gcc / libgcj related RPM
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 19
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 19:28 UTC by Joel
Modified: 2013-09-04 19:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-04 19:32:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joel 2013-09-04 19:28:39 UTC
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 19:32:14 UTC
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.