PHCpack
PHCpack copied to clipboard
QDlib in Ubuntu/Debian
At point 2 of the PHCpy documentation, it is specified that one has to compile libQD from source with the -fPIC flag. In the case of Ubuntu/Debian, there is a package providing libQD v.2.3.11, can one just install that instead of compiling from source? Also, what version of libQD does PHCpy 0.6.9 depend on?
Apparently there is a problem with using the QD library from Ubuntu 16.04 repositories. After setting MAKEFILE = makefile_unix
in src/Objects/makefile
, make phc
fails with the error
g++: error: /usr/local/lib/libqd.a: No such file or directory
as the file libqd.a
is located in /usr/lib/libqd.a
, and not /usr/local/lib/libqd.a
The first version of qdlib used was already quite mature, version 2.3.09 if I recall correctly. I noticed no differences in using 2.3.14 and 2.3.17. Thanks for noticing the differences in the install locations on Ubuntu.
Yes, I wonder if the Ubuntu package is compiled with -fPIC
though. Perhaps I should just install qdlib from source?
Apparently it's not.
/usr/bin/ld: /usr/lib/libqd.a(c_dd.o): relocation R_X86_64_32 against `_ZSt4cout' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libqd.a(c_dd.o): error adding symbols: Bad value
I also encounter the problem mentioned by @berceanu, where make phc
fails with the error
g++: error: /usr/local/lib/libqd.a: No such file or directory
. How do you solve the problem? Thanks in advance!
Try to type 'make phc_noqd' which does not need the qd library.