Skip to content
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

building on debian problems #307

Closed
alexmyczko opened this issue Feb 23, 2018 · 6 comments
Closed

building on debian problems #307

alexmyczko opened this issue Feb 23, 2018 · 6 comments

Comments

@alexmyczko
Copy link
Contributor

hi Simon

i'm having issues to build this on debian:

http://sid.ethz.ch/debian/lix/ check the *.build file

any hints welcome...

@SimonN
Copy link
Owner

SimonN commented Feb 23, 2018

Thanks! I've noticed:

Search for versions of enumap (1 package suppliers)
debian/rules:19: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Segmentation fault

That looks like the D build toolchain segfaulted before Lix was successfully compiled. That's strange. Expected output during compilation by dub be something like

lix <someVersion>: building configuration "application"...
Compiling Lix 0.9.11...

Idea: You can produce even better debugging output by dub --vverbose build instead of dub -v build. Maybe it'll be clearer what crashes from that output.

Idea: dub fetches bindings and puts them somewhere, maybe it segfaults during that stage already? The Arch Linux package recipe calls dub with --cache=local to force placement of fetched dependencies in a local dir, not in user's home. Maybe try that? I.e., dub --vverbose build --cache=local, or copy the entire command-line from the Arch recipe.


(By coincidence, this week, I've troubleshot the build on Ubuntu where we had linker errors. The answer on Ubuntu was to change in dub.json the required library "allegro" to "allegro-5". I'll release 0.9.12 this weekend and it'll have this change. But you don't even seem to get to linking; some tool looks like it segfaults before/during compilation.)

@SimonN
Copy link
Owner

SimonN commented Mar 8, 2018

Hi, have you looked into the build again? dub --vverbose build (where vverbose is written with a double-v) might lead to a better guess.

@SimonN
Copy link
Owner

SimonN commented Mar 23, 2018

tarzeau (alexmyczko) met me on IRC (quakenet #lix) and we conjectured that Debian packages may not access the internet during building. My advice thus was:

You can try to build Lix outside of the Debian build system once, this will populate ~/.dub/packages. Then take the D sources in there, put them where it makes the Debian build system is happy, and build by pointing dub at that directory and prohibiting internet lookup.
Then build inside the D system with dub --skip-registry=all, but you must also force dub to look at the prepared bindings (see Arch recipe for how to do that). There is dub --cache=local to "put any fetched packages in the specified location", but I don't know if dub will look into there when it doesn't fetch anything. Again, the Arch build script to make a package only from local dependencies can be helpful (even though it fetches the deps from the net): https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lix

@SimonN
Copy link
Owner

SimonN commented May 25, 2018

D builds on Debian seem problematic these months.

Thread on D forums: On Debian, DMD builds broken 32-bit Hello World
Bug report against D, Hello World segfaults [1]

GDC ships as a Debian package (unlike DMD: for DMD, you must manually add a package repository). Debian's policy demands that GDC be a dependency of any D-using Debian package. But with GDC, the Lix source doesn't compile -- I seem to rely on cutting-edge language features. [2]

Furthermore, on a virtual machine with 32-bit Debian 9.4, dub took a long time to check versions of Lix's dub dependencies -- about 30 minutes for all dependencies. Then, fetching the selected versions timed out while storing the fetched zip file. (Might be related to a slow virtual machine, accessing webpages took ~2 minutes even though downloads were faster afterwards.)

Both for DMD and for GDC, the following workaround didn't help: Fetch all dub dependencies manually, e.g., run dub on a machine where everything works and copy its dub package cache over to the Debian virtual machine. This fails for DMD because of the segfaults (like [1] above) and it fails for GDC because Lix relies on newer D than what GDC offers ([2] above).

@SimonN
Copy link
Owner

SimonN commented May 25, 2018

To work around dub's fetching problems on Debian, you can download my dub package cache directory and extract into ~./dub/. I.e., generate a tree structure with

~/.dub/packages/allegro-4.0.1_5.2.0/allegro/README.md

Furthermore, to skip dub's online checks altogether, add my dub.selections.json to your Lix directory (where Lix's README.md sits) and build with dub --skip-registry=all.

@alexmyczko
Copy link
Contributor Author

alexmyczko commented Dec 5, 2018

Thanks for all the help, meanwhile, the ITP is active again and the packaging is done:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617664
http://sid.ethz.ch/debian/lix/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants