WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: new version of mupdf  (Read 5559 times)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
new version of mupdf
« on: May 07, 2019, 11:27:45 AM »
Hi, Cores!

mupdf.tcz is nice working and is Tiny and toolkit independant, so everything is ok with it, i use it almost every day.
But new mupdf versions are available at mupdf.org, and they can work not only with pdf's, but with .epub and .fb2 too. If i am not mistaken, .epub's can be viewed with flviewer.tcz, but i don't know any extension for .fb2's.
I've loaded and compiled and tried a little mupdf-1.15. It works well too, but have issues with sourced GL interface in .tar.xz (missing header glu.h). So i succeed only with building mupdf-x11, not mupdf-gl. Of course it is big enough (it is toolkit independent too)- built without any dependencies weights 35M.
I've made an extension mupdf-1.15.tcz and the bright side of it is that new extension is not conflicting with the old mupdf.tcz, they can coexist, and there is no need to displace time-proved and tiny old version.
May be it will be usefull to add this new version to repo in order to have fb2-able viewer?
And mupdf-tools in additional extension? Even library is built accompanied with dev files, but is static one.
License is AGPL, can we use it?

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #1 on: May 07, 2019, 11:31:15 AM »
UI is the same, with some improvements, TOC is now available.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: new version of mupdf
« Reply #2 on: May 07, 2019, 11:42:36 AM »
Hi jazzbiker
Quote
...  (missing header glu.h) ...
Did you try installing  glu-dev.tcz ?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: new version of mupdf
« Reply #3 on: May 07, 2019, 12:47:51 PM »
Yes, AGPL is an accepted license. Please send your extension according to the instructions in the wiki.
The only barriers that can stop you are the ones you create yourself.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
new version of mupdf
« Reply #4 on: May 07, 2019, 01:05:12 PM »
Hey jazbiker

Firefox opens pdf files perfectly.   There are also Firefox addon’s available to open epub & fb2 documents

[emoji2]


Sent from my iPhone using Tapatalk

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #5 on: May 07, 2019, 02:20:37 PM »
Did you try installing  glu-dev.tcz ?

Hi, Rich!

Yes, as authors reminded, and other extensions too. But tarball is aimed on fully standalone make install, all dependencies' sources are inside of /thirdparty dir. To replace them with system libs according directory must be cleaned and appropriate variables given to make, i don't understand yet what exactly, they differs slightly from standard form. And docs are spread upon different dirs, some issues seen only in Makefile.
Another issue is, that some of the libs (don't remember now which ones) have later and incompatible with TC's versions of them. For example, thay want some headers, which are simply absent in TC *-dev.tcz. So i will need gurus' advice what to do - update some system libs devs or compile with attached sources. It will take some time for me to clear out all obstacles.

Thanks, advices are welcome!

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #6 on: May 07, 2019, 02:23:34 PM »
Yes, AGPL is an accepted license. Please send your extension according to the instructions in the wiki.
Ok, I will try to do my best.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #7 on: May 07, 2019, 02:35:50 PM »
Firefox opens pdf files perfectly.   There are also Firefox addon’s available to open epub & fb2 documents
[emoji2]

Hi, coreplayer2!

I use TC on different boxes, some have 1G memory, about what Firefox you are talking? It can be only the dead one.
I use lynx and fifth, sweet pair.
Browsers' authors want them to do everything at all, but this is not mine problem. I respect Mozilla for their efforts, they provide very pleasant helps and docs, and Rust is their child in great measure, as i can understand.

So thanks for advice, but i will not follow it  :)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: new version of mupdf
« Reply #8 on: May 07, 2019, 05:11:45 PM »
Firefox opens pdf files perfectly.   There are also Firefox addon’s available to open epub & fb2 documents
[emoji2]

Hi, coreplayer2!

...what Firefox you are talking? It can be only the dead one.

Hello Jazzbiker

What “dead one” are you referring to?

I use Firefox because I want the best possible browsing experience.




Sent from my iPhone using Tapatalk

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: new version of mupdf
« Reply #9 on: May 08, 2019, 01:11:20 AM »
To replace them with system libs according directory must be cleaned and appropriate variables given to make, i don't understand yet what exactly, they differs slightly from standard form.

Have you seen the build instructions here:

http://www.linuxfromscratch.org/blfs/view/svn/pst/mupdf.html

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #10 on: May 08, 2019, 01:46:29 AM »

Have you seen the build instructions here:

http://www.linuxfromscratch.org/blfs/view/svn/pst/mupdf.html

Thanks, Juanito! I've forgotten about wonderful LFS! All my questions answered.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #11 on: June 15, 2019, 11:43:00 AM »
Sorry, but i didn't succeed in creating mupdf-1.15 extension. Tried different variants, but...
I want to show what was done, please give me advice where to move further.

Code: [Select]
tce-load -i compiletc Xorg-7.7-3d-dev libjpeg-turbo-dev harfbuzz-dev openjpeg2-dev jbig2dec-dev glu-dev
cd /tmp
wget https://mupdf.com/downloads/archive/mupdf-1.15.0-source.tar.gz
tar x -zvf mupdf-1.15.0-source.tar.gz
cd mupdf-1.15.0-source
export XCFLAGS="-march=i486 -mtune=i686"
make

This is the simplest way, without use of system libraries, everything compiled from sources.
Then

Code: [Select]
tc@box:/tmp/mupdf-1.15.0-source$ cd build/release
tc@box:/tmp/mupdf-1.15.0-source/build/release$ ls
libfreeglut.a       libmupdf.a          mutool              thirdparty/
libmupdf-pkcs7.a    mupdf-gl            platform/
libmupdf-third.a    mupdf-x11           resources/
libmupdf-threads.a  muraster            source/
tc@box:/tmp/mupdf-1.15.0-source/build/release$ ldd ./mupdf-x11
Illegal instruction
tc@box:/tmp/mupdf-1.15.0-source/build/release$ dmesg | tail -n 1
traps: ld-linux.so.2[25449] trap invalid opcode ip:b7f7df56 sp:bf9045c0 error:0 in ld-2.28.so[b7f70000+15000]
tc@box:/tmp/mupdf-1.15.0-source/build/release$

What does it means?

I want to say, that i packed the extension and use it. Is it dangerous?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: new version of mupdf
« Reply #12 on: June 15, 2019, 11:48:20 AM »
Hi jazzbiker
Code: [Select]
export XCFLAGS="-march=i486 -mtune=i686"
 ...............

Code: [Select]
Illegal instruction
tc@box:/tmp/mupdf-1.15.0-source/build/release$ dmesg | tail -n 1
traps: ld-linux.so.2[25449] trap invalid opcode ip:b7f7df56 sp:bf9045c0 error:0 in ld-2.28.so[b7f70000+15000]

Try changing that to:
Code: [Select]
export CFLAGS="-march=i486 -mtune=i686"

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: new version of mupdf
« Reply #13 on: June 15, 2019, 12:10:46 PM »
You didn't follow the lfs instructions:
Code: [Select]
$ patch -Np1 -i ../mupdf-1.15.0-shared_libs-1.patch
$ USE_SYSTEM_LIBS=yes CC="gcc -march=i486 -mtune=i686 -Os -pipe" make
$ sudo USE_SYSTEM_LIBS=yes CC="gcc -march=i486 -mtune=i686 -Os -pipe" make prefix=/usr/local build=release install
$ ls build/release
libmupdf-pkcs7.so    mupdf-gl             platform/
libmupdf-third.so    mupdf-x11            resources/
libmupdf-threads.so  muraster             source/
libmupdf.so          mutool               thirdparty/

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: new version of mupdf
« Reply #14 on: June 15, 2019, 12:26:58 PM »
Try changing that to:
Code: [Select]
export CFLAGS="-march=i486 -mtune=i686"

Hi, Rich!
CFLAGS is used in Makefile and mupdf developers propose to pass switches with XCFLAGS

Code: [Select]
tc@box:~$ cat /tmp/mupdf-1.15.0-source/Makefile | head -n 25 | tail -n 7

# Do not specify CFLAGS or LIBS on the make invocation line - specify
# XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that
# set a variable that was set on the command line.
CFLAGS += $(XCFLAGS) -Iinclude
LIBS += $(XLIBS) -lm