illustration rabbits

Install Vowpal Wabbit on Windows and Cygwin

There are already instructions on how to install Vowpal Wabbit on other operating systems, but we could not find a clear one for Windows. We will use Cygwin to install the latest version of Vowpal Wabbit.

Thanks to reader Dominic for providing useful feedback! Guide is now updated and suitable for both 32-bit and 64-bit systems.

Thanks to readers Ray, Phil Culliton, dou, Christophe, Fred and Brian guide is updated for the latest version of Vowpal Wabbit.

Install Cygwin

Download the version of Cygwin for your operating system from: http://cygwin.com/install.html

In the Cygwin setup “Select Packages” window you will need to install the following packages:

  • Search for "git". From Devel select git: Distributed version control system
  • Search for "make". From Devel select make: the GNU version of the 'make' utility
  • Search for "g++". From Devel select gcc-g++ GNU compiler Collection (C++)
  • Search for "zlib". From Libs select zlib-devel: Zlib de/compression library (development)
  • Search for "boost". From Libs select libboost-devel: Boost C++ Libraries
  • Search for "libtool". From Devel select libtool: Generic library support script
  • Search for "automake". From Devel select automake: Wrapper scripts for automake and aclocal.
  • Search for "automake". From Devel select automake1.9: (1.9) a tool for generating GNU-compliant Makefiles (The others should be installed when resolving dependancies).
  • Search for "libboost". From Libs select libboost_python-devel: Boost C++ libraries
  • Search for "libboost". From Libs select libboost_program_options1.55: Boost C++ libraries

(Updated for the new Python bindings)

If you get shown a screen with “Resolving Dependancies”, keep the option ‘Select required packages (RECOMMENDED)’ checked.

You can always run the Cygwin installer/setup again to install more packages.

install make package

Installing the ‘make’ package.

Install Vowpal Wabbit

Open a command prompt with cmd, and run Cygwin.bat. If you installed on the c: disk and in the cygwin64 directory, then run:

c:\cygwin64\cygwin.bat

or go to the directory and click on cygwin.bat (file extension may not show)

You should now be in the Cygwin terminal (starts with a $). Use ls to get a directory listing.

Cloning vowpalwabbit

Here you run the following command to clone the Vowpal Wabbit Github Repo (latest master version):

git clone git://github.com/JohnLangford/vowpal_wabbit.git

This will start the download. When it is done go to the vowpal_wabbit directory with:

cd vowpal_wabbit

Here run:

./autogen.sh

And when that is done, run:

make

and

make install

That’s it! Go into the vowpalwabbit directory

cd vowpalwabbit

and run it:

./vw --help

To get help on all the command line arguments.

./vw --version

To get the version.

If you installed on c:, in the cygwin64 directory, in Windows you can go to:

C:\cygwin64\home\your_username\vowpal_wabbit\vowpalwabbit

to quickly put some .vw datasets there or copy the output predictions.

You could also use the cygdrive-prefix to run VW on files stored outside your user directory (or to output your model to another directory/drive). If your training set is on c:\data\train.vw try:

./vw -d /cygdrive/c/data/train.vw

Utility scripts

Perl should now also be installed. If not search for perl in the Cygwin setup and from perl select perl: Perl programming language interpreter. In the vowpal_wabbit/utl directory you’ll find some utility scripts, of which vw-varinfo is particularly useful.

The illustration with this post came from “The Velveteen Rabbit (1922)” and is in the Public Domain.

38 thoughts on “Install Vowpal Wabbit on Windows and Cygwin”

  1. Hi,

    I’m coming from Kaggle and installed your version of vowpal wabbit. Thanks for providing the executable! Really lowering the entry barriers when trying this tool 🙂

    There was one problem though that I ran into. Cygwin is not installing boost by default and vowpal wabbit needs it. Copying it as described in “the harder way” didn’t work. You can though just tell the installer to include it, which was quite easy and worked well. I’ve also installed make, g++ and zlib to be one the save side. Don’t know if that was necessary too.

  2. Hey Dominic! Thank you for the tip on using the Cygwin installer for boost! I will update the tutorial!

  3. Hi ,
    Thanks for posting this.

    I’m having trouble with the “make” command. There seems to be a problem compiling, so vw is not created. Have you encountered this problem. I’ve included the errors that resulted from executing “make” below:

    g++ -MM hash.cc > hash.d
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c main.cc -o main.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c hash.cc -o hash.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c memory.cc -o memory.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c global_data.cc -o global_data.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c io_buf.cc -o io_buf.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c parse_regressor.cc -o parse_regressor.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c parse_primitives.cc -o parse_primitives.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c unique_sort.cc -o unique_sort.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c cache.cc -o cache.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c rand48.cc -o rand48.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c simple_label.cc -o simple_label.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c multiclass.cc -o multiclass.o
    rand48.cc:11:14: warning: use of C++0x long long integer constant [-Wlong-long]
    uint64_t a = 0xeece66d5deece66dULL;
    ^
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c oaa.cc -o oaa.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c ect.cc -o ect.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c autolink.cc -o autolink.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c binary.cc -o binary.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c lrq.cc -o lrq.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c cost_sensitive.cc -o cost_sensitive.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c csoaa.cc -o csoaa.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c cb.cc -o cb.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c cb_algs.cc -o cb_algs.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c wap.cc -o wap.o
    lrq.cc: In instantiation of ‘void LRQ::predict_or_learn(LRQ::LRQstate&, LEARNER::learner&, example&) [with bool is_learn = true]’:
    lrq.cc:239:53: required from here
    lrq.cc:136:76: warning: narrowing conversion of ‘left’ from ‘unsigned char’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
    char subname[4] = { left, ‘^’, right, ” };
    ^
    lrq.cc:136:76: warning: narrowing conversion of ‘right’ from ‘unsigned char’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
    lrq.cc: In instantiation of ‘void LRQ::predict_or_learn(LRQ::LRQstate&, LEARNER::learner&, example&) [with bool is_learn = false]’:
    lrq.cc:240:56: required from here
    lrq.cc:136:76: warning: narrowing conversion of ‘left’ from ‘unsigned char’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
    lrq.cc:136:76: warning: narrowing conversion of ‘right’ from ‘unsigned char’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c searn.cc -o searn.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c searn_sequencetask.cc -o searn_sequencetask.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c parse_example.cc -o parse_example.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c scorer.cc -o scorer.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c network.cc -o network.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c parse_args.cc -o parse_args.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c accumulate.cc -o accumulate.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c gd.cc -o gd.o
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c learner.cc -o learner.o
    searn.cc:283:31: warning: integer constant is too large for ‘long’ type [-Wlong-long]
    (int)(ceil( log10((float)10000000000+1) ))) + 1; // max action id
    ^
    searn.cc:1864:5: warning: integer constant is too large for ‘long’ type [-Wlong-long]
    size_t neighbor_constant = 8349204823;
    ^
    g++ -march=native -Wall -pedantic -O3 -fomit-frame-pointer -fno-strict-aliasing -ffast-math -D_FILE_OFFSET_BITS=64 -DNDEBUG -I /usr/include -c lda_core.cc -o lda_core.o
    searn_sequencetask.cc: In function ‘void SequenceSpanTask::structured_predict(Searn::searn&, std::vector)’:
    searn_sequencetask.cc:244:91: error: call of overloaded ‘predict(example*&, uint32_t, v_array*&)’ is ambiguous
    last_prediction = srn.predict(ec[i], MULTICLASS::get_example_label(ec[i]), y_allowed);
    ^
    searn_sequencetask.cc:244:91: note: candidates are:
    In file included from searn_sequencetask.h:9:0,
    from searn_sequencetask.cc:6:
    searn.h:47:14: note: uint32_t Searn::searn::predict(example*, uint32_t, v_array*)
    uint32_t predict(example* ec, uint32_t one_ystar, v_array* yallowed=NULL); // if there is a single oracle action
    ^
    In file included from searn_sequencetask.h:9:0,
    from searn_sequencetask.cc:6:
    searn.h:51:14: note: uint32_t Searn::searn::predict(example*, size_t, v_array*, v_array*)
    uint32_t predict(example* ecs, size_t ec_len, v_array* ystar, v_array* yallowed=NULL); // if there is a single oracle action
    ^
    Makefile:28: recipe for target ‘searn_sequencetask.o’ failed
    make[1]: *** [searn_sequencetask.o] Error 1
    make[1]: *** Waiting for unfinished jobs….
    searn.cc: In function ‘void Searn::print_update(vw&, Searn::searn&)’:
    searn.cc:1847:43: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t {aka unsigned int}’ [-Wformat=]
    fprintf(stderr, ” %15lusec”, num_sec);
    ^
    searn.cc:1847:43: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t {aka unsigned int}’ [-Wformat=]
    searn.cc: In function ‘void Searn::add_neighbor_features(Searn::searn&)’:
    searn.cc:1864:32: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    size_t neighbor_constant = 8349204823;
    ^
    make[1]: Leaving directory ‘/cygdrive/c/vowpal_wabbit/vowpalwabbit’
    Makefile:75: recipe for target ‘vw’ failed
    make: *** [vw] Error 2

    1. Hey Ray,

      Unfortunately I don’t recognize that error. I’ve tried above tutorial on two laptops and I can get VW to compile (It does show a few warnings to me, but nothing show-stopping).

      If you did install all the required packages, but just can’t make the VW executable, take a look at: https://github.com/MLWave/vowpal-wabbit-cygwin-executables for pre-made executables. Do note that these are for 64-bit systems.

      If all else fails, you could have a look at: https://github.com/MLWave/Kaggle_Rotten_Tomatoes which has a Windows executable of VW version 7.1.

      A thing you can try: If libtools is not installed, install libtools.

      Also, maybe you can find your answer here: http://stackoverflow.com/questions/11694597/has-anyone-ever-successfully-compiled-vowpal-wabbit-on-a-windows-7-machine

      If you are really desperate for some Vowpal Wabbit, install VirtualBox with an Ubuntu image. Then you can simply type ‘make’ or ‘apt-get’ what you need.

      Hope you get it to work!

      Greetings, Triskelion

  4. That error is caused by GCC being tetchy about ambiguous overloads (as it often is). It looks like the issue has been cleared up in more recent commits, though, so just pulling the latest code should clear it up.

  5. Hi, thank you for this tutorial, i got the following error:

    /usr/lib/gcc/i686-pc-cygwin/4.8.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_python-mt
    collect2: error: ld returned 1 exit status
    Makefile:28: recipe for target ‘pylibvw.dll’ failed
    make[1]: *** [pylibvw.dll] Error 1
    make[1]: Leaving directory ‘/home/nietzschetmh/vowpal_wabbit/python’
    Makefile:87: recipe for target ‘python’ failed
    make: *** [python] Error 2

    Do i need to install another package called boost_python in cygwin?

    Thanks.

    1. Maybe “libboost-python” is a newer requirement (for the Python wrapper)? I’ll have to recompile the latest version soon and update this tutorial if it stops working.

      You did install the boost library?

      I believe you can download older versions. Perhaps try building 7.6.1.

  6. Hi Triskellon ,thank you for the tutorial.

    I got the following error :

    /usr/lib/gcc/i686-pc-cygwin/4.8.3/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_program_options-mt
    collect2: error: ld returned 1 exit status
    Makefile:43: recipe for target ‘vw’ failed
    make[1]: *** [vw] Error 1
    make[1]: Leaving directory ‘/home/Fred/vowpal_wabbit/vowpalwabbit’
    Makefile:78: recipe for target ‘vw’ failed
    make: *** [vw] Error 2

    this time it’s about -lboost_program_options-mt and not python…
    any idea ?

    thanks

    1. I was having the same issues. Look at the page posted: http://stackoverflow.com/questions/11694597/has-anyone-ever-successfully-compiled-vowpal-wabbit-on-a-windows-7-machine

      And this part (it worked for me and I was able to type make and make install afterwards):

      For me, the command “configure” (step 4) didn’t work. I typed dir and notice there was a file named autogen.sh. I don’t know what this is but I typed ./autogen.sh anyway and stuff started happening. I read the text as it scrolled down the screen and I notice it said it had created vowpal_wabbit/make – and I had been previously trying to use the make command to do the install (but it wasn’t working). So, after the autogen.sh stopped running I just typed “make” – and it worked! Now a bunch of stuff is happening… I’ll write back later if this stuff isn’t good stuff…

        1. Triskellon – I followed the steps you laid out in this post, but was unable to issue a make command. I then did as suggested in the stack overflow linked above – the snippet of the comment I pasted. I.e. Once I ran ./autogen.sh and that completed, I was able to continue with your post outline and issue a make and make install command. Everything was good after that!

      1. Like you I had to run the ./autogen.sh command to get the make command to execute normally (so far). In addition, I had to install automake and libtool before the autogen command would execute correctly. Hope that helps someone.

  7. Hi Triskelion, I just find the solution :

    1) before run the “make” command, I installed the “boost”, “libtool”, “make” and “automake” (full package) in the Cygwin setup.
    2) “./autogen.sh” command,
    3) then make, make clean, …

    Thank a lot for your instructions

  8. Just tried a clean install on cygwin64 and was met with the following problem (over and over):

    mv -f .deps/parse_regressor.Tpo .deps/parse_regressor.Plo
    mv: cannot move ‘.deps/parse_regressor.Tpo’ to ‘.deps/parse_regressor.Plo’: No such file or directory

    To get around this (no idea why this happens) I just did “touch vowpalwabbit/.deps/parse_regressor.Plo”. In all I had to do the following touches to keep make happy:

    touch vowpalwabbit/.deps/allreduce.Plo
    touch vowpalwabbit/.deps/parse_regressor.Plo
    touch vowpalwabbit/.deps/unique_sort.Plo
    touch vowpalwabbit/.deps/cache.Plo
    touch vowpalwabbit/.deps/rand48.Plo
    touch vowpalwabbit/.deps/simple_label.Plo
    touch vowpalwabbit/.deps/ect.Plo
    touch vowpalwabbit/.deps/lrq.Plo
    touch vowpalwabbit/.deps/search.Plo
    touch vowpalwabbit/.deps/search_sequencetask.Plo
    touch vowpalwabbit/.deps/search_hooktask.Plo
    touch vowpalwabbit/.deps/search_entityrelationtask.Plo
    touch vowpalwabbit/.deps/parse_args.Plo
    touch vowpalwabbit/.deps/gd.Plo
    touch vowpalwabbit/.deps/bfgs.Plo
    touch vowpalwabbit/.deps/noop.Plo
    touch vowpalwabbit/.deps/cbify.Plo
    touch vowpalwabbit/.deps/library_example.Po
    touch library/.deps/library_example.Po

    After that, everything builds fine and vw works.

  9. Going through the install on 64-bit win8.1 and I also needed to install this:
    search “clang”, choose devel -> clang: C/C++/ObjC compiler frontend based on LLVM

    It got rid of an error message at the start of ./autogen.sh:
    “which: no clang++ in (.. and a whole lot of paths)

    I still get stuck on an error tho and no way past it:
    make[1]: *** No rule to make target ‘vowpalwabbit/beam.h’, needed by ‘all-am’. Stop.

    Any ideas about this one?

    1. “Resolved” it.. just deleted the beam.h line from Makefile and everything works. Seems it was dropped at some point in last couple of months, it does show in some of the older commits.

  10. Hi Triskellon,

    THANKS so much for posting this. I wished I had bumped into this page sooner. After hours and hours trying to install VW the hard way, I was able to install and run it in 30 minutes after i followed your directions. Note: the only packaged I installed, not included in your tutorial, is libboost 1.53: Boost C++ libraries.
    Other than that, everything worked wonderfully.

    THANKS again.
    Best,

    Alex

  11. make is failing with a bunch of errors, related to source cbify.cc. I listed a few below. Any help is appreciated.

    libtool: compile: clang++ -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 -MT cbify.lo -MD -MP -MF .deps/cbify.Tpo -c cbify.cc -DDLL_EXPORT -DPIC -o .libs/cbify.o
    In file included from cbify.cc:9:
    In file included from ./../explore/static/MWTExplorer.h:16:
    In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/tuple:35:
    /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently
    experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
    #error This file requires compiler and library support for the \
    ^
    In file included from cbify.cc:9:
    In file included from ./../explore/static/MWTExplorer.h:28:
    ./../explore/static/utility.h:247:21: warning: ‘long long’ is a C++11 extension [-Wc++11-long-long]
    const uint64_t a = 0xeece66d5deece66dULL;
    ^
    ./../explore/static/utility.h:286:31: warning: no newline at end of file [-Wnewline-eof]
    /*! @} End of Doxygen Groups*/
    ^
    In file included from cbify.cc:9:
    ./../explore/static/MWTExplorer.h:80:8: error: no member named ‘tuple’ in namespace ‘std’
    std::tuple action_probability_log_tuple = explorer.Choose_Action(seed + m_app_id, context);
    ~~~~~^
    ./../explore/static/MWTExplorer.h:80:14: error: unexpected type name ‘u32’: expected expression
    std::tuple action_probability_log_tuple = explorer.Choose_Action(seed + m_app_id, context);
    ^
    ./../explore/static/MWTExplorer.h:82:21: error: no member named ‘get’ in namespace ‘std’
    u32 action = std::get(action_probability_log_tuple);

  12. I did all described above and get:

    Making all in vowpalwabbit
    make[1]: Entering directory ‘/home/nianna/vowpal_wabbit/vowpalwabbit’
    make all-am
    make[2]: Entering directory ‘/home/nianna/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:68: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:33:34: error: ‘fileno’ was not declared in this scope
    fil = gzdopen(fileno(stdin), “rb”);
    ^
    global_data.cc: In constructor ‘vw::vw()’:
    global_data.cc:293: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/nianna/vowpal_wabbit/vowpalwabbit’
    Makefile:390: recipe for target ‘all’ failed
    make[1]: *** [all] Error 2
    make[1]: Leaving directory ‘/home/nianna/vowpal_wabbit/vowpalwabbit’
    Makefile:503: recipe for target ‘all-recursive’ failed
    make: *** [all-recursive] Error 1

  13. Hi,
    Thanks for guide!
    I have some trouble executing the autogen.sh script.
    I get the following error:
    $ sh autogen.sh
    autogen.sh: line 27: /usr/share: is a directory
    libtoolize: putting auxiliary files in `.’.
    libtoolize: copying file `./ltmain.sh’
    libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acinclude.d’.
    libtoolize: copying file `acinclude.d/libtool.m4′
    libtoolize: copying file `acinclude.d/ltoptions.m4′
    libtoolize: copying file `acinclude.d/ltsugar.m4′
    libtoolize: copying file `acinclude.d/ltversion.m4′
    libtoolize: copying file `acinclude.d/lt~obsolete.m4′
    Can’t locate Automake/Config.pm in @INC (@INC contains: /mingw/share/automake-1.11 /usr/lib/perl5/site_perl/5.14/x86_64-cygwin-threads /usr/lib/perl5/site_perl/5.14 /usr/lib/perl5/ve
    ndor_perl/5.14/x86_64-cygwin-threads /usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/x86_64-cygwin-threads /usr/lib/perl5/5.14 .) at /cygdrive/c/MinGW/bin/aclocal-1.11 line 37.
    BEGIN failed–compilation aborted at /cygdrive/c/MinGW/bin/aclocal-1.11 line 37.

    I have tried installing the automake-1.11 version but still, I get the same error…

    1. Path is incorrect (I am talking about windows installation via cygwin)
      /mingw/share/automake-1.11
      Replace /mingw/ in the above with /cygdrive/c/MinGW/

      Files which require changes are below:
      FIle: aclocal-1.11 Path: MinGW/bin/aclocal-1.11
      File: automake-1.11 Path: MinGW/bin/automake-1.11
      File: Config.pm
      Path: MinGW/share/automake-1.11/Automake/Config.pm
      In Config.pm file change the value of variable $libdir to
      $libdir = ‘/cygdrive/c/MinGW/share/automake-1.11’

      PS: 1.11 is the current version. Version may very

  14. I am getting the following error when I am running the autogen

    checking whether the C++ compiler works… no
    configure: error: in `/home/I312345/vowpal_wabbit’:
    configure: error: C++ compiler cannot create executables
    See `config.log’ for more details

    Please help

  15. Hi Triskelion,

    Thanks a lot for posting this!

    I’ve been struggling quite a bit to install VW on my 64bit win8.1. I ran into a similar error message to Lauri’s when doing ./autogen.sh and install “clang: C/C++/ObjC compiler frontend based on LLVM” to fix it.

    However, when typing “make” later, I keep having this error:

    libtool: compile: clang++ -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 -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 global_data.cc:13:
    In file included from ./global_data.h:18:
    ./example.h:42:25: error: union member ‘cs’ has a non-trivial constructor
    COST_SENSITIVE::label cs;
    ^
    ./cost_sensitive.h:27:21: note: because field of type ‘v_array’ has a user-provided default constructor
    v_array costs;
    ^
    ./v_array.h:32:3: note: declared here
    v_array() { begin= NULL; end = NULL; end_array=NULL; erase_count = 0;}
    ^
    In file included from global_data.cc:13:
    In file included from ./global_data.h:18:
    ./example.h:43:13: error: union member ‘cb’ has a non-trivial constructor
    CB::label cb;
    ^
    ./cb.h:21:23: note: because field of type ‘v_array’ has a user-provided default constructor
    v_array costs;
    ^
    ./v_array.h:32:3: note: declared here
    v_array() { begin= NULL; end = NULL; end_array=NULL; erase_count = 0;}
    ^
    2 errors generated.
    Makefile:619: recipe for target ‘global_data.lo’ failed
    make[2]: *** [global_data.lo] Error 1
    make[2]: Leaving directory ‘/home/ursula/vowpal_wabbit/vowpalwabbit’
    Makefile:390: recipe for target ‘all’ failed
    make[1]: *** [all] Error 2
    make[1]: Leaving directory ‘/home/ursula/vowpal_wabbit/vowpalwabbit’
    Makefile:503: recipe for target ‘all-recursive’ failed
    make: *** [all-recursive] Error 1

    I’ve also tried the suggestions you made to Ray, installing “libtools” and downloading the pre-made executables but there is still no luck. Have you seen this error before?

    Thank you!

  16. I followed the instruction to install VW on a fresh installed Cygwin (64) bit on my Windows 7, and got the following error when I compile VW:

    ./io_buf.h:72:13: error: use of undeclared identifier ‘fileno’
    ret = fileno(stdin);
    ^
    In file included from global_data.cc:13:
    In file included from ./global_data.h:17:
    ./comp_io.h:28:22: error: use of undeclared identifier ‘fileno’
    fil = gzdopen(fileno(stdin), “rb”);
    ^
    global_data.cc:295:19: error: use of undeclared identifier ‘fileno’

    Any help on this will be highly appreciated.

    Thanks,

    Jiabo

    1. Hey Saed, were u able to resolve your problem? I’m facing same kind of problem, it would be helpful if you could share your tricks to resolve it.

      Thanks
      Raj

  17. Hi,

    I executed ./autogen.sh & ./configure successfully, but whenever trying to run make, it’s throwing error:

    At global scope:
    cc1plus: warning: unrecognized command line option “-Wno-unused-local-typedef”
    Makefile:646: recipe for target ‘allreduce_threads.lo’ failed
    make[1]: *** [allreduce_threads.lo] Error 1
    make[1]: Leaving directory ‘/home/rajkkum/vowpal_wabbit/vowpalwabbit’
    Makefile:508: recipe for target ‘install-recursive’ failed
    make: *** [install-recursive] Error 1

    any idea to resolve this problem. Please reply and thanks for your great post.

    Thanks
    Raj

    1. Hi Raj,

      I think this installation guide became a bit dated (or there is an install error in latest version). It’s very hard for me to debug this remotely, or to keep up with the development pace of VW. If you do manage to solve it, please post a solution here, as this seems to be a gathering place for VW on Windows installs :).

      Guido Tapia is developer of py-ml-utils: https://github.com/gatapia/py_ml_utils and he often posts an updated version of VW executables. This requires no installation, just drop in any directory and go. His latest version is VW 7.8: https://github.com/gatapia/py_ml_utils/tree/master/lib ( https://github.com/JohnLangford/vowpal_wabbit/blob/master/LICENSE ). Perhaps that could be of help.

      1. Hi Triskelion,

        I tried all possibilities (includes re-installing from scratch but no good luck). Then I copied the entire vowpal wabbit folder from a friend (somehow he was lucky to make it by following the same steps as per your tutorial), then I did run ./autogen.sh, make and then make install. And now its working perfectly on my system (don’t know how & why, but its working).

        Thanks a lot once again, hopefully it would help someone facing the same kind of problem on windows machine.

        Thanks
        Raj

  18. Hi,
    I had the same problem that once installing everything and running .\autogen a lot of error occured. I wasn’t able to solve these errors but I found the windows readme.txt in the project. There is a detailed instructions how to compile vw using VS 2013. For me it had to be especially VS 2013 and it wouldn’t work with VS 2015, but the community editions were enough. After using the right VS version everything was quite easy and straight forward.

    https://github.com/JohnLangford/vowpal_wabbit/blob/master/README.windows.txt

    1. @Patrick: I am trying to install using VS 2015 community edition. I am following the instruction of the link you provided. Everything goes on fine till I open vw.sln file using visual studio. I did build/rebuild but editor shows so many errors. It seems some libraries are missing. Did you get that too? Did you installed VS 2013 or 2015?

  19. Hi,

    I have problems when installing vowpal wabbit in my windows 7 64-bit machine. Could you please give some hints?

    Everything works fine until I input `make’ in the cygwin command interface. The error shows that `parse_example_json.h:16:30: fatal error: rapidjson/reader.h: No such file or directory’.

    I check the path of `./vowpal_wabbit/vowpalwabbit/rapidjson’ and find that it only contains `reader.md’.

    How should I debug this case? Thanks a lot.

    1. Hi Aaron,

      I myself stopped doing installs of VW in Cygwin (i know.. i know..). Just too many corner cases popping up.

      I can recommend http://www.picnet.com.au/blogs/guido/post/2014/11/13/vowpal-wabbit-for-windows-and-binary-for-win-x64/ which hosts executables to run in Windows natively (without resorting to Cygwin). Should be a bit faster too.

      Above version is VW 7.8. Here is 7.1 exe if that doesn’t work: https://github.com/MLWave/Kaggle_Rotten_Tomatoes

      Here I also have a VW 7.6.1 build for use with Cygwin: https://github.com/MLWave/vowpal-wabbit-cygwin-executables

Leave a Reply

Your email address will not be published. Required fields are marked *