首页 > 解决方案 > 如何从源代码编译 AutoDock Vina?

问题描述

我正在尝试从这个网站编译一个名为 AutoDock Vina 的程序:http: //vina.scripps.edu/manual.html#build。我不能直接使用预构建的二进制文件,因为我必须更改源代码中的一些参数。

我安装了 build-essential、g++ 和 boost。我下载了 autodock_vina_1_1_2.tgz 并解压。

我试图按照网站上的说明进行操作,但失败了。我在以下位置更改了 Makefile autodock_vina_1_1_2/build/linux/debug/Makefile

BASE=/usr/lib/python2.7/dist-packages/
BOOST_VERSION=1.67.0
BOOST_INCLUDE = $(BASE)/include
C_PLATFORM=-static -pthread
GPP=/usr/bin/g++
C_OPTIONS= -g
BOOST_LIB_VERSION=

include ../../makefile_common

注:我也根据上面的安装信息测试了BASE=/usror或任意逻辑组合/usr/libexec


然后当make我遇到此错误消息时:

(base) root@kali:~/Desktop/share/autodock_vina_1_1_2/build/linux/debug# make
/usr/bin/g++ -static -pthread -ansi -Wno-long-long -g -I /usr/lib/python2.7/dist-packages//include  -I ../../../src/lib -o main.o -c ../../../src/main/main.cpp
In file included from /usr/include/boost/assert.hpp:58,
                 from /usr/include/boost/random/uniform_smallint.hpp:22,
                 from /usr/include/boost/random.hpp:86,
                 from ../../../src/lib/random.h:26,
                 from ../../../src/lib/quaternion.h:30,
                 from ../../../src/lib/conf.h:28,
                 from ../../../src/lib/tree.h:26,
                 from ../../../src/lib/model.h:29,
                 from ../../../src/lib/parse_pdbqt.h:26,
                 from ../../../src/main/main.cpp:33:
../../../src/lib/quaternion.h: In function ‘void quaternion_normalize(qt&)’:
../../../src/lib/quaternion.h:79:9: error: ‘quaternion_is_normalized’ was not declared in this scope; did you mean ‘quaternion_normalize’?
   79 |  assert(quaternion_is_normalized(q));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/lib/quaternion.h: In function ‘void quaternion_normalize_approx(qt&, fl)’:
../../../src/lib/quaternion.h:91:16: error: ‘quaternion_is_normalized’ was not declared in this scope; did you mean ‘quaternion_normalize’?
   91 |         assert(quaternion_is_normalized(q));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/main/main.cpp: In function ‘path make_path(const string&)’:
../../../src/main/main.cpp:50:44: error: no matching function for call to ‘boost::filesystem::path::path(const string&, bool (&)(const string&))’

那么,如何从源代码编译 AutoDock Vina?

标签: c++linuxboostmakefile

解决方案


推荐阅读