在Cygwin上建造Riak

时间:2013-02-27 14:05:35

标签: build cygwin riak

尝试在Cygwin上构建Riak但在为erlang_js构建dep时失败> e_src。我尝试了两种不同的gcc,一种在cygwin下打包,另一种在mingw下打包。我试图在两者之间切换,但在每种情况下都会遇到不同类型的错误。 我确实理解Riak并没有在Windows上“正式”支持,但我宁愿尝试这样做而不是使用ubuntu等运行虚拟机。这只是为了帮助我学习Riak而不是用于生产环境。这是我尝试从Basho的github repo中克隆的Riak 1.3发布时的初始错误:

user1@mycomputer ~/riak
$ make rel
./rebar get-deps
==> Entering directory `c:/cygwin/home/user1/riak'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager_syslog'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager'
==> lager (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/lager'
==> Entering directory `c:/cygwin/home/user1/riak/deps/syslog'
==> syslog (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/syslog'
==> lager_syslog (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/lager_syslog'
==> Entering directory `c:/cygwin/home/user1/riak/deps/cluster_info'
==> cluster_info (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/cluster_info'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_kv'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_core'
==> Entering directory `c:/cygwin/home/user1/riak/deps/poolboy'
==> poolboy (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/poolboy'
==> Entering directory `c:/cygwin/home/user1/riak/deps/protobuffs'
==> Entering directory `c:/cygwin/home/user1/riak/deps/meck'
==> meck (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/meck'
==> protobuffs (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/protobuffs'
==> Entering directory `c:/cygwin/home/user1/riak/deps/basho_stats'
==> basho_stats (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/basho_stats'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_sysmon'
==> riak_sysmon (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_sysmon'
==> Entering directory `c:/cygwin/home/user1/riak/deps/webmachine'
==> Entering directory `c:/cygwin/home/user1/riak/deps/mochiweb'
==> mochiweb (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/mochiweb'
==> webmachine (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/webmachine'
==> Entering directory `c:/cygwin/home/user1/riak/deps/folsom'
==> Entering directory `c:/cygwin/home/user1/riak/deps/bear'
==> bear (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/bear'
==> folsom (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/folsom'
==> riak_core (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_core'
==> Entering directory `c:/cygwin/home/user1/riak/deps/erlang_js'
==> erlang_js (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/erlang_js'
==> Entering directory `c:/cygwin/home/user1/riak/deps/bitcask'
==> bitcask (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/bitcask'
==> Entering directory `c:/cygwin/home/user1/riak/deps/merge_index'
==> merge_index (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/merge_index'
==> Entering directory `c:/cygwin/home/user1/riak/deps/ebloom'
==> ebloom (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/ebloom'
==> Entering directory `c:/cygwin/home/user1/riak/deps/eper'
==> Entering directory `c:/cygwin/home/user1/riak/deps/getopt'
==> getopt (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/getopt'
==> eper (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/eper'
==> Entering directory `c:/cygwin/home/user1/riak/deps/eleveldb'
==> eleveldb (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/eleveldb'
==> Entering directory `c:/cygwin/home/user1/riak/deps/sext'
==> Entering directory `c:/cygwin/home/user1/riak/deps/edown'
==> edown (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/edown'
==> sext (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/sext'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_pipe'
==> riak_pipe (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_pipe'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_api'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_pb'
==> riak_pb (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_pb'
==> riak_api (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_api'
==> riak_kv (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_kv'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_search'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_search/apps/lucene_parser'
==> lucene_parser (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_search/apps/lucene_parser'
==> riak_search (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_search'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riak_control'
==> Entering directory `c:/cygwin/home/user1/riak/deps/erlydtl'
==> erlydtl (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/erlydtl'
==> riak_control (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riak_control'
==> Entering directory `c:/cygwin/home/user1/riak/deps/riaknostic'
==> riaknostic (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/riaknostic'
==> Entering directory `c:/cygwin/home/user1/riak/rel'
==> rel (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak/rel'
==> riak (get-deps)
==> Leaving directory `c:/cygwin/home/user1/riak'
./rebar compile
==> Entering directory `c:/cygwin/home/user1/riak'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager_syslog'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager'
==> lager (compile)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/lager'
==> Entering directory `c:/cygwin/home/user1/riak/deps/syslog'
==> syslog (compile)
Compiling c_src/syslog_drv.c
This version of C:\cygwin\bin\cc.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
ERROR: cmd /q /c cc -c  -g -Wall -fPIC  -If:/Tools/erl5.9/lib/erl_interface-3.7.6/include -If:/Tools/erl5.9/erts-5.9/include   c_src/syslog_drv.c -o c_src/syslog_drv.o failed with error: 1 and output:
This version of C:\cygwin\bin\cc.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

Makefile:8: recipe for target `compile' failed
make: *** [compile] Error 1

user1@mycomputer ~/riak

在更改为MingW时,我收到以下错误:

user1@mycomputer ~/riak
$ export PATH=/cygdrive/f/Tools/MinGW/bin:$PATH

user1@mycomputer ~/riak
$ ./rebar compile
==> Entering directory `c:/cygwin/home/user1/riak'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager_syslog'
==> Entering directory `c:/cygwin/home/user1/riak/deps/lager'
==> lager (compile)
==> Leaving directory `c:/cygwin/home/user1/riak/deps/lager'
==> Entering directory `c:/cygwin/home/user1/riak/deps/syslog'
==> syslog (compile)
Compiling c_src/syslog_drv.c
c_src/syslog_drv.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
c_src/syslog_drv.c:25:20: fatal error: syslog.h: No such file or directory
compilation terminated.
ERROR: cmd /q /c cc -c  -g -Wall -fPIC  -If:/Tools/erl5.9/lib/erl_interface-3.7.6/include -If:/Tools/erl5.9/erts-5.9/include   c_src/syslog_drv.c -o c_src/syslog_drv.o failed with error: 1 and output:
c_src/syslog_drv.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
c_src/syslog_drv.c:25:20: fatal error: syslog.h: No such file or directory
compilation terminated.

似乎缺少syslog.h个文件或未以其他方式引用/链接。请帮我解决这个问题。

更新---- 如果我从rebar.config文件@ the riak root level中删除了syslog的dep,我会收到以下错误(使用MinGW):

==> erlang_js (compile)
make[1]: Entering directory `c:/cygwin/home/user1/riak/deps/erlang_js'
cd c_src; make
make[2]: Entering directory `C:/cygwin/home/user1/riak/deps/erlang_js/c_src'
gunzip -c nsprpub-4.8.tar.gz | tar xf -
patching file nsprpub/configure.in
patching file nsprpub/configure
patching file nsprpub/lib/tests/Makefile.in
patching file nsprpub/pr/src/misc/prnetdb.c
(cd C:/cygwin/home/user1/riak/deps/erlang_js/c_src/nsprpub && \
 ./configure --disable-debug --enable-optimize \
                     --prefix=C:/cygwin/home/user1/riak/deps/erlang_js/c_src/system --disable-64bit && \
         F:/Tools/MinGW/bin/make all install)
: invalid feature nameg
make[2]: *** [C:/cygwin/home/user1/riak/deps/erlang_js/c_src/system/lib/libnspr4.a] Error 1
make[2]: Leaving directory `C:/cygwin/home/user1/riak/deps/erlang_js/c_src'
make[1]: *** [c_src] Error 2
make[1]: Leaving directory `c:/cygwin/home/user1/riak/deps/erlang_js'
ERROR: Command [compile] failed!
make: *** [compile] Error 1

0 个答案:

没有答案