Revised for compatibility with MSYS2/MINGW64 without MSYS=winsymlinks:nativestrict

Please see: https://sourceforge.net/p/msys2/tickets/41/

When the following is NOT enabled (when the line has NOT been uncommented) symlinks are unavailable in MSYS2 shell for WIN32 compatibility.

rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict

which results in the following error due to the nested recursive symlinks within go-ethereum/build/ when _workspace/ was being created there:

```
JasonCoombs@Kauri_Forest MINGW64 ~/go-ethereum/build/_workspace/src/github.com/ethereum
$ ln -s "/home/JasonCoombs/go-ethereum" go-ethereum
ln: failed to create symbolic link ‘go-ethereum’ -> ‘/home/JasonCoombs/go-ethereum’: File name too long
```

The solution, for compatibility with MSYS2/MINGW64 in its default WIN32 mode of operation, is to set up fake Go workspace outside of $root

Beware, MINGW64! FlashGordonW64 is coming to git you. Flash! Ah ahhhhh! The savior of the universe! @ForestMade #SuperHero64
This commit is contained in:
Jason Coombs 2016-06-30 15:28:49 -10:00 committed by GitHub
parent 1e50f5dd28
commit 32648505f4

View file

@ -8,13 +8,13 @@ if [ ! -f "build/env.sh" ]; then
fi
# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
workspace="$PWD/../_go_build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/ethereum"
if [ ! -L "$ethdir/go-ethereum" ]; then
mkdir -p "$ethdir"
cd "$ethdir"
ln -s ../../../../../. go-ethereum
ln -s "$root" go-ethereum
cd "$root"
fi