CESNET / libyang

YANG data modeling language library
BSD 3-Clause "New" or "Revised" License
368 stars 291 forks source link

cmake failure #18

Closed classcwnd closed 8 years ago

classcwnd commented 8 years ago

Hi all,

I can't use cmake with following errors, how can I resolve it? thanks!

eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake ..
-- The C compiler identification is GNU
-- 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
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PCRE: /usr/lib64/libpcre.so
CMake Error at CMakeLists.txt:109 (string):
  string does not recognize sub-command FIND

-- Found Doxygen: /tools/swdev/bin/doxygen
-- Could NOT find CMocka  (missing:  CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)
-- Configuring incomplete, errors occurred!
rkrejci commented 8 years ago

Hi, you have several options:

$ cmake -DENABLE_BUILD_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF ..

or

$ cmake -D CMAKE_BUILD_TYPE:String="Release" ..
classcwnd commented 8 years ago

Hi Radek,

Thank you for your quick response. I will have a try.

Regards, Yu

classcwnd commented 8 years ago

Hi Radek,

The problem is still there, I think the problem is that FIND is not recognized. How can I do?

CMake Error at CMakeLists.txt:109 (string):
  string does not recognize sub-command FIND
eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake -DENABLE_BUILD_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF ..
-- The C compiler identification is GNU
-- 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
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PCRE: /usr/lib64/libpcre.so
CMake Error at CMakeLists.txt:109 (string):
  string does not recognize sub-command FIND

-- Found Doxygen: /tools/swdev/bin/doxygen
-- Configuring incomplete, errors occurred!
eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake -D CMAKE_BUILD_TYPE:String="Release" ..
CMake Error at CMakeLists.txt:109 (string):
  string does not recognize sub-command FIND

-- Configuring incomplete, errors occurred!
rkrejci commented 8 years ago

What is your version of cmake (cmake --version)?

classcwnd commented 8 years ago

eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake --version cmake version 2.6-patch 4

rkrejci commented 8 years ago

Are you able to upgrade to 2.8.5?

classcwnd commented 8 years ago

Yes, I used module add cmake/2.8.10.2. and problem solved. Thanks you!

classcwnd commented 8 years ago

Failure again after last update, it said "string sub-command LENGTH requires two arguments." please help to fix it.

··· eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake --version cmake version 2.8.10.2 eyyuppg@eussjlx9012.sj.us.am.ericsson.se cmake -DENABLE_BUILD_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF .. CMake Error at CMakeLists.txt:110 (string): string sub-command LENGTH requires two arguments.

-- Configuring incomplete, errors occurred! eyyuppg@eussjlx9012.sj.us.am.ericsson.se ···

michalvasko commented 8 years ago

Hi, hopefully now it will be working, sorry.

Regards, Michal