baskerville / plato

Document reader
Other
1.23k stars 102 forks source link

Cannot link mupdf-third when building emulator #329

Closed ewired closed 9 months ago

ewired commented 9 months ago

I was previously able to build the emulator with no issues. The Kobo build still runs as usual. It may have been the recent updates to Plato or something on my Arch system.

  = note: /usr/sbin/ld: cannot find -lmupdf-third: No such file or directory
          collect2: error: ld returned 1 exit status

I tried removing the mupdf-third line from build.rs and got this panic in runtime:

Add new entry: 5243CFAE0000697E, contrib/unicode_test.epub.
Add new entry: 5080128E000F3496, thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 API.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 API.pdf.
Add new entry: 5080128E000706A1, thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 Plugin API.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 Plugin API.pdf.
Add new entry: 5080128E0008C451, thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 tutorial.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/lcms2/doc/LittleCMS2.14 tutorial.pdf.
Add new entry: 5080128E0002EA04, thirdparty/mupdf/thirdparty/lcms2/plugins/threaded/doc/LittleCMS threaded extensions 1.0.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/lcms2/plugins/threaded/doc/LittleCMS threaded extensions 1.0.pdf.
Add new entry: 5078F6EF000BD7CE, thirdparty/mupdf/thirdparty/zlib/doc/crc-doc.1.0.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/zlib/doc/crc-doc.1.0.pdf.
Add new entry: 5078F6EF00004BA6, thirdparty/mupdf/thirdparty/zlib/zlib.3.pdf.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
Can't open thirdparty/mupdf/thirdparty/zlib/zlib.3.pdf.
Plato is running on a Kobo Touch A/B.
The framebuffer resolution is 600 by 800.
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
cannot create context: incompatible header (1.22.2) and library (1.23.4) versions
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', crates/core/src/view/icon.rs:32:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I used downgrade 'mupdf=1.22.2' for mupdf on my system and got the same build failure with the mupdf-third line, and the same runtime failure without the line.

ewired commented 9 months ago

I had to do both sudo downgrade 'libmupdf=1.22.2' 'mupdf=1.22.2' and now it works.