-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't compile, "fatal error: mupdf/fitz.g and much other things #1
Comments
I get same errors:
|
Thirding, I have the same issue on ubuntu 18. |
same issue in Ubuntu 18.04 :( incompatible type for argument 1 of 'fz_scale' or too few arguments to function 'fz_scale' |
I encountered the 'fz_scale' issue on Debian 9 which only comes much older version of muPdf. So given there was changes as marked for v1.14 I manually built from source. That resolved the 'fz_scale' issues but I now get |
kalpha2 <[email protected]> wrote:
I encountered the 'fz_scale' issue on Debian 9 which only comes much older version of muPdf. So given there was changes as marked for v1.14 I manually built from source. That resolved the 'fz_scale' issues but I now get
/usr/bin/ld: cannot find -lmupdf-pkcs7
/usr/bin/ld: cannot find -lmupdf-threads
Edit the Makefile and remove these options for the fbpdf
target. Do you get any other linker errors?
Ali
|
then I get a lot of undefined refs, nothing flagged as error as such and final two lines are |
kalpha2 <[email protected]> wrote:
[mybuild.txt](https://github.com/aligrudi/fbpdf/files/3681576/mybuild.txt)
The options passed to the linker depend on the version of the mupdf
library (try 'git whatchanged -p Makefile' to see previous versions
of fbpdf's Makefile):
Add -lmupdfthird instead of -lmupdf-third.
If that does not work, replace -lmupdfthird with
-lmujs -lfreetype -ljbig2dec -ljpeg -lz -lopenjpeg.
Ali
|
think I started with snapshot download not git, could start over if think worth it? |
do you recommend a particular version of mujs to use with fbpdf and what url would you recommend to get source for mujs from? |
kalpha2 <[email protected]> wrote:
do you recommend a particular version of mujs to use with fbpdf and what url would you recommend to get source for mujs from?
mujs comes with mupdf itself. However, the library was removed (merged
into -lmupdf) at some point after mupdf-1.4.
What is the version of mupdf library installed on your system?
Also note that, regardless of the version of mupdf installed
on your system, you can compile its latest version and copy
the resulting *.a files to the directory specified with linker'ss -L
and copy the header files (include/mupdf) to the directory
specified with compiler's -I.
Ali
|
I started with mupdf v1.9a as from Deb 9 Repos but got the fz_scale errors. So I went to the |
kalpha2 <[email protected]> wrote:
I started with mupdf v1.9a as from Deb 9 Repos but got the fz_scale errors. So I went to the
https://mupdf.com/ site and because fbpdf changelog had ref to v1.14
I pulled that source version and built according to the instructions.
There is no --version so I can't check if the make install worked but
given the fz_scale errors went away presume it did.
I copied libfreeglut.a, libmupdf-pkcs7.a, libmupdf-third.a, and
libmupdf~reads.a to fbpdf/lib/ and the contents of mupdf/include into
the fbpdf/include folder but perceptible differnce on the make...
maybe I have to tweak the makefile.
Please revert your changes to the linker options in the Makefile
and report any problem you encounter.
Ali
|
with the makefile reverted to original see attached. ends with |
kalpha2 <[email protected]> wrote:
with the makefile reverted to original see attached. ends with
collect2: error: ld returned 1 exit status
make: *** [fbpdf] Error 1
[mybuild2.txt](https://github.com/aligrudi/fbpdf/files/3687289/mybuild2.txt)
What does the following commands return?
$ ls lib/
$ nm lib/libmupdf.a | grep fz_hb_free
Ali
|
lib only had I only so I copied libmupdf.a in there too nm lib/libmupdf.a | grep fz_hb_free now I get cc -c -Wall -O2 -I./include djvulibre.c |
kalpha2 <[email protected]> wrote:
lib only had I only
libfreeglut.a libmupdf-pkcs7.a libmupdf-third.a libmupdf-threads.a
so I copied libmupdf.a in there too
nm lib/libmupdf.a | grep fz_hb_free
0000000000000000 T fz_hb_free
Then I guess you are done. You can now use the fbpdf binary.
now I get
cc -c -Wall -O2 -I./include djvulibre.c
djvulibre.c:4:30: fatal error: libdjvu/ddjvuapi.h: No such file or directory
#include <libdjvu/ddjvuapi.h>
^
compilation terminated.
Makefile:8: recipe for target 'djvulibre.o' failed
make: *** [djvulibre.o] Error 1
This is for fbdjvu, for viewing Djvulibre files. You do
not need it, if you want fbpdf only.
Ali
|
I've installed libdjvulibre-dev from deb repos so builds no errors. Now to test on unit with no X installed. thankyou |
I also encountered this errors, but finally managed to get it working with a mix of your help and other sources. Here are the steps for any future readers: lsb_release -a No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
git clone https://github.com/ArtifexSoftware/mupdf.git && cd mupdf
git checkout 1.14.0
git submodule update --init
sudo apt install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libxi-dev
pyenv install 2.7.18 && pyenv local 2.7.18 # install python 2 and set it as the repository python version
cd thirdparty/freeglut/
curl -X GET 'https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1' | git apply
make prefix=/usr/local install -j $($(nproc) + 1)
git clone https://github.com/aligrudi/fbpdf.git
sudo apt install libdjvulibre-dev
cd mupdf
mkdir ../fbpdf/lib
cp ./build/release/{libfreeglut,libmupdf-pkcs7,libmupdf-third,libmupdf-threads,libmupdf}.a ../fbpdf/lib/
make -j $($(nproc) + 1) |
nymius ***@***.***> wrote:
I also encountered this errors, but finally managed to get it working with a mix of your help and other sources. Here are the steps for any future readers:
```bash
lsb_release -a
```
```bash
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
```
```bash
gcc --version
```
```bash
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
```
---
1. Install `mupdf-1.14`:
```bash
git clone https://github.com/ArtifexSoftware/mupdf.git && cd mupdf
git checkout 1.14.0
git submodule update --init
sudo apt install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libxi-dev
You do not actually need these, unless you want to build the mupdf viewer.
pyenv install 2.7.18 && pyenv local 2.7.18 # install python 2 and set it as the repository python version
cd thirdparty/freeglut/
curl -X GET 'https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1' | git apply
make prefix=/usr/local install -j $($(nproc) + 1)
```
2. Install `fbpdf`:
```bash
git clone https://github.com/aligrudi/fbpdf.git
sudo apt install libdjvulibre-dev
cd mupdf
mkdir ../fbpdf/lib
cp ./build/release/{libfreeglut,libmupdf-pkcs7,libmupdf-third,libmupdf-threads,libmupdf}.a ../fbpdf/lib/
make -j $($(nproc) + 1)
```
Thank you very much for sharing it. Maybe we can add a link from
the README file.
Ali
|
Git version. Any idea ?
mupdf.c: In function ‘doc_draw’:
mupdf.c:22:8: error: too many arguments to function ‘fz_new_pixmap_from_page_number’
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:58:0,
from mupdf.c:3:
/usr/include/mupdf/fitz/util.h:22:12: note: declared here
fz_pixmap *fz_new_pixmap_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_matrix *ctm, fz_colorspace *cs);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mupdf.c:30:43: error: ‘fz_pixmap {aka struct fz_pixmap_s}’ has no member named ‘stride’; did you mean ‘storable’?
unsigned char *s = &pix->samples[y * pix->stride];
^~
Makefile:8 : la recette pour la cible « mupdf.o » a échouée
make: *** [mupdf.o] Erreur 1
The text was updated successfully, but these errors were encountered: