lilolalorphism
lilolalorphism

Reputation: 33

How to install these libraries and make them found by configure?

I am trying to configure the PLC (Planck Likelihood) using waf. I keep getting the following error after running ./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 

Below is the relevant part of the config.log for the attempt. It looks like the error above is caused by the waf not being able to find two libraries: intl and plc. My questions are 1) how can I check for sure if the libraries are installed? 2) How do I install them exactly and how do I make waf able to find them? When I run locate plc and locate intl I don't see them in any of the obvious places (/usr/local or /opt/local). Also, is -lintl the same as libintl?

Thank you for any guidance on these issues! I have been struggling with these for a while.

[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', '-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', '-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_428ef212807c68d65d8589da073dadd1/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_428ef212807c68d65d8589da073dadd1/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_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', '-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"', '-DHAS_RTLD_DEFAULT', '../test.c', '-c', '-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', '-arch', 'x86_64', 'test.c.1.o', '-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', '-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"', '-DHAS_PMC', '../test.c', '-c', '-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', '-arch', 'x86_64', 'test.c.1.o', '-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', '-Wl,-rpath,/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", 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)

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

Upvotes: 2

Views: 508

Answers (0)

Related Questions