astropy / astropy-v5.0-paper

Astropy Paper III: To be published with the next LTS release of astropy core (v5.0, Fall 2021)
9 stars 38 forks source link

doesn't build on wsl #15

Closed eteq closed 2 years ago

eteq commented 2 years ago

When trying to use the makefile on WSL2 with ubuntu, I get:

make[1]: Entering directory '/home/erik/src/astropy-v5.0-paper/showyourwork'
sysctl: cannot stat /proc/sys/machdep/cpu/brand_string: No such file or directory
Error: you need to specify the maximum number of jobs to be queued or executed at the same time with --jobs.
make[1]: *** [Makefile:22: ms.pdf] Error 1
make[1]: Leaving directory '/home/erik/src/astropy-v5.0-paper/showyourwork'
make: *** [Makefile:13: ms.pdf] Error 2

I'm guessing this is effectively either a showyourwork or snakemake issue, but either way it means I had to "manually" do the build steps of making the plots and running latex

adrn commented 2 years ago

Ack - I don't even know how to debug this! Maybe @rodluger has thoughts but I'm not sure how to proceed @eteq 🤷

pllim commented 2 years ago

Build it natively on Windows? 😸

rodluger commented 2 years ago

Try something like make OPTIONS="--jobs 1"?

rodluger commented 2 years ago

Also, it's possible this is an error from an earlier version of Snakemake. Can you tell me which version you have installed?

eteq commented 2 years ago

@rodluger - make OPTIONS="--jobs 1" gave me:

make[1]: Entering directory '/home/erik/src/astropy-v5.0-paper/showyourwork'
sysctl: cannot stat /proc/sys/machdep/cpu/brand_string: No such file or directory
SyntaxError in line 6 of /home/erik/src/astropy-v5.0-paper/Snakefile:
invalid syntax
make[1]: *** [Makefile:22: ms.pdf] Error 1
make[1]: Leaving directory '/home/erik/src/astropy-v5.0-paper/showyourwork'
make: *** [Makefile:13: ms.pdf] Error 2

And it looks like I'm on 5.24.1 of Snakemake - I installed it via apt install snakemake on Ubuntu 21.10. I see there's a 6.1.x so that might be it? I'll see if I can install it (although that might be a Big Job :tm: based on how many deps it pulled in when I installed the deb...)

and to @pllim's

Build it natively on Windows?

:trollface:

rodluger commented 2 years ago

Ah, showyourwork requires >= 6.7.0 (see here). The specific syntax error you're getting is that the ability to "import" other Snakemake modules (which showyourwork heavily depends on) was only introduced in version 6.0 of Snakemake. So, I don't think this error has anything to do with WSL.

eteq commented 2 years ago

aha, I installed snakemake via conda (which got to 6.13.x), and now it seems to be working.

Probably should put this somewhere in the paper README or CONTRIBUTING or something? (just because some of the other contributors might be running into this...)

rodluger commented 2 years ago

This line in the main Snakefile should have in principle given you an informative error message (that's the point of snakemake.min_version), but your version was too old to allow Snakemake to import the main Snakefile in the first place!

pllim commented 2 years ago

Has this been resolved? I vaguely remember @eteq got it to work.