【发布时间】:2015-02-19 07:28:35
【问题描述】:
我很难安装 vowpal wabbit。
我遇到的问题是在克隆 vw 之后,当我运行命令 make 时。下面的错误信息
非常感谢任何帮助! 操作系统:Windows 8.1 64 位 谢谢
一个
$ make
Making all in vowpalwabbit
make[1]: Entering directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
make all-am
make[2]: Entering directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include
-O3 -fomit-frame-pointer -ffast-math -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DNDEBUG -
Wall -pedantic -std=c++0x -MT global_data.lo -MD -MP -MF .deps/global_data.Tpo -c -o global_data.lo global_data.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -O3 -fomit-frame-pointer - ffast-math -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -pedantic -std=c++0x -MT global_data.lo -MD -MP -MF .deps/global_data.Tpo -c global_data.cc -DDLL_EXPORT -DPIC -o .libs/global_data.o
In file included from comp_io.h:7:0,
from global_data.h:17,
from global_data.cc:13:
io_buf.h: In member function 'virtual int io_buf::open_file(const char*, bool, int)':
io_buf.h:72:25: error: 'fileno' was not declared in this scope ret = fileno(stdin);
In file included from global_data.h:17:0,
from global_data.cc:13:
comp_io.h: In member function 'virtual int comp_io_buf::open_file(const char*, bool, int)':
comp_io.h:28:34: error: 'fileno' was not declared in this scope
fil = gzdopen(fileno(stdin), "rb");
^
global_data.cc: In constructor 'vw::vw()':
global_data.cc:295:32: error: 'fileno' was not declared in this scope
stdout_fileno = fileno(stdout);
^
Makefile:619: recipe for target 'global_data.lo' failed
make[2]: *** [global_data.lo] Error 1
make[2]: Leaving directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
Makefile:390: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
Makefile:503: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
【问题讨论】:
-
我相信要在 Windows 上构建,您需要拥有 Microsoft 的 Visual Studio。过去,有些人设法使用 cygwin 和 GNU/free 工具集构建了 vw,但我不确定这是否微不足道以及这是否仍然正确。请参阅源代码树中的
README.windows.txt以使用 Visual Studio 进行构建。另一种可能的途径是在 Windows 上安装一个 linux VM,并在其中使用简单的 linuxmake。 -
我现在也在尝试编译 VW(在 Windows 8.1 64 位上使用 Cygwin)并且我得到了同样的错误。我正在按照here 的指示进行操作。由于 .NET 及其舒适的生态系统,我完全忘记了我是多么讨厌 C++。如果我找到解决此问题的方法,我会回来的...
-
我放弃了.. 我修复了 fileno(...) 错误,但随后出现了新错误,例如未声明的 alloca(我也修复了)然后未声明的 to_string(我似乎无法修理)。我想我会使用您在下面链接的二进制文件(虽然它有点过时),或者只是在 Azure 上启动一台 Linux 机器。 ;(
标签: vowpalwabbit