-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Building Cogutils on OS X 10.10.5 #18
Comments
Based on the warnings and error, I'm guessing you need to get a more modern compiler. Significant parts of opencog assume the c++11 standard from 2011, and parts of it might even be using the 2014 standard, not sure. Since the compiler is clang, and clang is fairly up-to-date, I'm guessing that maybe you need to either specify some extra compiler flag to clang, or you simply have an old version of clang (llvm) There some apple stuff here: so I guess a IF(COMPILER is CLANG) stanzas are needed. |
So, perhaps ‘clang -3.7’? David-Laxers-MacBook-Pro:~ davidlaxer$ clang --version David-Laxers-MacBook-Pro:~ davidlaxer$ port search clang clang-2.9 @2.9_15 (lang) clang-3.0 @3.0_14 (lang) clang-3.1 @3.1_9 (lang) clang-3.2 @3.2_4 (lang) clang-3.3 @3.3_8 (lang) clang-3.4 @3.4.2_9 (lang) clang-3.5 @3.5.2_6 (lang) clang-3.6 @3.6.1_2 (lang) clang-3.7 @3.7-r245076_1 (lang) clang-3.8 @3.8-r245076_1 (lang) clang_select @1.0 (sysutils) mpich-clang @3.1.4_1 (science, parallel, net) mpich-clang33 @3.1.4_1 (science, parallel, net) mpich-clang34 @3.1.4_1 (science, parallel, net) mpich-clang35 @3.1.4_1 (science, parallel, net) mpich-clang36 @3.1.4_1 (science, parallel, net) mpich-clang37 @3.1.4_1 (science, parallel, net) mpich-devel-clang @3.2b3_1 (science, parallel, net) mpich-devel-clang33 @3.2b3_1 (science, parallel, net) mpich-devel-clang34 @3.2b3_1 (science, parallel, net) mpich-devel-clang35 @3.2b3_1 (science, parallel, net) mpich-devel-clang36 @3.2b3_1 (science, parallel, net) mpich-devel-clang37 @3.2b3_1 (science, parallel, net) openmpi-clang @1.7.5_5 (science, parallel, net) openmpi-clang33 @1.7.5_5 (science, parallel, net) openmpi-clang34 @1.7.5_5 (science, parallel, net) openmpi-clang35 @1.7.5_5 (science, parallel, net) openmpi-clang36 @1.7.5_5 (science, parallel, net) openmpi-clang37 @1.7.5_5 (science, parallel, net) openmpi-devel-clang @1.9a1_34660 (science, parallel, net) openmpi-devel-clang33 @1.9a1_34660 (science, parallel, net) openmpi-devel-clang34 @1.9a1_34660 (science, parallel, net) openmpi-devel-clang35 @1.9a1_34660 (science, parallel, net) openmpi-devel-clang36 @1.9a1_34660 (science, parallel, net) openmpi-devel-clang37 @1.9a1_34660 (science, parallel, net) Found 36 ports.
|
Go to google, and type in: "clang c++11 support" you will get these links: http://clang.llvm.org/cxx_status.html read them. They probably contain the answers that you are looking for. |
Is this now resolved? |
If it is resolved, can you please supply an update to the |
This may be relevant: I am adding clang to the cmake file as I noticed that there is no such condition in cogutils. It will be part of the fix for #32 For now it appears that only gcc has been specified for cogutils. Additionally the compiler flags were set to c++0x and not c++11, which will be included in the pull request |
Closing, I assume that this is fixed. |
David-Laxers-MacBook-Pro:cogutils davidlaxer$ mkdir build
David-Laxers-MacBook-Pro:cogutils davidlaxer$ cd build
David-Laxers-MacBook-Pro:build davidlaxer$ cmake ..
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: Release
-- Looking for include file bfd.h
-- Looking for include file bfd.h - not found
-- BFD not found
-- Binutils-dev missing: No pretty stack-trace printing.
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- program_options
-- regex
-- serialization
-- system
-- thread
-- Boost version 105900 found.
-- Found PythonInterp: /users/davidlaxer/anaconda/bin/python (found version "2.7.10")
-- Looking for include file libiberty.h
-- Looking for include file libiberty.h - not found
-- IBERTY not found
-- Libiberty-dev missing: No pretty stack-trace printing.
CMake Warning (dev) at CMakeLists.txt:271 (ADD_CUSTOM_TARGET):
Policy CMP0037 is not set: Target names should not be reserved and should
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
The target name "test" is reserved or not valid for certain CMake features,
such as generator expressions, and may result in undefined behavior.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Doxygen: /opt/local/bin/doxygen (found version "1.8.9.1")
The following components will be built:
Doxygen - Code documentation.
Unit tests - Unit tests.
Util - General utility library.
The following components WILL NOT be built:
StackPrint - Pretty printing of stack traces.
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
cogutil
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/davidlaxer/cogutils/build
David-Laxers-MacBook-Pro:build davidlaxer$ make
Scanning dependencies of target cogutil
[ 4%] Building CXX object opencog/util/CMakeFiles/cogutil.dir/ansi.cc.o
[ 8%] Building C object opencog/util/CMakeFiles/cogutil.dir/backtrace-symbols.c.o
[ 13%] Building C object opencog/util/CMakeFiles/cogutil.dir/cluster.c.o
[ 17%] Building CXX object opencog/util/CMakeFiles/cogutil.dir/Config.cc.o
[ 21%] Building CXX object opencog/util/CMakeFiles/cogutil.dir/exceptions.cc.o
In file included from /Users/davidlaxer/cogutils/opencog/util/exceptions.cc:35:
In file included from /Users/davidlaxer/cogutils/opencog/util/Logger.h:36:
/Users/davidlaxer/cogutils/opencog/util/concurrent_queue.h:53:49: warning:
deleted function definitions are a C++11 extension [-Wc++11-extensions]
concurrent_queue(const concurrent_queue&) = delete; // disable copying
^
/Users/davidlaxer/cogutils/opencog/util/concurrent_queue.h:54:60: warning:
deleted function definitions are a C++11 extension [-Wc++11-extensions]
concurrent_queue& operator=(const concurrent_queue&) = delete; // no assign
^
/Users/davidlaxer/cogutils/opencog/util/concurrent_queue.h:72:22: warning:
rvalue references are a C++11 extension [-Wc++11-extensions]
void push(Element&& item)
^
3 warnings generated.
[ 26%] Building CXX object opencog/util/CMakeFiles/cogutil.dir/files.cc.o
/Users/davidlaxer/cogutils/opencog/util/files.cc:55:39: error: non-aggregate
type 'const std::vectorstd::string' cannot be initialized with an
initializer list
static const std::vectorstd::string paths =
^
1 error generated.
make[2]: *** [opencog/util/CMakeFiles/cogutil.dir/files.cc.o] Error 1
make[1]: *** [opencog/util/CMakeFiles/cogutil.dir/all] Error 2
make: *** [all] Error 2
David-Laxers-MacBook-Pro:build davidlaxer$
The text was updated successfully, but these errors were encountered: