Bläddra i källkod

support debian:wheezy

Summary: Small C++ changes to extend support

Differential Revision: D6520761

fbshipit-source-id: 841cdd479d3f53c83902b19dee1524a641967509
Christian Puhrsch 8 år sedan
förälder
incheckning
b928c9f01d
6 ändrade filer med 39 tillägg och 5 borttagningar
  1. 14 0
      .circleci/config.yml
  2. 12 0
      .circleci/setup_debian.sh
  3. 1 1
      CMakeLists.txt
  4. 10 4
      README.md
  5. 1 0
      src/dictionary.cc
  6. 1 0
      src/model.cc

+ 14 - 0
.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"

+ 12 - 0
.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

+ 1 - 1
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.

+ 10 - 4
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

+ 1 - 0
src/dictionary.cc

@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <iterator>
 #include <cmath>
+#include <stdexcept>
 
 namespace fasttext {
 

+ 1 - 0
src/model.cc

@@ -12,6 +12,7 @@
 #include <iostream>
 #include <assert.h>
 #include <algorithm>
+#include <stdexcept>
 
 namespace fasttext {