Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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!
Tasklist

FS#28119 - [racket] fPIC build needed for x86_64

Attached to Project: Arch Linux
Opened by speps (archspeps) - Thursday, 26 January 2012, 16:40 GMT
Last edited by Eric Belanger (Snowman) - Wednesday, 01 February 2012, 04:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
racket needs to be built with the -fPIC flag on x86_64 or linking against it would fail with:

/usr/bin/ld: /usr/lib/libracket3m.a(salloc.o): relocation R_X86_64_TPOFF32 against `scheme_thread_locals' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libracket3m.a: could not read symbols: Bad value

Quick fix:

# add fPIC for x86_64 (FS#XXXXX)
[ "$CARCH" = 'x86_64' ] && \
export CFLAGS="$CFLAGS -fPIC"

Additional info:
* package version(s): 5.2

Steps to reproduce:
build fluxus-git from AUR
This task depends upon

Closed by  Eric Belanger (Snowman)
Wednesday, 01 February 2012, 04:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  libracket3m is now a shared library.
Comment by einar (esjurso) - Friday, 27 January 2012, 17:26 GMT
Just because its not mandatory doesn't mean that 32bit should be treated differently in this regard.

Anyway, I have no clue about racket - is there any reason its not build shared in the first place? This should probably be fixed instead..
Comment by speps (archspeps) - Monday, 30 January 2012, 14:28 GMT
@einar -fPIC for 32bit is not necessary and may cause performance degradation [1]
Upstream recommends and forces a static build, also Debian (that commonly makes all shared) use static too (libracket3m.a) [2]
Btw, an --enable-shared is passed yet by default on configure (enables libfit.so)

The suggested workaround solves completely linkage on 64 bit systems (tested with fluxus-git).

@snowman Opinions?

[1] http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3#doc_chap7
[2] http://packages.debian.org/sid/amd64/racket/filelist
Comment by Eric Belanger (Snowman) - Monday, 30 January 2012, 17:44 GMT
I'll enable -fPIC for x86_64 only.

As for the libracket3m.a static lib, I think you can't build it shared without patching the Makefile. I'll need to check it.

Loading...