From 32648505f4b4fe27dd45a13b182bf1376acad586 Mon Sep 17 00:00:00 2001 From: Jason Coombs Date: Thu, 30 Jun 2016 15:28:49 -1000 Subject: [PATCH] Revised for compatibility with MSYS2/MINGW64 without MSYS=winsymlinks:nativestrict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- build/env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/env.sh b/build/env.sh index c418dae441..c080689f6c 100755 --- a/build/env.sh +++ b/build/env.sh @@ -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