Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

OS X install problem #753

Closed
rxy1212 opened this issue Mar 12, 2019 · 21 comments
Closed

OS X install problem #753

rxy1212 opened this issue Mar 12, 2019 · 21 comments
Labels
Build build issue Python related to python bindings

Comments

@rxy1212
Copy link

rxy1212 commented Mar 12, 2019

When I install fasttext using "pip install .", I get some errors like following

Failed to build fasttext
Installing collected packages: fasttext
  Running setup.py install for fasttext ... error
    Complete output from command /miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/pip-req-build-i2z3pyel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/pip-record-yg0h6noh/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.6
    creating build/lib.macosx-10.7-x86_64-3.6/fastText
    copying python/fastText/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/fastText
    copying python/fastText/FastText.py -> build/lib.macosx-10.7-x86_64-3.6/fastText
    creating build/lib.macosx-10.7-x86_64-3.6/fastText/util
    copying python/fastText/util/util.py -> build/lib.macosx-10.7-x86_64-3.6/fastText/util
    copying python/fastText/util/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/fastText/util
    creating build/lib.macosx-10.7-x86_64-3.6/fastText/tests
    copying python/fastText/tests/test_script.py -> build/lib.macosx-10.7-x86_64-3.6/fastText/tests
    copying python/fastText/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/fastText/tests
    copying python/fastText/tests/test_configurations.py -> build/lib.macosx-10.7-x86_64-3.6/fastText/tests
    running build_ext
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -c /var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmp1upvarhx.cpp -o var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmp1upvarhx.o -stdlib=libc++
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -c /var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmp9dzh7j94.cpp -o var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmp9dzh7j94.o -std=c++14
    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -c /var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmpw5pz6xr0.cpp -o var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/tmpw5pz6xr0.o -fvisibility=hidden
    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    1 warning generated.
    building 'fasttext_pybind' extension
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/python
    creating build/temp.macosx-10.7-x86_64-3.6/python/fastText
    creating build/temp.macosx-10.7-x86_64-3.6/python/fastText/pybind
    creating build/temp.macosx-10.7-x86_64-3.6/src
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c python/fastText/pybind/fasttext_pybind.cc -o build/temp.macosx-10.7-x86_64-3.6/python/fastText/pybind/fasttext_pybind.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    python/fastText/pybind/fasttext_pybind.cc:219:35: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<long long, std::__1::allocator<long long> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                for (int32_t i = 0; i < vocab_freq.size(); i++) {
                                    ~ ^ ~~~~~~~~~~~~~~~~~
    python/fastText/pybind/fasttext_pybind.cc:233:35: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<long long, std::__1::allocator<long long> >::size_type' (aka 'unsigned long') [-Wsign-compare]
                for (int32_t i = 0; i < labels_freq.size(); i++) {
                                    ~ ^ ~~~~~~~~~~~~~~~~~~
    2 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/dictionary.cc -o build/temp.macosx-10.7-x86_64-3.6/src/dictionary.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/dictionary.cc:181:52: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
        for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
                                                     ~ ^  ~~~~~~~~~~~
    src/dictionary.cc:186:13: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
          if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
              ~ ^  ~~~~~~~~~~~
    src/dictionary.cc:198:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
      for (size_t i = 0; i < size_; i++) {
                         ~ ^ ~~~~~
    src/dictionary.cc:296:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
      for (size_t i = 0; i < size_; i++) {
                         ~ ^ ~~~~~
    src/dictionary.cc:316:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t i = 0; i < hashes.size(); i++) {
                          ~ ^ ~~~~~~~~~~~~~
    src/dictionary.cc:318:31: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int32_t j = i + 1; j < hashes.size() && j < i + n; j++) {
                                ~ ^ ~~~~~~~~~~~~~
    src/dictionary.cc:515:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<fasttext::entry, std::__1::allocator<fasttext::entry> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t i = 0; i < words_.size(); i++) {
                          ~ ^ ~~~~~~~~~~~~~
    src/dictionary.cc:517:12: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
            (j < words.size() && words[j] == i)) {
             ~ ^ ~~~~~~~~~~~~
    8 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/main.cc -o build/temp.macosx-10.7-x86_64-3.6/src/main.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/main.cc:348:3: warning: code will never be executed [-Wunreachable-code]
      exit(0);
      ^~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/fasttext.cc -o build/temp.macosx-10.7-x86_64-3.6/src/fasttext.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/fasttext.cc:92:21: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int i = 0; i < ngrams.size(); i++) {
                      ~ ^ ~~~~~~~~~~~~~
    src/fasttext.cc:302:18: warning: comparison of integers of different signs: 'const int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        return eosid == i1 || (eosid != i2 && norms[i1] > norms[i2]);
               ~~~~~ ^  ~~
    src/fasttext.cc:302:34: warning: comparison of integers of different signs: 'const int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        return eosid == i1 || (eosid != i2 && norms[i1] > norms[i2]);
                               ~~~~~ ^  ~~
    src/fasttext.cc:323:16: warning: 'selectEmbeddings' is deprecated: selectEmbeddings is being deprecated. [-Wdeprecated-declarations]
        auto idx = selectEmbeddings(qargs.cutoff);
                   ^
    src/fasttext.h:165:3: note: 'selectEmbeddings' has been explicitly marked deprecated here
      FASTTEXT_DEPRECATED("selectEmbeddings is being deprecated.")
      ^
    src/utils.h:18:49: note: expanded from macro 'FASTTEXT_DEPRECATED'
    #define FASTTEXT_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
                                                    ^
    src/fasttext.cc:322:40: warning: comparison of integers of different signs: 'const size_t' (aka 'const unsigned long') and 'int64_t' (aka 'long long') [-Wsign-compare]
      if (qargs.cutoff > 0 && qargs.cutoff < input->size(0)) {
                              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
    src/fasttext.cc:327:24: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (auto i = 0; i < idx.size(); i++) {
                         ~ ^ ~~~~~~~~~~
    src/fasttext.cc:380:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t w = 0; w < line.size(); w++) {
                          ~ ^ ~~~~~~~~~~~
    src/fasttext.cc:384:41: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
          if (c != 0 && w + c >= 0 && w + c < line.size()) {
                                      ~~~~~ ^ ~~~~~~~~~~~
    src/fasttext.cc:398:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t w = 0; w < line.size(); w++) {
                          ~ ^ ~~~~~~~~~~~
    src/fasttext.cc:402:41: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
          if (c != 0 && w + c >= 0 && w + c < line.size()) {
                                      ~~~~~ ^ ~~~~~~~~~~~
    src/fasttext.cc:479:27: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
        for (int32_t i = 0; i < line.size(); i++) {
                            ~ ^ ~~~~~~~~~~~
    src/fasttext.cc:514:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t i = 0; i < ngrams.size(); i++) {
                          ~ ^ ~~~~~~~~~~~~~
    src/fasttext.cc:551:5: warning: 'precomputeWordVectors' is deprecated: precomputeWordVectors is being deprecated. [-Wdeprecated-declarations]
        precomputeWordVectors(*wordVectors_);
        ^
    src/fasttext.h:180:3: note: 'precomputeWordVectors' has been explicitly marked deprecated here
      FASTTEXT_DEPRECATED("precomputeWordVectors is being deprecated.")
      ^
    src/utils.h:18:49: note: expanded from macro 'FASTTEXT_DEPRECATED'
    #define FASTTEXT_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
                                                    ^
    src/fasttext.cc:585:23: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<float, std::__1::basic_string<char> > > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
          if (heap.size() == k && similarity < heap.front().first) {
              ~~~~~~~~~~~ ^  ~
    src/fasttext.cc:590:23: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<float, std::__1::basic_string<char> > > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
          if (heap.size() > k) {
              ~~~~~~~~~~~ ^ ~
    src/fasttext.cc:701:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long long') [-Wsign-compare]
      for (size_t i = 0; i < n; i++) {
                         ~ ^ ~
    src/fasttext.cc:706:26: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long long') [-Wsign-compare]
        for (size_t j = 0; j < dim; j++) {
                           ~ ^ ~~~
    src/fasttext.cc:718:24: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long long') [-Wsign-compare]
      for (size_t i = 0; i < n; i++) {
                         ~ ^ ~
    src/fasttext.cc:723:26: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long long') [-Wsign-compare]
        for (size_t j = 0; j < dim; j++) {
                           ~ ^ ~~~
    19 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/utils.cc -o build/temp.macosx-10.7-x86_64-3.6/src/utils.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/model.cc -o build/temp.macosx-10.7-x86_64-3.6/src/model.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/loss.cc -o build/temp.macosx-10.7-x86_64-3.6/src/loss.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/loss.cc:83:21: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, int>, std::__1::allocator<std::__1::pair<float, int> > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
        if (heap.size() == k && std_log(output[i]) < heap.front().first) {
            ~~~~~~~~~~~ ^  ~
    src/loss.cc:88:21: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, int>, std::__1::allocator<std::__1::pair<float, int> > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
        if (heap.size() > k) {
            ~~~~~~~~~~~ ^ ~
    src/loss.cc:257:25: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'std::__1::vector<int, std::__1::allocator<int> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int32_t i = 0; i < pathToRoot.size(); i++) {
                          ~ ^ ~~~~~~~~~~~~~~~~~
    src/loss.cc:282:19: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, int>, std::__1::allocator<std::__1::pair<float, int> > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
      if (heap.size() == k && score < heap.front().first) {
          ~~~~~~~~~~~ ^  ~
    src/loss.cc:289:21: warning: comparison of integers of different signs: 'std::__1::vector<std::__1::pair<float, int>, std::__1::allocator<std::__1::pair<float, int> > >::size_type' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
        if (heap.size() > k) {
            ~~~~~~~~~~~ ^ ~
    5 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/productquantizer.cc -o build/temp.macosx-10.7-x86_64-3.6/src/productquantizer.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/productquantizer.cc:246:22: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<float, std::__1::allocator<float> >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (auto i = 0; i < centroids_.size(); i++) {
                       ~ ^ ~~~~~~~~~~~~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/args.cc -o build/temp.macosx-10.7-x86_64-3.6/src/args.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    src/args.cc:93:23: warning: comparison of integers of different signs: 'int' and 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int ai = 2; ai < args.size(); ai += 2) {
                       ~~ ^ ~~~~~~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/quantmatrix.cc -o build/temp.macosx-10.7-x86_64-3.6/src/quantmatrix.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/matrix.cc -o build/temp.macosx-10.7-x86_64-3.6/src/matrix.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/meter.cc -o build/temp.macosx-10.7-x86_64-3.6/src/meter.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/vector.cc -o build/temp.macosx-10.7-x86_64-3.6/src/vector.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/miniconda3/include -arch x86_64 -I/miniconda3/include -arch x86_64 -I/miniconda3/include/python3.6m -I/Users/ruanxiaoyi/.local/include/python3.6m -Isrc -I/miniconda3/include/python3.6m -c src/densematrix.cc -o build/temp.macosx-10.7-x86_64-3.6/src/densematrix.o -stdlib=libc++ -DVERSION_INFO="0.8.22" -std=c++14 -fvisibility=hidden
    g++ -bundle -undefined dynamic_lookup -L/miniconda3/lib -arch x86_64 -L/miniconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/python/fastText/pybind/fasttext_pybind.o build/temp.macosx-10.7-x86_64-3.6/src/dictionary.o build/temp.macosx-10.7-x86_64-3.6/src/main.o build/temp.macosx-10.7-x86_64-3.6/src/fasttext.o build/temp.macosx-10.7-x86_64-3.6/src/utils.o build/temp.macosx-10.7-x86_64-3.6/src/model.o build/temp.macosx-10.7-x86_64-3.6/src/loss.o build/temp.macosx-10.7-x86_64-3.6/src/productquantizer.o build/temp.macosx-10.7-x86_64-3.6/src/args.o build/temp.macosx-10.7-x86_64-3.6/src/quantmatrix.o build/temp.macosx-10.7-x86_64-3.6/src/matrix.o build/temp.macosx-10.7-x86_64-3.6/src/meter.o build/temp.macosx-10.7-x86_64-3.6/src/vector.o build/temp.macosx-10.7-x86_64-3.6/src/densematrix.o -o build/lib.macosx-10.7-x86_64-3.6/fasttext_pybind.cpython-36m-darwin.so
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1

    ----------------------------------------
Command "/miniconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/pip-req-build-i2z3pyel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/pip-record-yg0h6noh/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/tz/msp_r50s03s59q40s_gmhx600000gn/T/pip-req-build-i2z3pyel/

And my environment is

Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.14.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/local/include -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/ruanxiaoyi/Downloads/fastText-master -ferror-limit 19 -fmessage-length 204 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.14.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ -
clang -cc1 version 10.0.0 (clang-1000.10.44.4) default target x86_64-apple-darwin18.2.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Library/Developer/CommandLineTools/usr/include/c++/v1
 /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks (framework directory)

Any suggestion for this problem?

@infinite-Joy
Copy link
Contributor

Looks similar to this issue pandas-dev/pandas#23424

People are saying that upgrading xcode might be the solution xcode-select --install

@rxy1212
Copy link
Author

rxy1212 commented Mar 12, 2019

Thanks, but when I run xcode-select --install, it just got xcode-select: error: command line tools are already installed, use "Software Update" to install updates

@infinite-Joy
Copy link
Contributor

Thanks, but when I run xcode-select --install, it just got xcode-select: error: command line tools are already installed, use "Software Update" to install updates

There are some strategies mentioned here. Let us know which one works for you https://stackoverflow.com/questions/34617452/how-to-update-xcode-from-command-line. Is it possible to update Xcode using the app store?

@lixtjoanna
Copy link

Hello, I am facing the similar issue here as well. 3 days ago I was able to install, however today I am getting this error. At the main time, my Ubuntu system also failed with similar error logs. Could this be some general issue other than just a mac OS problem

@rxy1212
Copy link
Author

rxy1212 commented Mar 26, 2019

Do you find any solution?

@lixtjoanna
Copy link

For my Mac, export MACOSX_DEPLOYMENT_TARGET=10.9 helped.
For my linux machine, I download the zip from release and did the install and somehow it mysteriously starts to work....

@wangzijian0x7C6
Copy link

For my Mac, export MACOSX_DEPLOYMENT_TARGET=10.9 helped.
For my linux machine, I download the zip from release and did the install and somehow it mysteriously starts to work....

Works for me!

@EdouardGrave EdouardGrave added Build build issue Python related to python bindings labels Apr 4, 2019
@Celebio
Copy link
Member

Celebio commented Apr 4, 2019

Hi,
Can you check if ebf8074 fixes the issue (without having to set the env. variable manually) ?

Thank you for reporting!
Onur

@vidyg
Copy link

vidyg commented Apr 10, 2019

For me it was both setting:

export CC=/usr/bin/clang++
export CXX=/usr/bin/clang++

and
export MACOSX_DEPLOYMENT_TARGET=10.9

@Celebio
Copy link
Member

Celebio commented Apr 16, 2019

Hi @vidyg ,
Does it work if you only set CC and CXX (without setting MACOSX_DEPLOYMENT_TARGET) ?

Regards,
Onur

@vidyg
Copy link

vidyg commented Apr 16, 2019

Hi @Celebio I honestly can't remember, but i'm pretty sure i needed it. I remember the warning/ error showing. Can't remember now if it was a warning or error.

@Celebio
Copy link
Member

Celebio commented Apr 17, 2019

Ok I will close the issue for now. If anyone notices he/she have to use export MACOSX_DEPLOYMENT_TARGET=10.9 to make it work, please re-open this issue and do not do the workaround so we can figure out what is going on together.

Regards,
Onur

@lucacerone
Copy link

Hi, any other news with this? I tried all of the above but nothing seems to work for me...
Thanks in advance for the help!

@Celebio
Copy link
Member

Celebio commented Sep 26, 2019

Hi @lucacerone ,
What is your problem exactly? Do you observe the same initial issue?

Regards,
Onur

@lucacerone
Copy link

Hi Onur, thanks for the quick reply, in my case I think the issue was caused by an Xcode update. For some reason Clang was looking at libraries in a folder MacOSX10.14.sdk instead of MacOSX.sdk. Because of the update I had MaxOSX10.15.sdk linking to MacOSX.sdk I solved the issue creating a symlink to MacOSX.sdk called MacOSX10.14.sdk (a dirty solution I know). I am far from my laptop, but let me know if you need the full paths.

I don't think this was a fasttext issue though.

Thanks again!

@Celebio
Copy link
Member

Celebio commented Sep 30, 2019

Hi @lucacerone ,
Thank you for talking about your case here, it might help other users in the same situation in the future.

Regards,
Onur

@joanacfcampos
Copy link

Hi
I was was having the same issue, but I couldn't find the solution here. I will just post what worked for me since it might help other people.

I was trying to install fasttext on MacOS 10.15.1 using the command 'pip install fasttext'

I installed xcode-select ('xcode-select -- install) as sugested above and then put it in the correct folder:
sudo xcode-select -switch /Library/Developer/CommandLineTools/

I noticed that was the issue when I run 'git clone https://github.com/facebookresearch/fastText.git' and got 'git: error: unable to locate xcodebuild'

Hope it helps
Regards
Joana

@Carolyn95
Copy link

Hi
I was was having the same issue, but I couldn't find the solution here. I will just post what worked for me since it might help other people.

I was trying to install fasttext on MacOS 10.15.1 using the command 'pip install fasttext'

I installed xcode-select ('xcode-select -- install) as sugested above and then put it in the correct folder:
sudo xcode-select -switch /Library/Developer/CommandLineTools/

I noticed that was the issue when I run 'git clone https://github.com/facebookresearch/fastText.git' and got 'git: error: unable to locate xcodebuild'

Hope it helps
Regards
Joana

Thank you Joana, your solution saves plenty of my time!

@MonilBhavsar
Copy link

Hi Onur, thanks for the quick reply, in my case I think the issue was caused by an Xcode update. For some reason Clang was looking at libraries in a folder MacOSX10.14.sdk instead of MacOSX.sdk. Because of the update I had MaxOSX10.15.sdk linking to MacOSX.sdk I solved the issue creating a symlink to MacOSX.sdk called MacOSX10.14.sdk (a dirty solution I know). I am far from my laptop, but let me know if you need the full paths.

I don't think this was a fasttext issue though.

Thanks again!

How did you do that, I think I have the same issue.

@lucacerone
Copy link

Hi Onur, thanks for the quick reply, in my case I think the issue was caused by an Xcode update. For some reason Clang was looking at libraries in a folder MacOSX10.14.sdk instead of MacOSX.sdk. Because of the update I had MaxOSX10.15.sdk linking to MacOSX.sdk I solved the issue creating a symlink to MacOSX.sdk called MacOSX10.14.sdk (a dirty solution I know). I am far from my laptop, but let me know if you need the full paths.
I don't think this was a fasttext issue though.
Thanks again!

How did you do that, I think I have the same issue.

I can't remember exactly. If you haven't yet, I would give a try to the xcode-select solution proposed above.

If that doesn't work, search for the location of a file called MacOSX.sdk. In the parent folder you should see also a series os symbolic links to MacOSX.sdk. If the one you need to create a new symbolic link, check for the command ln.

I am sorry I can't help more, but it passed quite a lot of time.

@MonilBhavsar
Copy link

Hi Onur, thanks for the quick reply, in my case I think the issue was caused by an Xcode update. For some reason Clang was looking at libraries in a folder MacOSX10.14.sdk instead of MacOSX.sdk. Because of the update I had MaxOSX10.15.sdk linking to MacOSX.sdk I solved the issue creating a symlink to MacOSX.sdk called MacOSX10.14.sdk (a dirty solution I know). I am far from my laptop, but let me know if you need the full paths.
I don't think this was a fasttext issue though.
Thanks again!

How did you do that, I think I have the same issue.

I can't remember exactly. If you haven't yet, I would give a try to the xcode-select solution proposed above.

If that doesn't work, search for the location of a file called MacOSX.sdk. In the parent folder you should see also a series os symbolic links to MacOSX.sdk. If the one you need to create a new symbolic link, check for the command ln.

I am sorry I can't help more, but it passed quite a lot of time.

Ok thanks will check this out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build build issue Python related to python bindings
Projects
None yet
Development

No branches or pull requests