[英]How can I specify the location of one file for program configuration without specifying the location for all C compilers in Unix?
I am trying to compile a program called Clustal Omega on my Unix operating system.我正在尝试在我的 Unix 操作系统上编译一个名为 Clustal Omega 的程序。 I do not have root access.
我没有root访问权限。 Clustal Omega requires argtable2 to compile.
Clustal Omega 需要 argtable2 才能编译。 I installed argtable2 in my home/user/bin/ and the Clustal Omega installation instructions suggest I use:
我在 home/user/bin/ 中安装了 argtable2,Clustal Omega 安装说明建议我使用:
./configure CFLAGS='~/bin/argtable2-13/include'
./configure CFLAGS='~/bin/argtable2-13/include'
Which specifies the location of the argtable2.h file.其中指定了 argtable2.h 文件的位置。
However, when I run this I get an error because it tries to retrieve gcc and g++ C compilers from that location as well, when actually they are in the root/bin/ which I cannot edit.但是,当我运行它时,我收到一个错误,因为它也尝试从该位置检索 gcc 和 g++ C 编译器,而实际上它们位于我无法编辑的 root/bin/ 中。
I've tried:我试过了:
./configure CC='/opt/apps/gcc/6.3.0/bin/gcc' CXX='/opt/apps/gcc/6.3.0/bin/g++' CFLAGS='~/bin/argtable2-13/include'
./configure CC='/opt/apps/gcc/6.3.0/bin/gcc' CXX='/opt/apps/gcc/6.3.0/bin/g++' CFLAGS='~/bin/argtable2-13/包括'
and和
./configure CFLAGS='~/bin/argtable2-13/include' LDFLAGS='~/bin/argtable2-13/lib'
./configure CFLAGS='~/bin/argtable2-13/include' LDFLAGS='~/bin/argtable2-13/lib'
which was suggested elsewhere.这是在其他地方提出的。 Neither are able to complete configuration.
两者都无法完成配置。
How can I specify the location of the argtable2-13 required files without specifying the location of all the C compilers?如何在不指定所有 C 编译器的位置的情况下指定 argtable2-13 所需文件的位置?
Thanks, everyone, but the following did not work either:谢谢大家,但以下也不起作用:
./configure CPPFLAGS='~/bin/argtable2-13/include'
./configure CPPFLAGS='~/bin/argtable2-13/include'
./configure --with-argtable2.h='~/bin/argtable2-13/include'
./configure --with-argtable2.h='~/bin/argtable2-13/include'
./configure --with-argtable2='~/bin/argtable2-13/include'
./configure --with-argtable2='~/bin/argtable2-13/include'
./configure CFLAGS='-I ~/bin/argtable2-13/include'
./configure CFLAGS='-I ~/bin/argtable2-13/include'
Not sure if this is the right thing to put in but I don't know which program to request --help from?不确定这是否适合放入,但我不知道从哪个程序请求 --help?
The error is:错误是:
checking argtable2.h presence... no
checking for argtable2.h... no
configure: error: Could not find argtable2.h. Try $ ./configure CFLAGS='-Iyour-argtable2-include-path
There are two main issues:主要有两个问题:
CFLAGS
needs to be the flags you want to add (not just the directory). CFLAGS
需要是您要添加的标志(不仅仅是目录)。 Similarly for LDFLAGS
.同样对于
LDFLAGS
。
Shell expansions (tilda prefix in this case) are not performed on the strings passed to configure
. Shell 扩展(在本例中为 tilda 前缀)不会对传递给
configure
的字符串执行。 Use expanded path.使用扩展路径。
Combining that the configure command should be:结合配置命令应该是:
./configure CFLAGS="-I /home/<username>/bin/include" LDFLAGS="-L /home/<username>/bin/lib"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.