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

Fix bash on windows build and add instructions #22074

Closed
wants to merge 1 commit into from

Conversation

mikewl
Copy link
Contributor

@mikewl mikewl commented May 26, 2017

For a smooth build of Julia in bash on windows $$PATH needs to be in quotes as windows paths with spaces are in the path.
Simple instructions were also added to help users wanting to build Julia in bash on windows. Some dependencies like python 2.7 are not by default installed.

Quotes around $$PATH are necessary for bash on windows as the default path now includes windows paths which include spaces.
@@ -436,3 +436,10 @@ running the resulting installer.
inspect the list of loaded DLLs for bash, mintty, or another persistent
process used to drive the build. Essentially *any* DLL outside of the Windows
System directory is potential BLODA.

### Compiling for Bash on windows
Bash on windows is an unsupported platform. However, compilation of julia is possible and functional. The packages required differ from standard ubuntu compilation as some packages are not installed by default in the bash on windows ubuntu image.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please follow line length conventions consistent with the rest of this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

### Compiling for Bash on windows
Bash on windows is an unsupported platform. However, compilation of julia is possible and functional. The packages required differ from standard ubuntu compilation as some packages are not installed by default in the bash on windows ubuntu image.

The missing packages are `byacc texinfo python-minimal automake`. With these installed and the standard ubuntu packages dependancies and julia currently compile without issue. The line below can be copied into your terminal to install all required packages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

julia and its dependencies shouldn't need byacc, texinfo, or automake

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All those dependencies were sourced as Julia compiled.
byacc is needed for gmp, I can't remember where the other two were called but I started on a clean bash on windows install for this and those were the packages it told me mid compilation were missing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

byacc should never be needed if you build from a release tarball


### Compiling for Bash on windows
Bash on windows is an unsupported platform. However, compilation of julia is
possible and functional. The packages required differ from standard ubuntu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they shouldn't differ at all. how could we need byacc, texinfo, or automake when nothing we build needs them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a filesystem bug – these could get triggered by having incorrect file timestamps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Busy uninstalling and reinstalling. Will make again and get the logs where it errors asking for those three.

Copy link
Member

@fredrikekre fredrikekre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows should probably be upper case, as per the rest of the file.

@@ -436,3 +436,17 @@ running the resulting installer.
inspect the list of loaded DLLs for bash, mintty, or another persistent
process used to drive the build. Essentially *any* DLL outside of the Windows
System directory is potential BLODA.

### Compiling for Bash on windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indented 2 spaces too much (it becomes a subsection)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: never edit directly in github ever again

compilation as some packages are not installed by default in the bash on
windows ubuntu image.

The missing packages are `byacc texinfo python-minimal automake`. With these
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

byacc, texinfo, python-minimal and automake

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed that up as well as the other indentation issue

windows ubuntu image.

The missing packages are `byacc` `texinfo` `python-minimal` `automake`.
With these installed and the standard ubuntu packages dependancies and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dependancies" -> "dependencies"?


The missing packages are `byacc` `texinfo` `python-minimal` `automake`.
With these installed and the standard ubuntu packages dependancies and
julia currently compile without issue. The line below can be copied
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps rephrase the "With these installed" sentence? Its meaning is not clear.

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @mikewl! :) Expanding on frederikekre's comment, Julia and Ubuntu might also use capitalization.

@kshyatt kshyatt added building Build system, or building Julia or its dependencies docs This change adds or pertains to documentation system:windows Affects only Windows labels May 27, 2017
@mikewl
Copy link
Contributor Author

mikewl commented May 27, 2017

aclocal is why I added autotools and patchelf is asking for it. Should I change it to autconf instead? GMP is still asking for yacc and mpfr docs want makeinfo which is why I chose texinfo.

I will address @Sacha0's comments in the morning. Compiling without -j n takes far too long to compile all dependencies on my laptop!

@tkelman
Copy link
Contributor

tkelman commented May 27, 2017

patchelf, gmp, and mpfr should need none of those things when building anywhere else. are you using the latest test version of wsl? they may have fixed the issue already.

@mikewl
Copy link
Contributor Author

mikewl commented May 27, 2017

On the latest build in the fast ring with a clean install of wsl.

@tkelman
Copy link
Contributor

tkelman commented May 27, 2017

Then needing anything to build that isn't needed on normal Linux should be reported as a bug to WSL.

@mikewl
Copy link
Contributor Author

mikewl commented May 27, 2017

I grabbed the ubuntu docker image which is as bare as it gets. Busy compiling now just in case. Will file the bug once I have confirmed that the error is isolated to wsl.

@tkelman
Copy link
Contributor

tkelman commented May 27, 2017

as @vtjnash suggested above in a now-hidden comment,

Might be a filesystem bug – these could get triggered by having incorrect file timestamps.

can happen when autotools thinks you've changed something in a file that you haven't actually touched, and tries to regenerate things that it doesn't need to do if you're building from a release

@mikewl
Copy link
Contributor Author

mikewl commented May 27, 2017

I submitted the bug at microsoft/WSL#2162

@musm
Copy link
Contributor

musm commented Jun 2, 2017

would be nice to get this working

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

Yes, Microsoft should fix its bugs. Until it actually works the way it's supposed to, we shouldn't be encouraging anyone to use Julia on it.

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

The makefile changes here should be fine on their own though.

@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

Should I nuke the instructions and just leave the simple makefile changes?

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

I'd merge that part now. On the other part, were you building in /mnt/ or /home/ ?

@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

/mnt/
It probably is the cp -p bug mentioned in the related issue

@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

The build in /home/ only works with the " being placed around the $$PATH variable though. Unless you disable including the windows path in bash on windows. export doesn't like spaces in the PATH vartiable

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

We could say "don't build in /mnt/" until they've fixed that. depends how long it's expected to be broken for. I read that the latest version will let you install WSL in non C locations if you want, so there's very little reason to be using /mnt/

@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

The reason I was using /mnt/ was so I could easily edit the files. It's a PITA to edit files inside /home/ with standard windows tools. /mnt/ works perfectly for editing but there are the related issues for now.
I removed the docs portion for now. This is niche beyond niche at this point anyway so somebody with interest would probably find this issue.

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

Then don't use windows tools to edit? cygwin can get time stamps right, if WSL can't then it still needs a lot of work before it's usable.

@tkelman tkelman closed this Jun 2, 2017
@tkelman tkelman reopened this Jun 2, 2017
@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

where is travis on this?

@tkelman tkelman closed this Jun 2, 2017
@tkelman tkelman reopened this Jun 2, 2017
@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

I have absolutely no idea!
Do I need to do something specific to get travis to run now?

@tkelman
Copy link
Contributor

tkelman commented Jun 2, 2017

Don't think there's anything you can do on your side. If Travis worked via a webhook I could check that in the settings, but it doesn't. It passed before, right?

@mikewl
Copy link
Contributor Author

mikewl commented Jun 2, 2017

Now that I think about it, I don't think Travis ever ran on it...

@musm
Copy link
Contributor

musm commented Jul 3, 2017

bump

@musm
Copy link
Contributor

musm commented Jul 3, 2017

Looks like this just needs a rebase and an updated PR title

@tkelman
Copy link
Contributor

tkelman commented Jul 16, 2017

rebased and merged in #22705, WSL note adjusted in #22821

@tkelman tkelman closed this Jul 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies docs This change adds or pertains to documentation system:windows Affects only Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants