-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdc: init at 9.3.0 #69144
gdc: init at 9.3.0 #69144
Conversation
Well, I've made some progress:
With these changes I can now build gdc + libraries and I've successfully built the example on the dlang.org front page from a nix shell. Does anyone know of a nicer way to get rid of the Maybe @ThomasMader has some pointers? |
Rebased, seems to work, but it's still a bit ugly and I don't know how to prevent all -idirafter flags, or why libphobos doesn't want to be built in parallel. |
e161628
to
933f76b
Compare
I would like to see that merged into master. Can the eval errors be fixed? Thanks a lot for your work @SFrijters. |
I see there's merge conflicts again because this PR keeps lingering; I can probably look into it and rebase it again some time this weekend, but I would need some assistance to solve the failed evals (I think they were on platforms that are not available to me) and to get rid of the ugliness. I'm pretty much at the limit of my nix skills with this. Edit: The failing checks I see now are different from the ones I remember. In this case I also have no idea what they mean, sad to say. Locally getting into a nix-shell works and I can still compile some randomly chosen example snippets from the D homepage. |
I think I understand the previously failing checks now and I have rebased and fix them (I hope). |
You are one commit behind. (8e79583#diff-a9fd46395fe31eaae37b3d89298f00cb) Have you really rebased onto master? |
I have, but I was unlucky and Ada has been added to gcc now too, so that was causing new merge conflicts. I think that was merged from staging to master since yesterday. |
@worldofpeace This is also related to dlang. Can you also merge this one or is this special because it's gcc? |
Yeah, this is special since it's a variant and we're touching cc-wrapper, which we should be careful with that. I'll see if @matthewbauer could maybe overlook it. |
Rebased again, and built it using NixOS this time. I found I had to make another addition to the wrapper to make sure zlib is available when the compiler is invoked. |
@worldofpeace The approvement by @matthewbauer was given now. |
Rebased on master again to try and avoid merge conflicts later. |
@Ericson2314 is there a way you could move this forward now that matthewbauer has approved this? |
@matthewbauer Thanks! |
Motivation for this change
As of version 9, GCC has a front-end for the D language, but the option to do so has not yet been included in nixpkgs. Packaging has been requested before and this is an attempt to move forward #68419 .
However, in the current state it doesn't work quite yet, so I would appreciate any help (I will also ask for help on the Dlang GDC forum).
Inspiration for the flags that are set has been found in https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gdc-git .
Issues I ran into when building with
nix-build -p gdc -K --cores 1
:--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.nix-build
without specifying--cores 1
there are problems when buildinglibphobos
; 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.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @Synthetica