我正在尝试安装tidalcycles(http://tidalcycles.org/getting_started.html),但是我在运行cabal install tidal命令时遇到问题。
最初,由于Windows10兼容性,我遇到了一个问题,因此我安装了Cygwin,并尝试从他的shell中运行命令。但这会发生:

Andrea@Pc_di_Andrea ~
$ cabal install tidal
Resolving dependencies...
Configuring old-time-1.1.0.3...
Configuring network-2.6.2.1...
Failed to install old-time-1.1.0.3
Build log ( C:\Users\Andrea\AppData\Roaming\cabal\logs\old-time-1.1.0.3.log):
Configuring old-time-1.1.0.3...
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-8957/old-time-1.1.0.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin\tmp\cabal-tmp-8957\old-time-1.1.0.3'
Failed to install network-2.6.2.1
Build log ( C:\Users\Andrea\AppData\Roaming\cabal\logs\network-2.6.2.1.log ):
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-8956/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin\tmp\cabal-tmp-8956\network-2.6.2.1'
cabal.exe: Error: some packages failed to install:
hosc-0.15 depends on network-2.6.2.1 which failed to install.
mersenne-random-pure64-0.2.0.5 depends on old-time-1.1.0.3 which failed to
install.
network-2.6.2.1 failed during the configure step. The exception was:
ExitFailure 77
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
tidal-0.8 depends on old-time-1.1.0.3 which failed to install.
websockets-0.9.6.2 depends on network-2.6.2.1 which failed to install.

因此,它说
configure: error: C compiler cannot create executables

是问题。我正在运行32位版本,并且应该安装c编译器,因为我从系统收到此回复:
Andrea@Pc_di_Andrea ~
$  echo; gcc --version; echo; g++ --version;

gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


g++ (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我是这个“cygwin环境”的新手,如果我的问题不合适,我深表歉意,但是我阅读了一些有关此c编译器问题的指南,而我根本不理解我在做什么错。

最佳答案

发现了问题:我没有完成Haskell的安装,而是使用cabal config.file进行编辑

extra-prog-path: C:\Program Files\Haskell Platform\8.0.1\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.0.1\mingw\include+

就像这个来源https://www.haskell.org/platform/所说。

关于c - Gycwin : c compiler cannot create executables - tidalcycles installation,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38438932/

10-10 17:56