FS#10892 - cdparanoia from ABS fails to build on x86_64

Attached to Project: Arch Linux
Opened by Lee Jackson (ProfessorTomoe) - Saturday, 12 July 2008, 10:25 GMT
Last edited by Jan de Groot (JGC) - Sunday, 20 July 2008, 22:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Alexander Fehr (pizzapunk)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Building cdparanoia from the extra repository of ABS on x86_64 fails with the following:

gcc -fpic -shared -o libcdda_interface.so.0.10.0 -Wl,-soname -Wl,libcdda_interface.so.0 scan_devices.o common_interface.o cooked_interface.o interface.o scsi_interface.o smallft.o toc.o test_interface.o -lm

/usr/bin/ld: cooked_interface.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

cooked_interface.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libcdda_interface.so] Error 1

This task depends upon

Closed by  Jan de Groot (JGC)
Sunday, 20 July 2008, 22:14 GMT
Reason for closing:  Fixed
Comment by Greg (dolby) - Saturday, 12 July 2008, 10:31 GMT
I can confirm the above too.
Comment by Alexander Fehr (pizzapunk) - Saturday, 12 July 2008, 11:13 GMT
Does it build if you add options=('!makeflags') to the PKGBUILD?
Comment by Jan de Groot (JGC) - Saturday, 12 July 2008, 11:45 GMT
No, the package should add -fPIC to CFLAGS for x86_64 architecure. cdparanoia is trying to compile a library with -fpic that contains objects that weren't compiled with -fPIC, this gives errors on x86_64.
Comment by Val L. (onestep_ua) - Sunday, 13 July 2008, 10:20 GMT
I can also confirm this. And this is related only to MAKEFLAGS. It compiles just fine even without -fPIC.
Comment by Alexander Fehr (pizzapunk) - Monday, 14 July 2008, 14:08 GMT
@Val L.
Does that mean that adding options=('!makeflags') to the PKGBUILD helps?

I have looked at the Makefile and it seems that the objects are compiled without -fpic for the static library and then again with -fpic for the shared library. My assumption is that if you have set the MAKEFLAG -j2 the correct compile order isn't preserved.
Comment by Val L. (onestep_ua) - Tuesday, 15 July 2008, 10:02 GMT
Alexander Fehr:

I think so. I've just commented MAKEFLAGS option in makepkg.conf, and it worked.
Comment by Greg (dolby) - Tuesday, 15 July 2008, 11:43 GMT
Does Jan's way work too? I think it would be better if it does
Comment by Jan de Groot (JGC) - Tuesday, 15 July 2008, 12:58 GMT
My way doesn't work because the Makefiles already do what I told in my comment. The Makefile isn't MAKEFLAGS-safe, which means a mixup of object files between the shared and static builds when compiling with MAKEFLAGS enabled.

Loading...