Bug 242305 - Compile libantlr with -fPIC
Compile libantlr with -fPIC
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: antlr (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Deepak Bhole
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-03 03:09 EDT by Braden McDaniel
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 2.7.7-1jpp.3.fc7.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-11 18:53:26 EDT
Type: ---
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 Braden McDaniel 2007-06-03 03:09:20 EDT
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 16:39:37 EDT
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 16:55:12 EDT
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 17:02:23 EDT
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 17:20:48 EDT
Reopening. The idea is that using -lantlr when linking a shared library ought to work.
Comment 5 Deepak Bhole 2007-07-05 21:45:45 EDT
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-05 22:17:52 EDT
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 17:43:13 EDT
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 04:27:09 EDT
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 18:53:25 EDT
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.