在RHEL上编译图形工具(Compiling graph

编程入门 行业动态 更新时间:2024-10-25 07:30:37
在RHEL上编译图形工具(Compiling graph-tool on RHEL)

我需要在RHEL6服务器上使用Python的图形工具。 系统管理员无法从他信任的存储库(或其他)安装boost库,所以已经安装了它

在/ usr /本地/ boost_1_59_0 /

里面有两个目录,boost /和libs /我正在将它们作为头文件和libs目录。

我下载了源代码:

wget http://downloads.skewed.de/graph-tool/graph-tool-2.2.44.tar.bz2

打开包装,我试过:

env CPPFLAGS='-I/home/foo/sw/include' LDFLAGS='-L/home/foo/sw/lib/' ./configure

但这并没有给出“./configure”本身的任何不同结果。 它说:

检查boostlib> = 1.53.0 ... configure:error:我们无法检测到boost库(版本1.53或更高版本)。 如果你有一个分阶段的boost库(还没有安装),请在你的环境中指定$ BOOST_ROOT,并且不要给--with-boost选项一个PATH。 如果您确定已经安装了增强功能,请查看您的版本号。 有关更多文档,请参阅http://randspringer.de/boost 。

我也试过:

\env BOOST_ROOT='/usr/local/boost_1_59_0' CPPFLAGS='-I/usr/local/boost_1_59_0/boost' LDFLAGS='-L/usr/local/boost_1_59_0/libs/' ./configure

但是也一样。

我也试过:

./configure --with-boost-libdir=/usr/local/boost_1_59_0/libs/ --with-boost=/usr/local/boost_1_59_0

我显然不知道自己在做什么。 这足以看出我做错了吗?

更新:

gcc版本: gcc(GCC)4.4.7 20120313(Red Hat 4.4.7-11)

从图形工具的失败配置中查看config.log,我发现了以下内容:

configure:17873: g++ -c -Wall -Wextra -ftemplate-backtrace-limit=0 -DNDEBUG -std=gnu++0x -ftemplate-depth-250 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -I/usr/include/python2.6 conftest.cpp >&5 cc1plus: error: unrecognized command line option "-ftemplate-backtrace-limit=0" configure:17873: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "graph-tool" | #define PACKAGE_TARNAME "graph-tool" | #define PACKAGE_VERSION "2.2.44" | #define PACKAGE_STRING "graph-tool 2.2.44" | #define PACKAGE_BUGREPORT "http://graph-tool.skewed.de/tickets" | #define PACKAGE_URL "http://graph-tool.skewed.de" | #define PACKAGE "graph-tool" | #define VERSION "2.2.44" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define STDC_HEADERS 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_PYTHON "2.6" | /* end confdefs.h. */ | | #include <boost/version.hpp> | | int | main () | { | | #if BOOST_VERSION >= 105300 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:17972: g++ -c -Wall -Wextra -ftemplate-backtrace-limit=0 -DNDEBUG -std=gnu++0x -ftemplate-depth-250 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -I/usr/include/python2.6 -I/include/boost-0 conftest.cpp >&5 cc1plus: error: unrecognized command line option "-ftemplate-backtrace-limit=0" configure:17972: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "graph-tool" | #define PACKAGE_TARNAME "graph-tool" | #define PACKAGE_VERSION "2.2.44" | #define PACKAGE_STRING "graph-tool 2.2.44" | #define PACKAGE_BUGREPORT "http://graph-tool.skewed.de/tickets" | #define PACKAGE_URL "http://graph-tool.skewed.de" | #define PACKAGE "graph-tool" | #define VERSION "2.2.44" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define STDC_HEADERS 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_PYTHON "2.6" | /* end confdefs.h. */ | | #include <boost/version.hpp> | | int | main () | { | | #if BOOST_VERSION >= 105300 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:17991: error: We could not detect the boost libraries (version 1.53 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.

I need to use Python's graph-tool on a RHEL6 server. The system administrator has not been able to install the boost library from a repository that he trusts (or whatever), so has installed it at

/usr/local/boost_1_59_0/

Inside are two directories, boost/ and libs/ which I am taking to be the header and libs directories.

I downloaded the source:

wget http://downloads.skewed.de/graph-tool/graph-tool-2.2.44.tar.bz2

And unpacking that, I tried:

env CPPFLAGS='-I/home/foo/sw/include' LDFLAGS='-L/home/foo/sw/lib/' ./configure

but that didn't give any different result than "./configure" by itself. It says:

checking for boostlib >= 1.53.0... configure: error: We could not detect the boost libraries (version 1.53 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.

I also tried:

\env BOOST_ROOT='/usr/local/boost_1_59_0' CPPFLAGS='-I/usr/local/boost_1_59_0/boost' LDFLAGS='-L/usr/local/boost_1_59_0/libs/' ./configure

but that got the same.

I also tried:

./configure --with-boost-libdir=/usr/local/boost_1_59_0/libs/ --with-boost=/usr/local/boost_1_59_0

I obviously don't know what I'm doing. Is this enough to see what I've done wrong?

Update:

gcc version: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

Looking at config.log from the graph-tool's failed configure, I find the following towards the end:

configure:17873: g++ -c -Wall -Wextra -ftemplate-backtrace-limit=0 -DNDEBUG -std=gnu++0x -ftemplate-depth-250 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -I/usr/include/python2.6 conftest.cpp >&5 cc1plus: error: unrecognized command line option "-ftemplate-backtrace-limit=0" configure:17873: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "graph-tool" | #define PACKAGE_TARNAME "graph-tool" | #define PACKAGE_VERSION "2.2.44" | #define PACKAGE_STRING "graph-tool 2.2.44" | #define PACKAGE_BUGREPORT "http://graph-tool.skewed.de/tickets" | #define PACKAGE_URL "http://graph-tool.skewed.de" | #define PACKAGE "graph-tool" | #define VERSION "2.2.44" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define STDC_HEADERS 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_PYTHON "2.6" | /* end confdefs.h. */ | | #include <boost/version.hpp> | | int | main () | { | | #if BOOST_VERSION >= 105300 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:17972: g++ -c -Wall -Wextra -ftemplate-backtrace-limit=0 -DNDEBUG -std=gnu++0x -ftemplate-depth-250 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -I/usr/include/python2.6 -I/include/boost-0 conftest.cpp >&5 cc1plus: error: unrecognized command line option "-ftemplate-backtrace-limit=0" configure:17972: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "graph-tool" | #define PACKAGE_TARNAME "graph-tool" | #define PACKAGE_VERSION "2.2.44" | #define PACKAGE_STRING "graph-tool 2.2.44" | #define PACKAGE_BUGREPORT "http://graph-tool.skewed.de/tickets" | #define PACKAGE_URL "http://graph-tool.skewed.de" | #define PACKAGE "graph-tool" | #define VERSION "2.2.44" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define STDC_HEADERS 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_PYTHON "2.6" | /* end confdefs.h. */ | | #include <boost/version.hpp> | | int | main () | { | | #if BOOST_VERSION >= 105300 | // Everything is okay | #else | # error Boost version is too old | #endif | | ; | return 0; | } configure:17991: error: We could not detect the boost libraries (version 1.53 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.

最满意答案

正如网站( https://graph-tool.skewed.de/download )所述,由于它是用C ++ 11编写的,因此需要GCC 4.8或更高版本来编译图形工具。 GCC 4.4不受支持。

As is stated in the website (https://graph-tool.skewed.de/download), you need GCC 4.8 or above to compile graph-tool, since it is written in C++11. GCC 4.4 is not supported.

更多推荐

本文发布于:2023-07-20 12:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1199650.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图形   工具   RHEL   Compiling   graph

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!