如何安装这些库并使它们通过configure找到?

问题描述

我正在尝试使用waf来配置PLC(普朗克可能性)。运行./waf configure CC=gcc --cfitsio_lib=/opt/local/lib --cfitsio_include=/opt/local/include --lapack_mkl=${MKLROOT} --install_all_deps --pmc_prefix=/opt/local/后,我不断收到以下错误

Testing pyembed configuration                                              : Could not build a python embedded interpreter 
No suitable python distribution found 
Cause : 'The configuration Failed
(complete log in /Users/USER/Desktop/code/plc_3.0/plc-3.01/build/config.log)' 
Compilation will continue without it (but I strongly advise that you install it) 
Checking for library dl                                                    : yes 
checking for RTLD_DEFAULT in dl                                            : yes 
compile with debug option                                                  : OFF 
Checking for program 'pmc-config'                                          : not found 
Checking for library pmc                                                   : not found 

以下是config.log中与尝试有关的部分。看来上述错误是由于waf无法找到两个库引起的:intlplc。我的问题是1)如何检查库是否已安装? 2)如何正确安装它们以及如何使waf能够找到它们?当我运行locate plclocate intl时,在任何明显的地方(/usr/local/opt/local)都看不到它们。另外,-lintllibintl一样吗?

谢谢您对这些问题的指导!我已经挣扎了一段时间了。

[1/2] Compiling [32mbuild/.conf_check_6b4b67dc94b05606ea0f210c0718a6fb/test.c[0m

['gcc','-fno-strict-aliasing','-fno-common','-dynamic','-Os','-isysroot/Library/Developer/CommandLinetools/SDKs/MacOSX10.15.sdk','-DNDEBUG','-g','-fwrapv','-O3','-I/Opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7','-DPYTHONDIR="/Users/USER/Desktop/code/plc_3.0/plc-3.01/lib/python2.7/site-packages"','-DPYTHONARCHDIR="/Users/USER/Desktop/code/plc_3.0/plc-3.01/lib/python2.7/site-packages"','../test.c','-c','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_6b4b67dc94b05606ea0f210c0718a6fb/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_6b4b67dc94b05606ea0f210c0718a6fb/testbuild/testprog[0m

['gcc','-arch','x86_64','test.c.1.o','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_6b4b67dc94b05606ea0f210c0718a6fb/testbuild/testprog','-L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib','-L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config','-lm','-ldl','-lutil','-lpthread','-lpython2.7','-lintl','-ldl']
err: ld: library not found for -lintl
collect2: error: ld returned 1 exit status

from /Users/USER/Desktop/code/plc_3.0/plc-3.01: Test does not build: Traceback (most recent call last):
  File "/Users/USER/Desktop/code/plc_3.0/plc-3.01/.waf-2.0.17-c5414c9b1eca70e1add79159e16494fe/waflib/Configure.py",line 325,in run_build
    bld.compile()
  File "/Users/USER/Desktop/code/plc_3.0/plc-3.01/.waf-2.0.17-c5414c9b1eca70e1add79159e16494fe/waflib/Build.py",line 176,in compile
    raise Errors.BuildError(self.producer.error)
BuildError: Build Failed
 -> task in 'testprog' Failed with exit status 1 (run with -v to display more information)

Could not build a python embedded interpreter
from /Users/USER/Desktop/code/plc_3.0/plc-3.01: The configuration Failed
--------------------------------------------------------------------------
Checking for library dl
==>

int main(int argc,char **argv) {
    (void)argc; (void)argv;
    return 0;
}

<==
[1/2] Compiling [32mbuild/.conf_check_428ef212807c68d65d8589da073dadd1/test.c[0m

['gcc','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_428ef212807c68d65d8589da073dadd1/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_428ef212807c68d65d8589da073dadd1/testbuild/testprog[0m

['gcc','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_428ef212807c68d65d8589da073dadd1/testbuild/testprog','-ldl']
yes
--------------------------------------------------------------------------
checking for RTLD_DEFAULT in dl
==>
#include <dlfcn.h> 
int main() {void* tt = RTLD_DEFAULT;}
<==
[1/2] Compiling [32mbuild/.conf_check_715de422e26f8311e37510f895dc2cf9/test.c[0m

['gcc','-DHAS_RTLD_DEFAULT','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_715de422e26f8311e37510f895dc2cf9/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_715de422e26f8311e37510f895dc2cf9/testbuild/testprog[0m

['gcc','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_715de422e26f8311e37510f895dc2cf9/testbuild/testprog','-ldl']
yes
--------------------------------------------------------------------------
compile with debug option
OFF
--------------------------------------------------------------------------
Checking for program 'pmc-config'
not found
find program=['pmc-config'] paths=['/opt/local//bin'] var='PMC_CONfig' -> None
from /Users/USER/Desktop/code/plc_3.0/plc-3.01: Could not find the program ['pmc-config']
--------------------------------------------------------------------------
Checking for library pmc
==>

int main(int argc,char **argv) {
    (void)argc; (void)argv;
    return 0;
}

<==
[1/2] Compiling [32mbuild/.conf_check_f81a3c4e05449ea9374b388f617e5f06/test.c[0m

['gcc','-I/Opt/local/include','-I/Opt/local/include/pmclib','-I/Opt/local/include/pmctools','-DHAS_PMC','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_f81a3c4e05449ea9374b388f617e5f06/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_f81a3c4e05449ea9374b388f617e5f06/testbuild/testprog[0m

['gcc','-o/Users/USER/Desktop/code/plc_3.0/plc-3.01/build/.conf_check_f81a3c4e05449ea9374b388f617e5f06/testbuild/testprog','-Wl,-rpath,/Users/USER/Desktop/code/plc_3.0/plc-3.01/lib',/opt/local/lib','-L/opt/local/lib','-lpmc']
err: ld: library not found for -lpmc
collect2: error: ld returned 1 exit status

from /Users/USER/Desktop/code/plc_3.0/plc-3.01: Test does not build: Traceback (most recent call last):
  File "/Users/USER/Desktop/code/plc_3.0/plc-3.01/.waf-2.0.17-c5414c9b1eca70e1add79159e16494fe/waflib/Configure.py",in compile
    raise Errors.BuildError(self.producer.error)
BuildError: Build Failed
 -> task in 'testprog' Failed with exit status 1 (run with -v to display more information)

not found
from /Users/USER/Desktop/code/plc_3.0/plc-3.01: The configuration Failed

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...