Skip to content
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

cmake failure #18

Closed
classcwnd opened this issue Feb 9, 2016 · 9 comments
Closed

cmake failure #18

classcwnd opened this issue Feb 9, 2016 · 9 comments

Comments

@classcwnd
Copy link

Hi all,

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

[email protected] 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
Copy link
Collaborator

rkrejci commented Feb 9, 2016

Hi,
you have several options:

  • install missing cmocka devel package, or
  • disable tests by the following options:
$ cmake -DENABLE_BUILD_TESTS=OFF -DENABLE_VALGRIND_TESTS=OFF ..

or

  • build libyang in Release mode where cmocka is not required (and tests are not available):
$ cmake -D CMAKE_BUILD_TYPE:String="Release" ..

@rkrejci rkrejci closed this as completed Feb 9, 2016
@classcwnd
Copy link
Author

Hi Radek,

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

Regards,
Yu

@classcwnd
Copy link
Author

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
[email protected] 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!
[email protected] 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 rkrejci reopened this Feb 9, 2016
@rkrejci
Copy link
Collaborator

rkrejci commented Feb 9, 2016

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

@classcwnd
Copy link
Author

[email protected] cmake --version
cmake version 2.6-patch 4

@rkrejci
Copy link
Collaborator

rkrejci commented Feb 9, 2016

Are you able to upgrade to 2.8.5?

@classcwnd
Copy link
Author

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

rkrejci added a commit that referenced this issue Feb 9, 2016
used FIND method in string operation is available from cmake 2.8.5

Relates to #18
@rkrejci rkrejci closed this as completed Feb 9, 2016
michalvasko added a commit that referenced this issue Feb 9, 2016
String FIND was replaced by 2.6 constructs with
similar functionality.

Fixes #18
michalvasko added a commit that referenced this issue Feb 9, 2016
String FIND was replaced by 2.6 constructs with
similar functionality.

Fixes #18
PavolVican pushed a commit that referenced this issue Feb 10, 2016
String FIND was replaced by 2.6 constructs with
similar functionality.

Fixes #18
@classcwnd
Copy link
Author

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

···
[email protected] cmake --version
cmake version 2.8.10.2
[email protected] 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!
[email protected]
···

@michalvasko
Copy link
Member

Hi,
hopefully now it will be working, sorry.

Regards,
Michal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants