PHCpack icon indicating copy to clipboard operation
PHCpack copied to clipboard

QDlib in Ubuntu/Debian

Open berceanu opened this issue 6 years ago • 5 comments

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?

berceanu avatar Jul 25 '17 08:07 berceanu

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

berceanu avatar Jul 25 '17 13:07 berceanu

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.

janverschelde avatar Jul 26 '17 07:07 janverschelde

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

berceanu avatar Jul 26 '17 10:07 berceanu

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!

C-H-Chien avatar Feb 20 '21 16:02 C-H-Chien

Try to type 'make phc_noqd' which does not need the qd library.

janverschelde avatar Feb 21 '21 02:02 janverschelde