-
Notifications
You must be signed in to change notification settings - Fork 293
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
Provide way to compile with LDC and without dub #387
Comments
I'm not sure what the issue is but I'll have a look unless @dsboger beats me to it. |
@gnunn1 We might be able to build Terminix with dub by patching the |
@ximion One thing that strikes me as interesting is that the Travis CI build which is using LDC is working fine, albeit that is with dub and not automake. I'm not familiar enough with either LDC or automake at this point to offer more detailed insight, but thought it was an interesting factoid. |
My grasp of the Terminix + LDC situation right now is the following (I'm not sure of these claims, except for the ones I've tested):
I have a couple of commits that generalize autotools to support LDC, but as latest version of LDC still does not work with dynamic linking, I'm waiting for the next version of LDC before pushing those commits. I can push them and PR if someone else wants to test. |
Hmm, can we isolate the patches in LDC that make this work properly? Then we could apply them to our packaging to make this work... |
@ximion ldc-developers/ldc#1534 points to a couple of commits that fix the issues I had. Reading that bug again, looks like there is a flag |
This is indeed true, but also applies to DMD. More precisely, whenever you actually want to build a dynamic library out of your D code, you also need to link against druntime/Phobos as shared libraries. And if this library is to be linked against/loaded from a D executable, that binary also needs to the same druntime/Phobos shared objects.
|
We will likely make LDC the default D compiler for Debian, when it works, and use a shared Phobos / DRuntime for all packages, so this issue shouldn't exist. Btw, GtkD is now available in Debian ;-) (since a few minutes). Since LDC is busted, it will take a while though for this to enter testing and Ubuntu (depending on how quickly we can resolve LDC issues). |
@klickverbot Thanks for clarifying! @ximion I just built Terminix with the instructions I gave above and it works. I'm thinking of changing |
@dsboger Which version of GCC / LLVM do you use? |
@ximion I'm using latest Arch Linux: |
I decided to try and PR the LDC support in autotools because the current settings will have problems if there is a gtkd-dmd installed. As soon as that PR is merged, if my tests pass I'll update |
@dsboger Oh wow, using the very same ldmd trick works here as well to get Terminix to compile - dub is still broken, and anything compiling with ldc directly also fails, but this works. |
@ximion The ldc issues may be related to the fact that |
@dsboger There is always a chance that some buildflags are injected into the package build process e.g. to enable hardening, which don't apply to ldmd... But I would be really surprised here if that was the case. |
terminix-git in AUR now compiles with LDC using autotools. It is working for me. I think this issue can be closed, as long as others can confirm the build process works. As a side note, is it possible and/or desirable to include building with autotools into the CI script? |
I can confirm it's working. |
Hi!
Since dub isn't really ready yet for proper Debian packaging, I am trying to use Automake instead.
When changing
dmd
inconfigure.ac
toldc2
, the build fails withFixing this somehow will be necessary to properly build Terminix.
Also, the Automake script seems to sometimes ignore a missing D compiler, which leads to strange results, including only data files being installed.
It looks like Automake attempts to compile all packages in one go, instead of compiling the sources separately and linking them together.
The text was updated successfully, but these errors were encountered: