View previous topic :: View next topic |
Author |
Message |
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Wed Nov 30, 2016 9:53 am Post subject: Parapdf fails to compile [Solved] |
|
|
Hi, so I'm trying to install parapdf from source, which is a modded version of mupdf with additional features like dark background, etc.
This is the repository:
https://github.com/paradigm/paraPDF
This is the error I get when I try to compile:
Code: |
make
CC build/debug/filt_jpxd.o
fitz/filt_jpxd.c:4:22: fatal error: openjpeg.h: No such file or directory
compilation terminated.
Makefile:174: recipe for target 'build/debug/filt_jpxd.o' failed
make: *** [build/debug/filt_jpxd.o] Error 1
|
I'm not sure the what is the cause of the error, but the required dependencies as listed on the github repo seem to be installed on my system.
If anyone has any idea or suggestions on how to debug the issue feel free to let me know.
Alternatively, I'm open to suggestion to forks of mupdf or any other reader that has the option to invert background colors, for example a dark background, etc.
Thanks.
Last edited by irenicus09 on Wed Nov 30, 2016 11:40 pm; edited 1 time in total |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3684
|
Posted: Wed Nov 30, 2016 10:22 am Post subject: Re: Parapdf fails to compile |
|
|
irenicus09 wrote: | Alternatively, I'm open to suggestion to forks of mupdf or any other reader that has the option to invert background colors, for example a dark background, etc. |
man 1 mupdf wrote: | KEY BINDINGS
...
c Toggle between color and grayscale rendering.
C Toggle full-page color tinting. i Toggle between normal and inverted color rendering.
... |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31257 Location: here
|
Posted: Wed Nov 30, 2016 10:24 am Post subject: |
|
|
First you need to install openjpeg-1.5 with emerge openjpeg:0 (see here same problem as mupdf).
Now you need change Makerule and Makethird files.
On Makerules change from
Code: | ifeq "$(OS)" "Linux"
SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
X11LIBS := -lX11 -lXext
PDFVIEW_EXE = $(X11VIEW_EXE)
endif |
to
Code: | ifeq "$(OS)" "Linux"
SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
X11LIBS := -lX11 -lXext
PDFVIEW_EXE = $(X11VIEW_EXE)
SYS_OPENJPEG_INC := `pkg-config --cflags libopenjpeg`
endif |
while for Makethird change from
Code: | ifneq "$(openjpeg_dir)" ""
THIRD_LIBS += $(OPENJPEG_LIB)
THIRD_INCS += -I$(openjpeg_dir)
LIBS := $(filter-out -lopenjpeg, $(LIBS))
# opj_config.h does not exist in the pristine source
$(OBJDIR)/opj_config.h:
cp $(openjpeg_dir)/../opj_config.h.in.user $@
OPENJPEG_SRC=$(addprefix $(openjpeg_dir)/, \
bio.c \
cio.c \
dwt.c \
event.c \
image.c \
j2k.c \
j2k_lib.c \
jp2.c \
jpt.c \
mct.c \
mqc.c \
openjpeg.c \
pi.c \
raw.c \
t1.c \
t2.c \
tcd.c \
tgt.c )
OPENJPEG_OBJ=$(OPENJPEG_SRC:$(openjpeg_dir)/%.c=$(OBJDIR)/opj_%.o)
OPENJPEG_LIB=$(OBJDIR)/libopenjpeg.a
$(OPENJPEG_OBJ): $(OBJDIR)/opj_config.h
$(OPENJPEG_LIB): $(OPENJPEG_OBJ)
$(AR_CMD)
$(OBJDIR)/opj_%.o: $(openjpeg_dir)/%.c
$(CC_CMD) -I$(OBJDIR) -DOPJ_STATIC
endif |
to
Code: | ifneq "$(openjpeg_dir)" ""
THIRD_LIBS += $(OPENJPEG_LIB)
THIRD_INCS += -I$(openjpeg_dir)
LIBS := $(filter-out -lopenjpeg, $(LIBS))
# opj_config.h does not exist in the pristine source
$(OBJDIR)/opj_config.h:
cp $(openjpeg_dir)/../opj_config.h.in.user $@
OPENJPEG_SRC=$(addprefix $(openjpeg_dir)/, \
bio.c \
cio.c \
dwt.c \
event.c \
image.c \
j2k.c \
j2k_lib.c \
jp2.c \
jpt.c \
mct.c \
mqc.c \
openjpeg.c \
pi.c \
raw.c \
t1.c \
t2.c \
tcd.c \
tgt.c )
OPENJPEG_OBJ=$(OPENJPEG_SRC:$(openjpeg_dir)/%.c=$(OBJDIR)/opj_%.o)
OPENJPEG_LIB=$(OBJDIR)/libopenjpeg.a
$(OPENJPEG_OBJ): $(OBJDIR)/opj_config.h
$(OPENJPEG_LIB): $(OPENJPEG_OBJ)
$(AR_CMD)
$(OBJDIR)/opj_%.o: $(openjpeg_dir)/%.c
$(CC_CMD) -I$(OBJDIR) -DOPJ_STATIC
else
CFLAGS += $(SYS_OPENJPEG_INC)
endif |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Wed Nov 30, 2016 11:40 pm Post subject: |
|
|
@fedeliallalinea: Man you are the best, thanks for always showing me how its done |
|
Back to top |
|
|
|