Skip to content

Conversation

@marknl
Copy link

@marknl marknl commented May 24, 2019

Microsoft added some system paths to $PATH in WSL (like: "/mnt/c/Program Files (x86)/..."). Since then, building Dash in WSL fails. This will fix that issue.

Microsoft added some system paths to $PATH in WSL (like: "/mnt/c/Program Files (x86)/..."). Since then, building Dash in WSL fails. This will fix that issue.
@UdjinM6
Copy link

UdjinM6 commented May 24, 2019

Interesting. There is a similar issue in bitcoin bitcoin#10269 where similar patch was also proposed bitcoin#10269 (comment). But it looks like func.mk was not patched and instead they updated docs with a bunch of wsl related fixes https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md#building-for-64-bit-windows.

Specifically:

Build using:

PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
cd depends
make HOST=x86_64-w64-mingw32
cd ..
./autogen.sh # not required when building from tarball
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make

@marknl
Copy link
Author

marknl commented May 24, 2019

Yeah. I fixed the dash built with what they did in that issue, then it all went smooth.

The docs where updates in this commit:
bitcoin@4f890ba

Not sure what's the best course of action. Inform users to fix path with an extra command during build process, or fix the func.mk so they're not bothered by it.

I'd go for the file fix, this keeps the build procedure free from exceptions.

@UdjinM6
Copy link

UdjinM6 commented May 24, 2019

Thanks for confirming! Yeah, there was this commit and then a couple of others which clarified building for various versions etc.

I think the issue with not fixing PATH via sed is that we could find wrong make there and everything falls apart again. Or at least that was my impression from the discussion in the bitcoin issue I linked to.

@marknl
Copy link
Author

marknl commented May 24, 2019

I think the issue with not fixing PATH via sed is that we could find wrong make there and everything falls apart again. Or at least that was my impression from the discussion in the bitcoin issue I linked to.

That does sound very plausible. Then going for option 1 would be the only proper solution right now.

I'll create another PR for that.

@UdjinM6
Copy link

UdjinM6 commented Jul 29, 2019

Reviving this because of #3039

@UdjinM6 UdjinM6 reopened this Jul 29, 2019
@UdjinM6 UdjinM6 changed the base branch from master to develop July 29, 2019 20:18
@UdjinM6 UdjinM6 changed the title Fixed building Dash in WSL Fixed building for "broken" PATHs Jul 29, 2019
@UdjinM6 UdjinM6 closed this Mar 9, 2021
@kwvg
Copy link
Collaborator

kwvg commented Jun 1, 2021

#4029 possibly breaks applications that don't expect $PATH to contain escape characters, it's much preferred to modify funcs.mk instead of changing a global

I'd suggest to revert #4029 and reconsider #2939 as its replacement.

I'm currently using macOS and have VMWare Fusion in my PATH variable (console output /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Users/kitty/go/bin and I needed to implement #2939 to get Dash to build on my rig)

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

Successfully merging this pull request may close these issues.

3 participants