CMake 找不到 Curses

发布于 2024-10-12 03:27:48 字数 811 浏览 7 评论 0原文

我正在尝试从 www 编译 openlase 库.marcansoft.com 并遇到了 CMake 问题。 CMake 返回一个错误,指出它找不到 Curses,经过大量查看后,我仍然对问题所在感到困惑。我已检查是否安装了各种 ncurses 软件包,但错误仍然存​​在。我对 CMake 不太熟悉,但我能够解决在此之前出现的其他依赖问题。以下是终端的输出。

tom@SILVER:~/dev/openlase$ cmake ./
-- Found JACK 
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  examples/27c3_slides/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!

任何帮助将不胜感激。

  • 汤姆

I am trying to compile the openlase library from www.marcansoft.com and have been running into problems with CMake. CMake is returning an error stating that it cannot find Curses, and after a lot of looking I am still stumped as to what the issue is. I have checked that I have the various ncurses packages installed but still the error persists. Im not very familiar with CMake but I was able to resolve other dependency issues that arose before this one. The following is the output in terminal.

tom@SILVER:~/dev/openlase$ cmake ./
-- Found JACK 
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  examples/27c3_slides/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!

Any help would be greatly appreciated.

  • Tom

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

太阳男子 2024-10-19 03:27:48

这是解决我在 Ubuntu 12.04 x86_64 (64 位)上的问题的方法(感谢 syslogic )

无论出于何种原因(可能是凌晨 1:00?)设置 CURSES_USE_NCURSES TRUE 似乎不起作用。所以我就去做了一份黑客工作。

验证其已安装:

$ sudo apt-get install libncurses5-dev

您将看到以下内容:libncurses5-dev 已经是最新版本。

因此找到该库并包含。

$locate libncurses.so

注意位置,我的:/usr/lib/x86_64-linux-gnu/libncurses.so

$locatecurses.h

再次注意位置,我的:
/usr/include

在: /Modules/FindCurses.cmake

添加在顶部,就在注释之后,

set( CMAKE_INCLUDE_PATH "/usr/include")
set( CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu/libncurses.so")

然后冲洗重复构建过程

./bootstrap
make 
sudo make install

ccmake 现在应该被安装。

你的朋友,

Here is what fixed my problems on Ubuntu 12.04 x86_64 (64 bit) (Thanks syslogic )

For whatever reason (1:00 am maybe?) setting CURSES_USE_NCURSES TRUE didn't seem to work. So I went with a hack job.

Verified it's installed:

$ sudo apt-get install libncurses5-dev

You will see something to the effect: libncurses5-dev is already the newest version.

So find the library and include.

$ locate libncurses.so

Note location, mine: /usr/lib/x86_64-linux-gnu/libncurses.so

$ locate curses.h

Note location again, mine:
/usr/include

In: <cmake source dir>/Modules/FindCurses.cmake

add at the top, right after the comments

set( CMAKE_INCLUDE_PATH "/usr/include")
set( CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu/libncurses.so")

then rinse repeat the build process

./bootstrap
make 
sudo make install

ccmake should now be installed.

Your pal,

岁月无声 2024-10-19 03:27:48

修复此问题的另一种方法是将以下两行添加到 FindCurses.cmake(顶部):

set(CURSES_LIBRARY "/opt/lib/libncurses.so")
set(CURSES_INCLUDE_PATH "/opt/include")

Another way to fix it is to add these 2 lines to FindCurses.cmake (on top):

set(CURSES_LIBRARY "/opt/lib/libncurses.so")
set(CURSES_INCLUDE_PATH "/opt/include")
ゃ懵逼小萝莉 2024-10-19 03:27:48

暂时将 CURSES_USE_NCURSES 设置为 TRUE 以强制使用 NCURSES,而不是让 CMake 尝试查找 CURSES。

Temporarily set CURSES_USE_NCURSES to TRUE to force the use of NCURSES, rather than letting CMake try to find CURSES.

私藏温柔 2024-10-19 03:27:48

您是否也安装了相应的 -dev 软件包?在 Ubuntu(可能还有任何源自 Debian 的系统)上,它是 libncurses5-dev。其他系统可能使用 -devel 或类似标签。

编译器正在查找库标头,而标准包未提供这些标头。 (这些标头在运行时不需要,只有在编译软件时才需要,因此它们可以轻松地为不进行任何软件编译的系统删除多余的无用内容。)

Do you have the corresponding -dev package installed too? On Ubuntu (and probably anything derived from Debian) it is libncurses5-dev. Other systems may use -devel or similar tags.

The compiler is looking for the library headers, and those aren't provided by the standard package. (The headers aren't needed at runtime, only when compiling software, so they make it easy to remove extra useless stuff for systems that aren't going to be doing any software compiling.)

晨与橙与城 2024-10-19 03:27:48

openlase wiki 没有显示所有需要的包。检查 github 上的 wiki 页面以获取更新的说明。对于curses,缺少的软件包是libncurses5-dev sudo apt-get install libncurses5-dev

The openlase wiki was not displaying all of the needed packages. Check there wiki pages on github for updated instructions. For curses the missing package was libncurses5-dev sudo apt-get install libncurses5-dev

终遇你 2024-10-19 03:27:48

暂时将 CURSES_NEED_NCURSES 设置为 TRUE 以强制使用 NCURSES,而不是让 CMake 尝试查找 CURSES。

set(CURSES_NEED_NCURSES TRUE)

Curses_USE_NCURSES 由 FindCurses.cmake 在内部使用,因此设置不会有帮助。

Temporarily set CURSES_NEED_NCURSES to TRUE to force the use of NCURSES, rather than letting CMake try to find CURSES.

set(CURSES_NEED_NCURSES TRUE)

CURSES_USE_NCURSES is used by FindCurses.cmake internally, so setting that won't help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文