FS#54749 - dlang packages should be rebuilt with PIC=1

Attached to Project: Community Packages
Opened by Marcy Latham (sexyshortages) - Sunday, 09 July 2017, 20:15 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 11 July 2017, 12:01 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

I think currently the -fPIC changes have been propagated to testing. This breaks the dlang packages as they haven't been rebuilt, e.g.

fsmfzweyguhqvsqudbqg@forum.dlang.org"> http://forum.dlang.org/post/fsmfzweyguhqvsqudbqg@forum.dlang.org
gpbyhmdsudlmapsvvqmq@forum.dlang.org"> http://forum.dlang.org/post/gpbyhmdsudlmapsvvqmq@forum.dlang.org

It would be very nice if the packages could be rebuilt with fPIC enabled.
Currently this can be done by passing PIC=1 to make.
However, it could be become the default in the future (it already is in the default flags file of dmd):

https://github.com/dlang/dmd/blob/master/ini/linux/bin64/dmd.conf
https://git.archlinux.org/svntogit/community.git/tree/trunk/dmd.conf?h=packages/dmd

https://github.com/dlang/druntime/pull/1721
https://github.com/dlang/phobos/pull/5586

Additional info:
* dmd 2.074.0
This task depends upon

Closed by  Antonio Rojas (arojas)
Tuesday, 11 July 2017, 12:01 GMT
Reason for closing:  None
Comment by Antonio Rojas (arojas) - Monday, 10 July 2017, 16:23 GMT Comment by Marcy Latham (sexyshortages) - Tuesday, 11 July 2017, 00:50 GMT
Thanks a lot for the fast reply and considering this in your recompile list. Could you please add ldc [1] to the recompile tasklist as well? Thanks!

[1] https://www.archlinux.org/packages/community/x86_64/ldc/
Comment by Antonio Rojas (arojas) - Tuesday, 11 July 2017, 07:21 GMT
ldc is already built with PIC, what is the issue with it?
Comment by Marcy Latham (sexyshortages) - Tuesday, 11 July 2017, 11:54 GMT
AFAICT you simply don't ship a static library with the ldc meta package (-> liblphobos), in other words this currently fails:

> echo 'void main(string[] args) { import std.stdio; writeln("Hello D");}' > hello.d
> ldc -static hello.d


The release binaries of ldc [2] ship with a static library.


[1] https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ldc
[2] https://github.com/ldc-developers/ldc/releases
Comment by Antonio Rojas (arojas) - Tuesday, 11 July 2017, 12:01 GMT
Right, Arch doesn't provide static libs if there is a shared version. In any case - this is unrelated to the original report.

Loading...