Following my previous note on installing pdf in PlPlot using linux mint 20
64bit.

I have used cmake on libharu-RELEASE_2_3_0 to produce a directory libharu
which contains the include and lib directories.
I then use cmake on plplot-5.10.0. to produce a directory plplot containing
directories bin, include, lib and share.
The pdf driver is not installed. During the latter cmake the following
 cmake.out message is produced:

-- Looking for haru pdf header and library
-- Looking for haru pdf header and library - not found
-- WARNING: Setting PLD_pdf to OFF.

I have since amended plplot-5_3.0/cmake/module/Findhpdf.cmake in the
following (kludged) fragment:
'
'
find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include
PATH_SUFFIXES hpdf)
find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include)
find_path(hpdf_INCLUDE_DIR hpdf.h PATHS
/home/peter/software/libharu/include)

if(hpdf_INCLUDE_DIR)
  find_library(hpdf_LIBRARY
  NAMES hpdf
  PATHS /usr/local/lib /usr/lib /home/peter/software/libharu/lib
  )
'
'
The above cmake.out message is now:

-- Looking for haru pdf header and library
-- Findhpdf: Found haru header directory,
/home/peter/software/libharu/include, and library,
/home/peter/software/libharu/lib/libhpdf.so.
-- Looking for haru pdf header and library - found
-- Checking whether libharu version >= 2.3.0
-- Performing Test LIBHARU_VERSION_LARGE_ENOUGH
-- Performing Test LIBHARU_VERSION_LARGE_ENOUGH - Success
'
'
DRIVERS_LIST: mem;null;pdf;ps;svg;xfig;xwin
DEVICES_LIST: mem;null;pdf;ps;psc;svg;xfig;xwin

I now test on a simple plpot program x03.c using

gcc -c -I /home/peter/software/plplot/include/plplot x03.c
gcc -o x03.exe x03.o  -L /home/peter/software/plplot/lib  -L
/home/peter/software/libharu/lib -lplplot -lcsirocsa  -lqsastime -lhpdfs
 -lm  -pthread -lX11

and to my dismay get

peter@peter-Akoya-E6237:~/software/Test$ sh x03.sh

/usr/bin/ld: /home/peter/software/libharu/lib/libhpdfs.a(hpdf_streams.o):
in function `HPDF_Stream_WriteToStreamWithDeflate':
hpdf_streams.c:(.text+0x118f): undefined reference to `deflateInit_'
/usr/bin/ld: hpdf_streams.c:(.text+0x127a): undefined reference to
`deflateEnd'
/usr/bin/ld: hpdf_streams.c:(.text+0x129a): undefined reference to `deflate'

Can't see these last three functions in libharu-RELEASE_2_3_0/src.

Any advice?

Best wishes, Peter.

On Tue, 28 Jul 2020 at 15:51, Peter Williams <petesweet2...@gmail.com>
wrote:

> Hello Plplot
> I am new to linux (mint 20). I am experiencing some  difficulty in adding
> the pdf driver to my plplot installation.
> I have been following the instructions from the README_cmake file.
> I have downloaded libharu-RELEASE_2_3_0.zip and unpacked its contents to
> libharu in /home/peter/ where I also created a libharau_build folder. I cd
> into this directory and ran cmake (version 3.16.3) as
>
> cmake -DBUILD_SHARED_LIBS=OFF ../libharu
>
> I then ran "make". The run concluded with
> "[100%] Linking C static library libhpdfs.a
> [100%] Built target hpdfs " (I have a log of the process)
>
> I now seem to have, in my build directory a include directory containing
> hpdf_config.h and a
> src directory containing libhpdf.so (a shared library? !) and (among other
> things) libhpdfs.a. This latter file presumably contains the static pdf
> library for use by cmake in rebuilding plplot.
>
> I then rebuilt plplot  (using the default setting to include pdf) and the
> setting to generate static libraries:
> cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/peter/plplot
> /home/peter/plplot_install/plplot-5.15.0 -DBUILD_SHARED_LIBS=OFF >&
> cmake.out
> I can see no evidence of pdf being enabled. In fact, cmake.out contains
> "Looking for haru pdf header and library
> -- Looking for haru pdf header and library - not found
> -- WARNING: Setting PLD_pdf to OFF."
>
> Can you please tell me where I should move libhpdfs.a  (and hpdf_config.h
> ?)  to rebuild plplot successfuly.
>
> Your advice would be gratefully received.
> Peter.
>
> --
> Peter Williams
> petesweet2...@gmail.com
>
>

-- 
Peter Williams
petesweet2...@gmail.com
27 Ramsbury Road, St. Albans, AL1 1SN, UK
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to