RockyLinux8 Docker容器中编译graph-tool-2.77失败求助
在RockyLinux8 Docker容器中编译Graph Tool源码遇到的问题
背景
我正尝试在RockyLinux8 Docker容器中从源码编译Graph Tool。由于找不到适配我其他需求的特定Python版本的.rpm包,我从开发者仓库下载了graph-tool-release-2.77版本。
使用的Dockerfile
FROM docker.io/nvidia/cuda:12.0.1-cudnn8-devel-rockylinux8 AS base # Set root password and create a user within the container RUN echo 'root:pass' | chpasswd RUN useradd -m -s /bin/bash contuser && echo "contuser:pass" | chpasswd # Install python3.8 and make venv RUN dnf install --setopt=sslverify=false -y python38 python38-devel python38-pip RUN python3.8 -m venv /venvs/py38 --system-site-packages RUN . /venvs/py38/bin/activate && \ pip install --upgrade pip wheel setuptools && \ pip install numpy scipy matplotlib # Enable EPEL (CGAL-devel) and PowerTools (boost-python3-devel) packages. RUN dnf install --setopt=sslverify=false -y epel-release dnf-plugins-core RUN dnf config-manager --set-enabled powertools # Copy required packages and graphtool source COPY support_files/graph-tool-2.77/ /tmp/graph-tool-2.77/ # Download the packages needed for graph-tool build into RUN dnf install --setopt=sslverify=false -y ncurses libtool automake RUN dnf install --setopt=sslverify=false -y \ python3-devel boost-python3 boost-python3-devel boost-devel expat-devel CGAL-devel # Build graph-tool from source RUN . /venvs/py38/bin/activate && \ cd /tmp/graph-tool/ && \ ./configure PYTHON=/venvs/py38/bin/python3.8 \ --prefix=/venvs/py38 \ --with-python-module-path=/venvs/py38/lib/python3.8/site-packages \ --disable-cairo --disable-sparsehash && \ make -j 16 && make install # Entrypoint COPY docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"]
编译错误信息
执行make -j 16后,出现如下错误:
../template/base_vec.cc ^ src/graph/inference/uncertain/dynamics/lotka_volterra/base_vec.cc:1:1: error: expected unqualified-id before ‘.’ token ../template/base_vec.cc ^ src/graph/inference/uncertain/dynamics/pseudo_cising/base_vec.cc:1:1: error: expected unqualified-id before ‘.’ token ../template/base_vec.cc ^
编译过程会继续,但执行make install时会收到类似错误,导致库无法安装到虚拟环境的site-packages目录中。
相关工具版本
$ gcc --version gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22) $ aclocal --version aclocal (GNU automake) 1.16.1 $ autoconf --version autoconf (GNU Autoconf) 2.69 $ make --version GNU Make 4.2.1
额外问题
文件/graph-tool-2.77/src/graph/inference/blockmodel/graph_blockmodel_emat.hh的第125行左右存在错误,make提示min_load_factor未定义。我已注释该行代码_h.min_load_factor(.25);,编译可继续,但上述主问题仍未解决。
内容的提问来源于stack exchange,提问作者kdrr
相关产品推荐
相关产品推荐

