tomita-parser
tomita-parser copied to clipboard
Не собирается в OS X High Sierra 10.13.2
На стандартных gcc и g++, поставляемых вместе с XCode, cmake падает с ошибкой:
cmake ../src/ -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at cmake/include/global.cmake:18 (cmake_policy):
The OLD behavior for policy CMP0002 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/global.cmake:19 (cmake_policy):
The OLD behavior for policy CMP0000 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/global.cmake:20 (cmake_policy):
The OLD behavior for policy CMP0005 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/buildrules.cmake:4 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
cmake/include/global.cmake:106 (INCLUDE)
CMakeLists.txt:27 (INCLUDE)
-- Looking for __PATHSCALE__
-- Looking for __PATHSCALE__ - not found
-- Checking to see if CXX compiler accepts flag -mpopcnt
-- Checking to see if CXX compiler accepts flag -mpopcnt - yes
-- Checking to see if CXX compiler accepts flag -mssse3
-- Checking to see if CXX compiler accepts flag -mssse3 - yes
-- Checking to see if CXX compiler accepts flag -msse3
-- Checking to see if CXX compiler accepts flag -msse3 - yes
-- Checking to see if CXX compiler accepts flag -msse2
-- Checking to see if CXX compiler accepts flag -msse2 - yes
-- Checking to see if CXX compiler accepts flag -msse
-- Checking to see if CXX compiler accepts flag -msse - yes
-- Checking to see if CXX compiler accepts flag -mno-sse
-- Checking to see if CXX compiler accepts flag -mno-sse - yes
CMake Error at cmake/include/tools.cmake:417 (MESSAGE):
tools.cmake: libsupc++.a/libsupc++.a doesn't exist (with positive
USE_STATIC_CPP_RUNTIME)
Call Stack (most recent call first):
cmake/include/global.cmake:167 (INCLUDE)
CMakeLists.txt:27 (INCLUDE)
-- Cached: CMAKE_BUILD_TYPE[Release]
CMake Error at cmake/include/dtmk.cmake:192 (IF):
if given arguments:
"CMAKE_SYSTEM" "MATCHES" "FreeBSD-10.0" "OR" "VERSION_GREATER" "5.3"
Unknown arguments specified
Call Stack (most recent call first):
cmake/include/buildrules.cmake:1945 (EXEC_DTMK)
cmake/include/buildrules.cmake:1257 (ADD_LIBRARY_EX)
contrib/tools/bison/gnulib/CMakeLists.txt:222 (END)
-- Configuring incomplete, errors occurred!
See also "/Users/desoulter/workspace/tomita-parser/build/CMakeFiles/CMakeOutput.log".
See also "/Users/desoulter/workspace/tomita-parser/build/CMakeFiles/CMakeError.log".
Стандартный gcc:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
После установки gcc через brew install и указание конкретной версии компилятора для cmake
export CC=/usr/local/Cellar/gcc/7.3.0/bin/gcc-7
export CXX=/usr/local/Cellar/gcc/7.3.0/bin/g++-7
cmake генерирует необходимые файлы, но во время сборки make
падает с ошибкой:
/Users/desoulter/workspace/tomita-parser/build/FactExtract/Parser/common/textminerconfig.pb.cc: In static member function 'static const TTextMinerConfig& TTextMinerConfig::default_instance()':
/Users/desoulter/workspace/tomita-parser/build/FactExtract/Parser/common/textminerconfig.pb.cc:2148:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (default_instance_ == NULL) protobuf_AddDesc_FactExtract_2fParser_2fcommon_2ftextminerconfig_2eproto(); return *default_instance_;
^~
/Users/desoulter/workspace/tomita-parser/build/FactExtract/Parser/common/textminerconfig.pb.cc:2148:111: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if (default_instance_ == NULL) protobuf_AddDesc_FactExtract_2fParser_2fcommon_2ftextminerconfig_2eproto(); return *default_instance_;
^~~~~~
[ 66%] Linking CXX static library libFactExtract-Parser-common.a
[ 66%] Built target FactExtract-Parser-common
[ 66%] Building "/Users/desoulter/workspace/tomita-parser/build/library/pire/re_parser.cpp"+"/Users/desoulter/workspace/tomita-parser/build/library/pire/re_parser.h" with bison
/bin/sh: line 1: 50631 Illegal instruction: 4 ../../contrib/tools/bison/bison/bison -v --m4=/Users/desoulter/workspace/tomita-parser/build/contrib/tools/bison/m4/m4 -d -o /Users/desoulter/workspace/tomita-parser/build/library/pire/re_parser.cpp /Users/desoulter/workspace/tomita-parser/src/contrib/libs/pire/pire/re_parser.y
make[2]: *** [library/pire/re_parser.cpp] Error 132
make[1]: *** [library/pire/CMakeFiles/library-pire.dir/all] Error 2
make: *** [all] Error 2
Если запустить последнюю команду отдельно:
./contrib/tools/bison/bison/bison -v --m4=/Users/desoulter/workspace/tomita-parser/build/contrib/tools/bison/m4/m4 -d -o /Users/desoulter/workspace/tomita-parser/build/library/pire/re_parser.cpp /Users/desoulter/workspace/tomita-parser/src/contrib/libs/pire/pire/re_parser.y
[1] 50706 illegal hardware instruction ./contrib/tools/bison/bison/bison -v -d -o
Так же не помогает установка свежих bison и m4 через brew install.
На всякий случай валидный выхлоп CMAKE с насильно указанными новыми версиями gcc:
cmake ../src/ -DCMAKE_BUILD_TYPE=Release master
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/Cellar/gcc/7.3.0/bin/gcc-7
-- Check for working C compiler: /usr/local/Cellar/gcc/7.3.0/bin/gcc-7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/Cellar/gcc/7.3.0/bin/g++-7
-- Check for working CXX compiler: /usr/local/Cellar/gcc/7.3.0/bin/g++-7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at cmake/include/global.cmake:18 (cmake_policy):
The OLD behavior for policy CMP0002 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/global.cmake:19 (cmake_policy):
The OLD behavior for policy CMP0000 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/global.cmake:20 (cmake_policy):
The OLD behavior for policy CMP0005 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:27 (INCLUDE)
CMake Deprecation Warning at cmake/include/buildrules.cmake:4 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
cmake/include/global.cmake:106 (INCLUDE)
CMakeLists.txt:27 (INCLUDE)
-- Looking for __PATHSCALE__
-- Looking for __PATHSCALE__ - not found
-- Checking to see if CXX compiler accepts flag -mpopcnt
-- Checking to see if CXX compiler accepts flag -mpopcnt - yes
-- Checking to see if CXX compiler accepts flag -mssse3
-- Checking to see if CXX compiler accepts flag -mssse3 - yes
-- Checking to see if CXX compiler accepts flag -msse3
-- Checking to see if CXX compiler accepts flag -msse3 - yes
-- Checking to see if CXX compiler accepts flag -msse2
-- Checking to see if CXX compiler accepts flag -msse2 - yes
-- Checking to see if CXX compiler accepts flag -msse
-- Checking to see if CXX compiler accepts flag -msse - yes
-- Checking to see if CXX compiler accepts flag -mno-sse
-- Checking to see if CXX compiler accepts flag -mno-sse - yes
-- Cached: CMAKE_BUILD_TYPE[Release]
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/desoulter/workspace/tomita-parser/build
На этом я сдался, не силён в gcc и прочем, крайне необходима инструкция по сборке под OS X от мейнтейнера.
Спасибо.
Удалось решить?
Хотелось бы собрать под os x но пока что тоже не получилось . Я решил проблему с помощью docker
попробуйте скачать бинарник http://download.cdn.yandex.net/tomita/tomita-mac.bz2