I realize I may be documenting a bunch of build issues that more experienced programmer may overcome more easily. Anyway since I started, please bear with me. :-)
So I solved the problem of incorrect CMAKE_C_COMPILER. What I did was I found the make file that was causing Error 1: /c/users/zpan/documents/github/julia/deps/mbedtls.mk <http://mbedtls.mk:40/> I opened it, scrolled to line 40, and inserted a line before line 38: MBEDTLS_OPTS += -DCMAKE_C_COMPILER="/C/users/zpan/documents/github/julia/usr/x86_64-w64-mingw32/sys-root/mingw/bin/gcc.exe" After saving this and trying "make install" again, the compiler seems to be found, but another issue popped up, which I cannot solve yet. The error message: zpan@WSPWork MSYS /c/users/zpan/documents/github/julia $ make install -- The C compiler identification is GNU 6.2.0 -- Check for working C compiler: C:/users/zpan/documents/github/julia/usr/x86_64-w64-mingw32/sys-root/mingw/bin/gcc.exe -- Check for working C compiler: C:/users/zpan/documents/github/julia/usr/x86_64-w64-mingw32/sys-root/mingw/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found Perl: C:/msys64/usr/bin/perl.exe (found version "5.22.1") Can't open perl script "scripts/config.pl": No such file or directory CMake Error at tests/CMakeLists.txt:122 (message): Could not create symbolic link for: C:/Users/zpan/Documents/GitHub/julia/deps/srccache/mbedtls-2.3.0-gpl/tests/data_files --> Invalid switch - "Users". -- Configuring incomplete, errors occurred! See also "C:/Users/zpan/Documents/GitHub/julia/deps/build/mbedtls-2.3.0/CMakeFiles/CMakeOutput.log". make[2]: *** [/c/users/zpan/documents/github/julia/deps/mbedtls.mk:41: build/mbedtls-2.3.0/Makefile] Error 1 make[1]: *** [Makefile:81: julia-deps] Error 2 make: *** [Makefile:331: install] Error 2