Bug 242305 - Compile libantlr with -fPIC
Summary: Compile libantlr with -fPIC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: antlr
Version: 7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Deepak Bhole
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-03 07:09 UTC by Braden McDaniel
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 2.7.7-1jpp.3.fc7.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-11 22:53:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Braden McDaniel 2007-06-03 07:09:20 UTC
libantlr.a, as it is now, cannot be linked into a shared object (on x86_64, at
least). Can it be compiled with -fPIC?

Comment 1 Deepak Bhole 2007-06-12 20:39:37 UTC
PIC has an additional overhead that may not be desirable for others. I have
therefore added an extra libantlr-pic.a archive.

The fix is in antlr-2.7.7-1jpp.3.fc7.1 which has been pushed to updates-testing.
If you use rawhide, the fix is in antlr-2.7.7-1jpp.4.fc8. Please verify and let
me know if there are any problems.

Comment 2 Braden McDaniel 2007-06-12 20:55:12 UTC
Unfortunately that's enough configuration overhead to make it not worth using to me. I am willing to 
perform a general test to see if libantlr exists on the system (and use it if it's available). I'm not going to 
go down the path of checking for distribution-specific library names.

If Fedora doesn't want libantlr.a compiled with PIC, I submit that the Right Thing is to provide libantlr.so 
as well.

Comment 3 Fedora Update System 2007-06-13 21:02:23 UTC
antlr-2.7.7-1jpp.3.fc7.1 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Braden McDaniel 2007-06-13 21:20:48 UTC
Reopening. The idea is that using -lantlr when linking a shared library ought to work.


Comment 5 Deepak Bhole 2007-07-06 01:45:45 UTC
Sorry for the delayed response, and thanks for re-opening. I have un-pushed the
package until this gets resolved.

Regarding why I did not use PIC in libantlr, I am following the Debian way, and
for the exact same reasons they have, as stated in the last comment here:
http://bugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=351618

It didn't seem right to introduce performance penalties for existing users who
do not need PIC (judging from the fact that this is the first bug asking for it
AFAIK).

Comment 6 Braden McDaniel 2007-07-06 02:17:52 UTC
As far as the perception of low demand is concerned, I suspect most folks who
use libantlr have been doing the same thing I've been doing for years: including
it with their packages. And as it happens, I'm in the process of replacing antlr
in my project. So, don't fix this on my account.

That said, I do think it's important that "-lantlr" work when creating a shared
library. While one way to do that would be to compile libantlr.a with -fPIC,
another way would be simply to provide libantlr.so (which would necessarily be
compiled with -fPIC).

Though, once libantlr.so is available, I think the necessity of libantlr.a's
continued existence may be questionable (with respect to Fedora's policies
regarding static libraries).


Comment 7 Deepak Bhole 2007-09-24 21:43:13 UTC
I see your point about -lantlr working.

I toyed with the idea of providing a .so, but have decided against it for the
time being, as v2 doesn't seem like it is being actively worked on. A .so would
be better provided in the v3 rpm when it is available. 

In the mean time, I've removed the libantlr-pic.a (the update was never pushed
publically, so there is no compatibility issue). libantlr.a is now compiled with
-fPIC. The package should appear in updates-testing and rawhide soon; please
give it a try and let me know if there are any problems.

Comment 8 Fedora Update System 2007-09-25 08:27:09 UTC
antlr-2.7.7-1jpp.3.fc7.2 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2007-10-11 22:53:25 UTC
antlr-2.7.7-1jpp.3.fc7.2 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


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