plato
plato copied to clipboard
How to build?
I'm trying to build Plato, but don't get very far.
On Fedora 42 (arm64), I can't find two libraries. It seems like they aren't available in Fedora:
[...]
= note: ld: error: unable to find library -lmupdf-third
ld: error: unable to find library -lopenjp2
collect2: error: ld returned 1 exit status
I've also tried building inside Debian 12 (inside distrobox), but I get the following errors (probably a Debian/mupdf bug?):
[...]
= note: /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `field_finalize':
(.text.field_finalize+0x8): undefined reference to `js_getcontext'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_drop_js':
(.text.pdf_drop_js+0x30): undefined reference to `js_freestate'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_js_event_init':
(.text.pdf_js_event_init+0x2c): undefined reference to `js_getglobal'
/usr/bin/ld: (.text.pdf_js_event_init+0x38): undefined reference to `js_pushboolean'
/usr/bin/ld: (.text.pdf_js_event_init+0x4c): undefined reference to `js_setproperty'
/usr/bin/ld: (.text.pdf_js_event_init+0x60): undefined reference to `js_pushboolean'
/usr/bin/ld: (.text.pdf_js_event_init+0x74): undefined reference to `js_setproperty'
/usr/bin/ld: (.text.pdf_js_event_init+0x80): undefined reference to `js_getregistry'
/usr/bin/ld: (.text.pdf_js_event_init+0xa8): undefined reference to `js_newuserdata'
/usr/bin/ld: (.text.pdf_js_event_init+0xbc): undefined reference to `js_setproperty'
/usr/bin/ld: (.text.pdf_js_event_init+0xc8): undefined reference to `js_pushstring'
/usr/bin/ld: (.text.pdf_js_event_init+0xdc): undefined reference to `js_setproperty'
/usr/bin/ld: (.text.pdf_js_event_init+0xf4): undefined reference to `js_pop'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_js_event_result':
(.text.pdf_js_event_result+0x1c): undefined reference to `js_getglobal'
/usr/bin/ld: (.text.pdf_js_event_result+0x30): undefined reference to `js_getproperty'
/usr/bin/ld: (.text.pdf_js_event_result+0x40): undefined reference to `js_tryboolean'
/usr/bin/ld: (.text.pdf_js_event_result+0x54): undefined reference to `js_pop'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_js_event_result_validate':
(.text.pdf_js_event_result_validate+0x2c): undefined reference to `js_getglobal'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0x40): undefined reference to `js_getproperty'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0x50): undefined reference to `js_tryboolean'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0x60): undefined reference to `js_pop'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0x70): undefined reference to `js_pop'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0x98): undefined reference to `js_getproperty'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0xb0): undefined reference to `js_trystring'
/usr/bin/ld: (.text.pdf_js_event_result_validate+0xd0): undefined reference to `js_pop'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_js_event_value':
(.text.pdf_js_event_value+0x20): undefined reference to `js_getglobal'
/usr/bin/ld: (.text.pdf_js_event_value+0x34): undefined reference to `js_getproperty'
/usr/bin/ld: (.text.pdf_js_event_value+0x4c): undefined reference to `js_trystring'
/usr/bin/ld: (.text.pdf_js_event_value+0x6c): undefined reference to `js_pop'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../../lib/libmupdf.a(pdf-js.o): in function `pdf_js_execute':
(.text.pdf_js_execute+0x84): undefined reference to `js_ploadstring'
/usr/bin/ld: (.text.pdf_js_execute+0xa4): undefined reference to `js_trystring'
/usr/bin/ld: (.text.pdf_js_execute+0xc0): undefined reference to `js_pop'
/usr/bin/ld: (.text.pdf_js_execute+0xe4): undefined reference to `js_pushundefined'
/usr/bin/ld: (.text.pdf_js_execute+0xf0): undefined reference to `js_pcall'
/usr/bin/ld: (.text.pdf_js_execute+0x110): undefined reference to `js_tryrepr'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
error: could not compile `emulator` (bin "plato-emulator") due to 1 previous error
What host system is normally used for building Plato?
I was just checking how difficult it would be to add new features to Plato. Something like adding Instapaper support would be really nice now that Pocket is closing down.