[aur-general] Bug in perl-text-bibtext build script for x86_64 platform

Ted Pavlic ted at tedpavlic.com
Wed Feb 10 12:42:35 EST 2010

Firmicus --

> Thanks for this. I actually found a PKGBUILD for version 0.38 on my
> computer dating from last June which obviously I had forgotten to upload
> to AUR :( Although the C*FLAGS with -fPIC are set globally in there, it
> builds and works just fine on my x86_64 system. I have updated it on AUR
> yesterday. Can you test it please? If your problem persists I will try
> to follow your suggestion.

	The version on AUR seems to still be for 0.37 (and I still get the 
build error, pasted below). Did you mean to attach an updated PKGBUILD?

	Thanks --

The error (which is fixed by adding -fPIC to Makefiles in btparse):
Running Mkbootstrap for Text::BibTeX ()
chmod 644 BibTeX.bs
rm -f blib/arch/auto/Text/BibTeX/BibTeX.so
cc  -shared -march=x86-64 -mtune=generic -O2 -pipe -L/usr/local/lib 
-fstack-protector BibTeX.o btxs_support.o  -o 
blib/arch/auto/Text/BibTeX/BibTeX.so btparse/src/.libs/libbtparse.a\

/usr/bin/ld: btparse/src/.libs/libbtparse.a(input.o): relocation 
R_X86_64_32 against `.rodata.str1.8' can not be used when making a 
shared object; recompile with -fPIC
btparse/src/.libs/libbtparse.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Text/BibTeX/BibTeX.so] Error 1
==> ERROR: Build Failed.

> I am actually very interested in having this in AUR, since it is a
> dependency of Biber (http://biblatex-biber.sf.net), of which I am a
> developer. It will be officially released next week-end, but someone
> else put in in AUR already long ago
> (http://aur.archlinux.org/packages.php?ID=27998) ;)
> Best,
> F
> On 08/02/2010 20:41, Ted Pavlic wrote:
>> AUR --
>> I've sent a message to the package maintainer about this, but it has
>> been a while since there has been an update, and so I wanted to send
>> something here too for comment and archival purposes. At the moment,
>> the perl-text-bibtex package fails on x86_64 systems because it tries
>> to link libraries built without -fPIC to object files built with -fPIC.
>> On x86_64 machines, when building the perl-text-bibtex package, it is
>> necessary to add:
>> -fPIC
>> to the btparse compiler flags before running "make". That is, the
>> PKGBUILD should...
>> (1) Download Text::BibTeX from CPAN
>> (2) Run "perl Makefile.PL", which will fetch a btparse distribution
>> and untar it into a directory that it symlinks to "btparse"
>> (3) Change to "btparse" and add "-fPIC" to CFLAGS, CPPFLAGS, and
>> CXXFLAGS in the Makefile and src/Makefile files
>> (4) Change back to the Text::BibTeX root and run "make"
>> Otherwise, the linker will complain because the Perl libraries will be
>> built with -fPIC and the btparse libraries will not be... so they'll
>> be incompatible for linking.
>> (1) Download a btparse distribution and untar it into directory "A"
>> (creating "A/btparse-0.35/")
>> (2) Modify A/btparse-0.35/Makefile and A/btparse-0.35/src/Makefile as
>> described above
>> (3) Download the Text::BibTeX distribution from CPAN and also untar it
>> into directory "A" (creating A/Text-BibTeX-0.38/")
>> (4) complete the Text::BibTeX installation as usual (it will find the
>> btparse distribution that shares a parent directory with it)
>> Otherwise, perl-text-bibtex fails to build on x86_64 systems.
>> --Ted

Ted Pavlic <ted at tedpavlic.com>

   Please visit my 2009 d'Feet ALS walk page:
   My family appreciates your support in the fight to defeat ALS.

More information about the aur-general mailing list