Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. 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#34983 - [libphobos] Enable PIC

Attached to Project: Community Packages
Opened by Eugene Diachkin (Ineu) - Saturday, 27 April 2013, 08:40 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 04 June 2013, 04:17 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I was trying to build shared version of gtkd-2 and had an error:

$ make shared
...
dmd -shared -oflibgtkd-2.so -L-soname=libgtkd-2.so.0 libgtkd-2.so.o
/usr/bin/ld: /usr/lib/libphobos2.a(object_.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libphobos2.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
--- errorlevel 1
make: *** [libgtkd-2.so] Error 1

I then rebuilt dmd and libphobos with -fPIC enabled using ABS, it fixed this problem. Is is possible to compile dmd/phobos with this option by default?
Diff of PKGBUILD attached.


Additional info:
* package version(s)
dmd/libphobos 2.062-1

Tested on x64 only
   pkg.diff (0.7 KiB)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 04 June 2013, 04:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed in 2.063.1
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 27 April 2013, 13:31 GMT
I could fix this for now but I think this is definitely an upstream error. They can already figure out the arch! Why wouldn't they set the correct flags? Please report this upstream and link the report.

Loading...