I'm trying to build cleos separately from the eos directory.

bernardo@instance-1:~$ cp -r eos/programs/cleos/ ~/cleos
bernardo@instance-1:~$ cd cleos/
bernardo@instance-1:~/cleos$ cmake .
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Intl: /usr/include  
CMake Error at CMakeLists.txt:40 (install):
  install TARGETS given no RUNTIME DESTINATION for executable target         "cleos".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be     lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/bernardo/cleos/CMakeFiles/CMakeOutput.log".

Here's the full log: https://pastebin.com/1Z26uVx3

I guess the cleos/CMakeLists.txt file needs some adaptations? This is how it looks like:

bernardo@instance-1:~$ cat cleos/CMakeLists.txt 
add_executable( cleos main.cpp httpc.cpp help_text.cpp localize.hpp config.hpp CLI11.hpp)
if( UNIX AND NOT APPLE )
  set(rt_library rt )
endif()

find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
    message( STATUS "Found gperftools; compiling with TCMalloc")
    list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
endif()

if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../.git)
  find_package(Git)
  if(GIT_FOUND)
    execute_process(
      COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.."
      OUTPUT_VARIABLE "cleos_BUILD_VERSION"
      ERROR_QUIET
      OUTPUT_STRIP_TRAILING_WHITESPACE)
    message(STATUS "Git commit revision: ${cleos_BUILD_VERSION}")
  else()
    set(cleos_BUILD_VERSION 0)
  endif()
else()
  set(cleos_BUILD_VERSION 0)
endif()

find_package(Intl REQUIRED)

set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
set(LOCALEDOMAIN cleos)
configure_file(config.hpp.in config.hpp ESCAPE_QUOTES)

target_include_directories(cleos PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries( cleos
                       PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} )

install( TARGETS
   cleos

   RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
   LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
   ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
)

I guess this error log is pretty much self-explaining:

A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file.(CMakeLists.txt)

This became an error because the parental EOS CMakeLists.txt has this line, so child lists do not require it to be present when being built together.

  • I cleaned the directory, added the line as you suggested and still get the RUNTIME DESTINATION error – bernardo rodrigues Aug 9 at 19:22
  • also, that was a Warning... not an Error – bernardo rodrigues Aug 9 at 19:23
  • Yeah sorry for that, haven't seen the error itself. Maybe you could check this out: stackoverflow.com/questions/30794583/… as it seems that CMakelists.txt is messed up – Lonkly Aug 9 at 21:04
  • 1
    that's a good lead, I'll get into it. thanks! – bernardo rodrigues Aug 10 at 16:12

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.