当我尝试使用 Cyginx 在我的 Windows Server 2019 系统上从源代码构建 Ejabbed 时出现此错误
$ make install
C:\cygwin64\home\erl10.2\erts-10.2\bin\escript.exe rebar configure-deps
==> lager (configure-deps)
==> p1_utils (configure-deps)
==> cache_tab (configure-deps)
==> fast_tls (configure-deps)
checking for gcc... **cl.exe**
checking whether the C compiler works... no
configure: error: in `/home/Administrator/ejabberd/deps/fast_tls':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: Command ['configure-deps'] failed!
make: *** [Makefile:111: deps/.built] Error 1
然后我发现它与 GCC 或环境变量有关,所以我尝试一个一个地安装依赖项,然后我尝试再次制作......它工作正常,直到这个
make escript rebar configure-deps
==> lager (configure-deps)
==> p1_utils (configure-deps)
==> cache_tab (configure-deps)
==> fast_tls (configure-deps)
==> stringprep (configure-deps)
==> fast_xml (configure-deps)
==> idna (configure-deps)
==> xmpp (configure-deps)
==> fast_yaml (configure-deps)
==> yconf (configure-deps)
==> jiffy (configure-deps)
WARN: Missing plugins: [rebar3_hex]
==> p1_oauth2 (configure-deps)
==> pkix (configure-deps)
==> jose (configure-deps)
==> eimp (configure-deps)
==> mqtree (configure-deps)
==> p1_acme (configure-deps)
==> p1_mysql (configure-deps)
==> rel (configure-deps)
==> ejabberd (configure-deps)
escript rebar compile && :> deps/.built
==> goldrush (compile)
==> lager (compile)
==> p1_utils (compile)
==> cache_tab (compile)
Compiling c:/cygwin64/home/Administrator/ejabberd/deps/cache_tab/c_src/ets_cache
.c
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.
ERROR: compile failed while processing c:/cygwin64/home/Administrator/ejabberd/d
eps/cache_tab: rebar_abort
make: *** [Makefile:112: deps/.built] Error 1
我知道它应该是 GCC 而不是 cl.exe ,他们从哪里获得 GCC 安装路径或者它是如何变成 cl.exe 的?