如何解决我想在Cygwin64上构建cgreen
我安装了Cygwin64,也想安装Cgreen。
我在Cygwin64输入命令'make'。 我看到了这个错误。
我认为这是关于makefile的问题。 我不知道该怎么解决。
请帮助我。 谢谢。
解决方法
您没有使用Make的Cygwin版本。
$ type make
make is /usr/bin/make
$ make --version
GNU Make 4.3
Built for x86_64-pc-cygwin
...
如此,或者您尚未安装Make软件包并进行验证, 应该使用cygcheck
$ cygcheck -c make
Cygwin Package Information
Package Version Status
make 4.3-1 OK
或者您已经将PATH修改为在Cygwin之前有其他目录
$ echo $PATH
/home/Marco/bin:/usr/local/bin:/usr/bin:/usr/lib/lapack:/usr/sbin:...
,
cgreen软件包1.3.0版存在一些问题。显然,它在发行之前并未作为独立测试。另请参阅:
https://github.com/cgreen-devs/cgreen/issues/234
要从git源进行构建,您需要安装make
,cmake
和git
软件包,当然还要安装C编译器gcc-core
$ git clone https://github.com/cgreen-devs/cgreen.git
Cloning into 'cgreen'...
remote: Enumerating objects: 203,done.
remote: Counting objects: 100% (203/203),done.
remote: Compressing objects: 100% (146/146),done.
remote: Total 9958 (delta 96),reused 133 (delta 56),pack-reused 9755
Receiving objects: 100% (9958/9958),2.81 MiB | 6.07 MiB/s,done.
Resolving deltas: 100% (7024/7024),done.
$ cd cgreen
$ make
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
...
[100%] Linking C shared library cygcgreen_runner_tests.dll
make[3]: Leaving directory '/pub/tmp/cgreen/build'
[100%] Built target cgreen_runner_tests
make[2]: Leaving directory '/pub/tmp/cgreen/build'
make[1]: Leaving directory '/pub/tmp/cgreen/build'
在我的系统上,它通过了所有测试
$ make test
-- Configuring done
-- Generating done
-- Build files have been written to: /pub/tmp/cgreen/build
make[1]: Entering directory '/pub/tmp/cgreen/build'
...
25/25 Test #25: cgreen_runner_multiple_libraries ................................... Passed 1.15 sec
100% tests passed,0 tests failed out of 25
Total Test time (real) = 52.58 sec
make[4]: Leaving directory '/pub/tmp/cgreen/build'
Built target check
make[3]: Leaving directory '/pub/tmp/cgreen/build'
make[2]: Leaving directory '/pub/tmp/cgreen/build'
make[1]: Leaving directory '/pub/tmp/cgreen/build'
作为替代方案,您可以使用问题中报告的建议
$ tar -xf cgreen-1.3.0.tar.gz
$ cd cgreen-1.3.0
$ sed -i -e "s/^get_filename_component/\# get_filename_component/" CMakeLists.txt
$ make
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。