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 Error shows the version wrong #467

Closed
gaoshan2006 opened this issue Nov 15, 2016 · 4 comments
Closed

CMake Error shows the version wrong #467

gaoshan2006 opened this issue Nov 15, 2016 · 4 comments
Labels

Comments

@gaoshan2006
Copy link

I installed gflags from source code. And gflags was built in /home/local/. Then when I compiled Paddle, I was meeting the following errors. I have verified the CMake version on my machine is 3.6 above 2.8, however it always shows "This file relies on consumers using CMake 2.8.12 or greater.", What's the reason ? Could you help me please ? Thanks

/////////////////////////////////////////////////////////////////////////////////////////////////////////
cmake .. -DWITH_GPU=OFF -DWITH_DOC=OFF

-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
CMake Error at /home/local/lib/cmake/gflags/gflags-targets.cmake:66 (message):
This file relies on consumers using CMake 2.8.12 or greater.
Call Stack (most recent call first):
/home/local/lib/cmake/gflags/gflags-config.cmake:10 (include)
cmake/FindGflags.cmake:318 (find_package)
CMakeLists.txt:27 (find_package)
////////////////////////////////////////////////////////////////////////////////////////////////////////////

@hedaoyuan
Copy link
Contributor

Have not encountered such a problem.
Try modify the first line of the CMakeLists.txt file to cmake_minimum_required (VERSION 2.8.12).
By the way, what version of gflags you use?

@gaoshan2006
Copy link
Author

The version of gflags source code I got from github is 1.8.3.1
I modified CMakeLists.txt file, by changing "cmake_minimum_required (VERSION 2.8) " to "cmake_minimum_required (VERSION 2.8.12) "

Then the error shows:
cmake .. -DWITH_GPU=OFF -DWITH_DOC=OFF
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 2.8.12 or higher is required. You are running version 2.8.11

But actually, when I check cmake version ("cmake -version"), the result is :
cmake version 3.6.20160704-g75232

@hedaoyuan
Copy link
Contributor

hedaoyuan commented Nov 15, 2016

I think the problem may be in your cmake environment.
In my environment, cmake -version show cmake version 3.2.2.
If set cmake_minimum_required(VERSION 3.3), the following error will be reported.

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.3 or higher is required. You are running version 3.2.2

If set the VERSION less than 3.2, no error reported.

@gaoshan2006
Copy link
Author

Make sense. It looks the problem is from my cmake. Thanks a lot !

zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this issue Sep 25, 2019
* add_api_cn (PaddlePaddle#437)

* add gpu benchmark page (PaddlePaddle#436)

* add gpu benchmark

* fix comments

* add chinese link in gen_doc.py (PaddlePaddle#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py

* Update mobile doc (PaddlePaddle#440)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_mobile_doc

* Update book commit (PaddlePaddle#438)

* update_en_structure

* update_Paddle_commitid

* delete_DS

* update_book_commit_id

* update_api_rst

* Adjust structure of advanced usage (PaddlePaddle#442)

* adjust_structure_of_advanced_usage

* Update paddle_gpu_benchmark.md

* adjust_toctree_hidden

* fix_api_guide

* Update index.rst

* fix deadlinkes (PaddlePaddle#443)

* add_toctree (PaddlePaddle#445)

* adjust_beginners_structure (PaddlePaddle#446)

* adjust_beginners_structure

* Update index.rst

* update install_doc for python3 (PaddlePaddle#418)

* update install_doc for python3

* update python3.5+ info,test=develop

* fix review, test=develop

* fix_pic (PaddlePaddle#447)

* delete en2zn link

* update lod_tensor

* 1207

 1.english api reference links removed
2. formatted

* update transpiler

* update profilse_cn

* Update docker-image instroduce, test=develop (PaddlePaddle#459)

* fix_bug (PaddlePaddle#460)

* [cp2dev]Add avx info 1.1 (PaddlePaddle#279) (PaddlePaddle#451)

* Add avx info 1.1 (PaddlePaddle#279)

* refine avx info representation

* refine avx info representation

* refine avx info representation

* updatetoavx

* fix_AVX

* update_en_api (PaddlePaddle#461)

* update api guides for cn (PaddlePaddle#462)

* Update commit_id of Paddle (PaddlePaddle#463)

* update_en_api

* update_again

* Fix bug (PaddlePaddle#465)

* update_en_api

* update_again

* bug_fix

* fix_2nd

* add_release_note
thisjiang pushed a commit to thisjiang/Paddle that referenced this issue Oct 28, 2021
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this issue Dec 9, 2021
* Add NeZha Language Model

Add NeZha Language Model

* Add NeZha model

Add NeZha model

Co-authored-by: yingyibiao <yyb0576@163.com>
wwbitejotunn pushed a commit to wwbitejotunn/Paddle that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants