From b928c9f01d02fcf2f115f06ee7a2c02d5c6a0ca2 Mon Sep 17 00:00:00 2001 From: Christian Puhrsch Date: Fri, 8 Dec 2017 14:14:13 -0800 Subject: [PATCH] support debian:wheezy Summary: Small C++ changes to extend support Differential Revision: D6520761 fbshipit-source-id: 841cdd479d3f53c83902b19dee1524a641967509 --- .circleci/config.yml | 14 ++++++++++++++ .circleci/setup_debian.sh | 12 ++++++++++++ CMakeLists.txt | 2 +- README.md | 14 ++++++++++---- src/dictionary.cc | 1 + src/model.cc | 1 + 6 files changed, 39 insertions(+), 5 deletions(-) create mode 100755 .circleci/setup_debian.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 622be1943..fcf460846 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,6 +123,19 @@ jobs: command: | . .circleci/gcc_test.sh + "debian-wheezy": + docker: + - image: debian:wheezy + working_directory: ~/repo + steps: + - checkout + - run: + command: | + . .circleci/setup_debian.sh + . .circleci/gcc_test.sh + . .circleci/cmake_test.sh + + "website-build": docker: - image: node:latest @@ -149,4 +162,5 @@ workflows: - "gcc6" - "gcc7" - "gcclatest" + - "debian-wheezy" - "website-build" diff --git a/.circleci/setup_debian.sh b/.circleci/setup_debian.sh new file mode 100755 index 000000000..d103386c2 --- /dev/null +++ b/.circleci/setup_debian.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2016-present, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. An additional grant +# of patent rights can be found in the PATENTS file in the same directory. +# + +apt-get update +apt-get install -y vim g++ make cmake wget git diff --git a/CMakeLists.txt b/CMakeLists.txt index 39a5bba58..a68043784 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ # of patent rights can be found in the PATENTS file in the same directory. # -cmake_minimum_required(VERSION 3.0.2) +cmake_minimum_required(VERSION 2.8.9) project(fasttext) # The version number. diff --git a/README.md b/README.md index 7222cbfa4..7d0fb3c71 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,18 @@ We also provide a [cheatsheet](https://fasttext.cc/docs/en/cheatsheet.html#conte ## Requirements -**fastText** builds on modern Mac OS and Linux distributions. -Since it uses C++11 features, it requires a compiler with good C++11 support. +We are continously building and testing our library, CLI and Python bindings under various docker images using [circleci](https://circleci.com/). + +Generally, **fastText** builds on modern Mac OS and Linux distributions. +Since it uses some C++11 features, it requires a compiler with good C++11 support. These include : -* (gcc-4.8.5 or newer) or (clang-3.3 or newer) +* (g++-4.7.2 or newer) or (clang-3.3 or newer) Compilation is carried out using a Makefile, so you will need to have a working **make**. -If you want to use **cmake** you need at least version 3.5.2. +If you want to use **cmake** you need at least version 2.8.9. + +One of the oldest distributions we successfully built and tested the CLI under is [Debian wheezy](https://www.debian.org/releases/wheezy/). For the word-similarity evaluation script you will need: @@ -68,6 +72,8 @@ For the python bindings (see the subdirectory python) you will need: * NumPy & SciPy * [pybind11](https://github.com/pybind/pybind11) +One of the oldest distributions we successfully built and tested the Python bindings under is [Debian jessie](https://www.debian.org/releases/jessie/). + If these requirements make it impossible for you to use fastText, please open an issue and we will try to accommodate you. ## Building fastText diff --git a/src/dictionary.cc b/src/dictionary.cc index 56f96b52a..707310e3a 100644 --- a/src/dictionary.cc +++ b/src/dictionary.cc @@ -16,6 +16,7 @@ #include #include #include +#include namespace fasttext { diff --git a/src/model.cc b/src/model.cc index 264e0032f..dad1fa7bb 100644 --- a/src/model.cc +++ b/src/model.cc @@ -12,6 +12,7 @@ #include #include #include +#include namespace fasttext {