Including GDC in nixpkgs
Johannes Pfau
nospam at example.com
Fri Sep 20 17:18:20 UTC 2019
Hi Stefan,
Am Fri, 20 Sep 2019 10:29:10 +0000 schrieb Stefan Frijters:
> As a fan of both D and the nixpkgs package manager I wanted to try and
> help include GDC in nixpkgs, but I have been running into some problems.
>
Thank you a lot for looking at this and helping the D ecosystem!
> If anyone could help by taking a look at my pull request at
> https://github.com/NixOS/nixpkgs/pull/69144 that would be greatly
> appreciated.
>
> Current issues include:
>
> * When compiling without forcing --disable-shared, there are linker
> errors about needing to compile with -fPIC. It seems that some files are
> built using that flag, but not all, and I'm not sure how to go about
> forcing it for the rest.
This should not happen, -fPIC should be added automatically where
required. Maybe it's caused by --enable-default-pie or any of the other
flags which are not really needed?
> * When invoking nix-build without specifying --cores 1 there are
> problems when building libphobos; it looks like object files are moved
> before they are generated. This problem goes away when I build on a
> single core, but of course everything takes a very long time to try out.
Is this a problem during the make step or during make install? I don't
think make install is multi-thread safe, but make should actually be fine.
> * I have disabled bootstrapping for now to speed up the debugging
> process, hopefully it can be enabled again later on.
>
> I have taken the compiler flags to be used from
> https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gdc-git, which
> was linked in another thread on this forum, but maybe this is too
> specific for Arch?
Yes, these are actually arch and not gdc specific. You do not need any
special flags for gdc, just add d to --enable-languages= and you should
be fine. --with-target-system-zlib=yes is the only D specific flag in
your github pull request, and it forces libphobos to link against the
system zlib instead of including a copy. You'll have to decide whether
this is the behavior you want.
--
Johannes
More information about the D.gnu
mailing list