julia build fails in /mnt/c location
If I do this in my home directory:
git clone https://github.com/JuliaLang/julia.git
cd julia
make
everything works.
If I try the same in a folder under /mnt/c/, the build stops with an error. The path I'm using has no spaces or special characters, so that can't be it. Probably some issue related to the different file systems used?
The use case here is of course that it would be great if I could use a Windows editor and compile in bash.
CC @tkelman.
Are you building release-0.4?
Do you have the error that compilation is failing with? Also I'm trying this locally to see what's falling and I'm getting errors about missing tools, could you share the apt packages I need to install to build the project?
cmake, gfortran, m4, and libssl-dev should get you most of the way there - ditto on "what's the error"
No, this time I'm build master. The error message at the end is
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating patchelf.spec
config.status: executing depfiles commands
/mnt/c/Users/david/source/julia/deps/srccache/patchelf-0.9/build-aux/missing: line 81: aclocal-1.15: command not found
WARNING: 'aclocal-1.15' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[2]: *** [/mnt/c/Users/david/source/julia/deps/srccache/patchelf-0.9/aclocal.m4] Error 127
make[1]: *** [build/patchelf-0.9/src/patchelf] Error 2
make: *** [julia-deps] Error 2
root@DESKTOP-VREKBJ1:/mnt/c/Users/david/source/julia#
Bump, I just tried this on 14388, and the build still doesn't work in /mnt/c/ location, whereas everything works nicely if I build in my linux home directory. This is really quite unfortunate, because with this situation we wouldn't be able to use Windows based editors and linux based build tools, which seems the whole point of this, right?
Could you help us track down why the configure script is using different settings in /mnt/c versus /home? Perhaps running it in both places and doing a diff on the outputs to see if anything of interest jumps out?
I don't have the time for that, I'm afraid. But this is easy to reproduce: just add the dependencies that @tkelman mentioned with apt, and then issue the three command lines I posted on top, once in a home directory and once in a /mnt/c/ directory.
Are there any Julia devs out there who 'd have time to give this a shot? (Doing both builds and comparing.) As @davidanthoff indicates, it sounds straightforward.
(I'm not on the WSL team so can't speak for them. But I imagine they're also really busy right now :-) )
I'm pretty much the only core Julia dev who uses windows on a day to day basis, and I'm swamped at the moment.
though it sounds like it might not be a julia issue at all, if it happens while building one of the deps - here patchelf. though you may also have trouble finding windows users among patchelf's devs :)
IMHO, I think the WSL team should figure this out. This is, after all, not open source. They hope to get license revenues from this from us, so I kind of feel that providing a reproducible bug report is really all that should be needed...
I'll be happy to try to root cause this but as @aseering mentioned we are pretty swamped currently. We definitely appreciate the bug reports.
@davidanthoff -- I totally agree with you -- if the WSL team wants license money, they've got what they need.
That said, there's no rule saying that you can't contribute more. And from a purely pragmatic standpoint, if you do, it means they can resolve the bug more quickly.
Even if you're unable (for reasons of skill or experience in an open-source project, also if the project isn't open source) to contribute to the core, if you write a really detailed bug report that gets right to the root cause, someone can usually pick it up and fix it very quickly. Otherwise it has to be queued, prioritized, etc. Not saying you have to do that; just saying that anyone who cares about this bug does have ways to help get it resolved more quickly.
you should be able to reduce this a bit and make it much faster to reproduce by running make -C deps install-patchelf VERBOSE=1. That will say exactly what it's downloading and running, which will be independent of Julia altogether.
Bump. I just tried this on the latest insider build (14946) and it still doesn't work. Here is the repo case:
- I make sure that the required build tools here are all installed. Essentially I just did a
sudo apt install Xformake,gcc,g++,gfortran,m4andcmake. - I clone the julia repo into a folder under
/mnt/c/Users/david/viagit clone https://github.com/JuliaLang/julia.git - I run
makeinside the julia repo folder. The output I get is this:
davidanthoff@DESKTOP-HLR1AT0:/mnt/c/Users/david/source/julia$ make
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 327 100 327 0 0 779 0 --:--:-- --:--:-- --:--:-- 780
100 24.3M 100 24.3M 0 0 5198k 0 0:00:04 0:00:04 --:--:-- 6325k
patching file SuiteSparse_config/SuiteSparse_config.h
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 377 100 377 0 0 448 0 --:--:-- --:--:-- --:--:-- 448
100 10.3M 100 10.3M 0 0 2668k 0 0:00:03 0:00:03 --:--:-- 3968k
rm: cannot remove ‘scratch/openblas-85636ff1a015d04d3a8f960bc644b85ee5157135/’: No such file or directory
Can't do inplace edit on scratch/openblas-85636ff1a015d04d3a8f960bc644b85ee5157135//Makefile.system: No such file or directory.
make -C scratch/openblas-85636ff1a015d04d3a8f960bc644b85ee5157135/ CC=gcc -m64 FC=gfortran -m64 RANLIB=ranlib FFLAGS= -O2 -fPIC TARGET= BINARY=64 USE_THREAD=1 GEMM_MULTITHREADING_THRESHOLD=50 NUM_THREADS=16 NO_AFFINITY=1 DYNAMIC_ARCH=1 INTERFACE64=1 SYMBOLSUFFIX=64_ LIBPREFIX=libopenblas64_ MAKE_NB_JOBS=0
Makefile:2: Makefile.system: No such file or directory
make[2]: *** No rule to make target `Makefile.system'. Stop.
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[1]: *** [scratch/openblas-85636ff1a015d04d3a8f960bc644b85ee5157135/build-compiled] Error 1
make: *** [julia-deps] Error 2
davidanthoff@DESKTOP-HLR1AT0:/mnt/c/Users/david/source/julia$
When I do the same exercise but clone the repo into a folder under ~, everything works. So that suggests that there is some problem with the file system driver that handles stuff under /mnt/c/.
patching file cmake/modules/DetermineGCCCompatible.cmake
/bin/sh: 2: export: Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/m
nt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program: bad variable na
me
/home/mikewl/STUFFS/julia/deps/llvm.mk:531: recipe for target 'scratch/llvm-3.9.1/build_Release/build-configured' failed
make[1]: *** [scratch/llvm-3.9.1/build_Release/build-configured] Error 2
Makefile:81: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2
build fails on llvm when building under ~ as well. Happening on build 15060 and has been happening for quite awhile now.
mkdir -p $(dir $@) is the line supposedly failing. This has happened through multiple reinstalls and multiple computers.
Hi @Mikewl -- out of curiosity, do you experience the same error if you try to build on a real Linux machine where (a) the current working path contains a space, or (b) $PATH contains a path with a space?
At first glance, this looks to me like some sort of quoting bug in this build script. Maybe multiple bugs -+ just looking at the offending line, it should be something like mkdir -p "$(dir "$@")"
@aseering - Agreed. Spaces in file paths are legal on Linux just not very common. I've seen many places where scripts and makefiles don't handle them correctly.
Marking as a duplicate of #966, we are looking at a fix for this issue.
@aseering Finally got around to trying at least changing the potentially offending line with no luck unfortunately. Using mkdir -p "$(dir "$@")" still gave the same error. Unfortunately I removed my Ubuntu install 2 hours before I first saw your message so I couldn't check that.
Will check again once #966 is closed. Being able to easily edit the files would make a massive difference for debugging!
@JasonLinMS Can you please leave this bug report open until we have verified that things are fixed? @Mikewl comment suggests that #966 might actually not be the root cause of this.