So I am trying to install libharu (libHaru is a free, open source, cross platform library for generating PDF files for applications written in C or C++) which is needed so that I can install this free open source accountability software called accountability pal. I am running manjaro KDE on my laptop. The programme specifically is: Haru Free PDF Library Version 2.0.8 - Nov 25, 2006, URL
http://libharu.sourceforge.net.
The exact instructions are:
Build from source on linux platform
1) Unpack the libharu package.
tar -xvzf libharu_2.X.X.tgz
cd libharu-2.X.X
2) Run configure script
./configure [--prefix=$HOME] [--shared]
3) Build library and install
make clean
make
make install
However, when I get to the make install stage I get the following error:
"libharu-2.0.8]$ make install
gcc -o src/hpdf_image_png.o -Iinclude -O2 -Wall -c src/hpdf_image_png.c
src/hpdf_image_png.c: In function ‘ReadPngData_Interlaced’:
src/hpdf_image_png.c:109:25: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
109 | info_ptr->height * sizeof (png_bytep));
| ^~
src/hpdf_image_png.c:114:47: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
114 | HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep));
| ^~
src/hpdf_image_png.c:115:44: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
115 | for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
| ^~
src/hpdf_image_png.c:127:52: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
127 | for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
| ^~
src/hpdf_image_png.c:136:44: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
136 | for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
| ^~
src/hpdf_image_png.c: In function ‘ReadPngData’:
src/hpdf_image_png.c:158:44: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
158 | for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) {
| ^~
src/hpdf_image_png.c: In function ‘LoadPngData’:
src/hpdf_image_png.c:305:17: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
305 | if (info_ptr->bit_depth == 16)
| ^~
src/hpdf_image_png.c:308:40: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
308 | if (PNG_COLOR_MASK_ALPHA & info_ptr->color_type) {
| ^~
src/hpdf_image_png.c:320:17: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
320 | if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
| ^~
src/hpdf_image_png.c:322:22: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
322 | else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
| ^~
src/hpdf_image_png.c:348:65: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
348 | if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width)
| ^~
src/hpdf_image_png.c:352:66: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
352 | if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height)
| ^~
src/hpdf_image_png.c:357:36: error: invalid use of incomplete typedef ‘png_info’ {aka ‘struct png_info_def’}
357 | (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK)
| ^~
src/hpdf_image_png.c: In function ‘PngBeforeWrite’:
src/hpdf_image_png.c:389:49: warning: pointer targets in passing argument 2 of ‘HPDF_FileReader_New’ differ in signedness [-Wpointer-sign]
389 | png_data = HPDF_FileReader_New (obj->mmgr, s->value);
| ~^~~~~~~
| |
| HPDF_BYTE * {aka unsigned char *}
In file included from include/hpdf_encoder.h:21,
from include/hpdf_objects.h:18,
from include/hpdf_image.h:18,
from src/hpdf_image_png.c:17:
include/hpdf_streams.h:150:36: note: expected ‘const char *’ but argument is of type ‘HPDF_BYTE *’ {aka ‘unsigned char *’}
150 | const char *fname);
| ~~~~~~~~~~~~~^~~~~
make: *** [Makefile:137: src/hpdf_image_png.o] Error 1"