CMake failure while detecting CXX compiler ABI info

Bug #1062450 reported by Karl Sackett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenCog
Won't Fix
High
Unassigned

Bug Description

OSX 10.8.2
CMake 2.8.9, installed through homebrew
g++ 4.7.1, installed through homebrew

~/src/opencog/bin CC=gcc-4.7 CXX=g++-4.7 cmake ..
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is unknown
-- 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/bin/gcc-4.7
-- Check for working C compiler: /usr/local/bin/gcc-4.7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-4.7
-- Check for working CXX compiler: /usr/local/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
CMake Error at /usr/local/Cellar/cmake/2.8.9/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:31 (TRY_COMPILE):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    '/Users/krs/src/opencog/bin/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin'

  Unable to find the executable at any of:

    /Users/krs/src/opencog/bin/CMakeFiles/CMakeTmp/cmTryCompileExec1271289124
    /Users/krs/src/opencog/bin/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1271289124
    /Users/krs/src/opencog/bin/CMakeFiles/CMakeTmp/Development/cmTryCompileExec1271289124

Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.9/share/cmake/Modules/CMakeTestCXXCompiler.cmake:64 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:20 (PROJECT)

-- Detecting CXX compiler ABI info - done
CMake Error at /usr/local/Cellar/cmake/2.8.9/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:48 (FILE):
  file STRINGS file
  "/Users/krs/src/opencog/bin/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin"
  cannot be read.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/2.8.9/share/cmake/Modules/CMakeTestCXXCompiler.cmake:64 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:20 (PROJECT)

Revision history for this message
linas (linasvepstas) wrote :

I'm confused, those messages are not from the opencog cmake. Opencog does not check the compiler, the compiler ABI, or any of those things. Are you sure you did not accidentally copy a CMakefile from somewhere else into the opencog tree?

When running cmake .. in opencog, you should see something like this:

build $ cmake ..
-- Found Boost::program_options
-- Found Boost::math
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- libcurl missing: needed for ubigraph module.
-- Expat XML parser found.
-- Guile was found.
-- HyperTable was not found. Make sure HYPERTABLE_LIBRARY and HYPERTABLE_INCLUDE_DIR are set.
-- Hypertable not found; the experimental distributed persistence DB needs it.
-- MPI was found.
-- OpenGL was found.
-- Found these protobuf libs: /usr/lib/libprotobuf.so
-- Protobuf was found.
-- Python libs found.
-- Cython executable not found.
-- SDL missing: needed for Spatial tools (MapExplorer, MapTools, etc.).
-- SDL_gfx missing: needed for Spatial tools (MapExplorer, MapTools, etc.).
-- Could NOT find TCL (missing: TCL_LIBRARY)
-- Could NOT find TCLTK (missing: TCL_LIBRARY TK_LIBRARY)
-- Could NOT find TK (missing: TK_LIBRARY)
-- TCL shell was found here: /usr/bin/tclsh
-- UnixODBC was found.
-- Valgrind Prefix:
-- VALGRIND was found.
-- VALGRIND devel headers found.
-- Found Xerces 2.8.0 -- /usr/lib/libxerces-c.so
-- XMLRPC was not found. Make sure the entries XMLRPC_* are set.
-- libxmlrpc missing: needed for ubigraph module.
-- Found these zmq libs: /usr/lib/libzmq.so
-- ZeroMQ was found.

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Doxygen not found, you won't be able to generate API documentation.

The following components will be built:
-----------------------------------------------
   AtomSpace - A weighted and typed hypergraph database.
   Attention - Agents for attention allocation dynamics.
   ComboReduct - Library for reduction of combo program trees.
   Dim. Embedding - Compute dimensional embedding of the AtomSpace.
   Embodiment - Architecture for embodiment.
   FeatureSelection - MOSES based feature selection tool.
   MOSES - Meta-Optimizing Semantic Evolutionary Search.
   SchemeBinding - Scheme bindings and shell.
   Server - The CogServer.
   Spatial - Spatial tools.
   SQL Persist - Interfaces for SQL persistance of the AtomSpace.
   Util - General utility library.
   WebInterface - Web server and REST API.

The following components WILL NOT be built:
-----------------------------------------------
   CythonBinding - Cython (python) bindings.
   Doxygen - Code documentation.
   Hypertable - HyperTable for scalable persistance (experimental).
   Ubigraph - Visualisation of the AtomSpace.

-- Configuring done
-- Generating done
-- Build files have been written to: build

Changed in opencog:
importance: Undecided → High
Revision history for this message
Karl Sackett (karlsackett) wrote : Re: [Bug 1062450] Re: CMake failure while detecting CXX compiler ABI info

On Fri, Oct 5, 2012 at 12:57 PM, linas <email address hidden> wrote:

> I'm confused, those messages are not from the opencog cmake. Opencog
> does not check the compiler, the compiler ABI, or any of those things.
> Are you sure you did not accidentally copy a CMakefile from somewhere
> else into the opencog tree?
>
> When running cmake .. in opencog, you should see something like this:
>
>
> build $ cmake ..
> -- Found Boost::program_options
> -- Found Boost::math
>

I have to use 'CC=gcc-4.7 CXX=g++-4.7 cmake ..', otherwise the build uses
the
default Mac gcc-4.2 and g++-4.2. When it works the cmake output is:

~/src/opencog/bin CC=gcc-4.7 CXX=g++-4.7 cmake ..
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- 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/bin/gcc-4.7
-- Check for working C compiler: /usr/local/bin/gcc-4.7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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/bin/g++-4.7
-- Check for working CXX compiler: /usr/local/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.51.0
-- Found the following Boost libraries:
...

If instead I use just 'cmake' and the default compilers I get this:

~/src/opencog/bin cmake ..
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 4.0.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/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.51.0
-- Found the following Boost libraries:
...

So cmake is checking the compilers and the ABI.

But this bug isn't consistent. I've been running and rerunning cmake all
morning. Twice I've triggered the bug, the rest of the time cmake performs
like it's supposed to. Right now it's working.

--
Karl Sackett <email address hidden>

Revision history for this message
linas (linasvepstas) wrote :

I really don't understand how this can happen; there is nothing in the
opencog cmake file that prints what you show. You can read the cmake file
yourself, its not that complicated. It simply does not check either the C
or the C++ compiler.

Revision history for this message
David Hart (dhart) wrote :

CMake checks the C compiler whether asked specifically to do so or not. I've just setup distcc at the OpenCog lab in Hong Kong and CMake is aware that it's being used - its use is specified using the CC and GXX environment variables, as Karl is doing to specify the use of specific versions of GCC and CXX compilers.

Revision history for this message
linas (linasvepstas) wrote :

During debugging, I tried that-- explicitly setting the environment
variables for the compilers, and I did not see this behavior; I've never
seen that check happen.

linas (linasvepstas)
Changed in opencog:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.