Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#61891 - [antlr2] please consider compile with "-fPIC" for libantlr2.a

Attached to Project: Arch Linux
Opened by Jiachen Yang (farseerfc) - Friday, 01 March 2019, 14:46 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 April 2021, 22:07 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No



When trying to build shared library that link against libantlr2.a, there will be an error saying things like:
relocation R_X86_64_PC32 against symbol `_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC

Recompile libantlr2.a with the following seems to fix the problem:

Here is a fixed PKGBUILD for antlr2:
The make command is taken from Fedora:

Should we consider compile the library with "-fPIC" ?

Additional info:
* package version(s)

antlr2 2.7.7-9
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 29 April 2021, 22:07 GMT
Reason for closing:  Fixed
Comment by Edward (mrEDitor) - Thursday, 30 January 2020, 19:59 GMT
Upvoting and bumping; just now built antlr2 with fpic for linking srcml against it.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 09 February 2021, 15:05 GMT
@farseerfc wanna have the package?