baskerville / plato

Document reader
Other
1.25k stars 103 forks source link

Plato fails to build with error: linking with `arm-linux-gnueabihf-gcc` failed #304

Closed momijizukamori closed 1 year ago

momijizukamori commented 1 year ago

I used to be able to successfully build Plato using the Docker method - unfortunately, after some time away from dev work, I came back and discovered that both the regular method and the last version of the Dockerfile available (with some tweaks so it'll actually build) fail with the same error. I've got all the packages listed installed, and I'm using the gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi toolchain, which is on my path. Here's the output of the build:

   Compiling plato v0.9.38 (/home/cocoa/plato/crates/plato)
error: linking with `arm-linux-gnueabihf-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/cocoa/Downloads/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin/:/home/cocoa/.cargo/bin:/home/cocoa/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/cocoa/.local/bin" VSLANG="1033" "arm-linux-gnueabihf-gcc" "/tmp/rustcXw4iO5/symbols.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.0.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.1.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.10.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.11.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.12.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.13.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.14.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.15.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.2.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.3.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.4.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.5.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.6.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.7.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.8.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.plato.cceb011a9b8b0136-cgu.9.rcgu.o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9.26i8ome30bbexoiy.rcgu.o" "-Wl,--as-needed" "-L" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps" "-L" "/home/cocoa/plato/target/release/deps" "-L" "target/mupdf_wrapper/Kobo" "-L" "libs" "-L" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/build/bzip2-sys-915565f8cac9a213/out/lib" "-L" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/build/zstd-sys-1731c43122186549/out" "-L" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libplato_core-e71a8ab97081e530.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtoml-6a61c530f97eb65b.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtoml_edit-2d2ce7a5c97e8a9f.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libserde_spanned-9630eec21dc9d973.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libindexmap-6d1f9b4282abd71a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libequivalent-565dae1fea20533a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libhashbrown-67e6acc780b3815d.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libwinnow-19d6a7e1682a1854.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtoml_datetime-987839289118e660.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libpng-51a5c5d4b4dd390d.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libfdeflate-6cd94f25f73d785a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/librand_xoshiro-5248797581cbb867.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libthiserror-7807e34066fdf8ee.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbitflags-5240c623ceb693ac.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtitlecase-5677e087af8ffb31.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libjoinery-84b195c530817157.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libdowncast_rs-d43d386beb069080.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libglobset-3a10452bec020d63.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/liblog-e54e2dbc71fdb20e.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbstr-2624789a233b9caf.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libaho_corasick-4d847451cd29efe1.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libserde_json-390d3dda87bae6a3.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libryu-ad20982df65221ca.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libitoa-406ebdb5dc149f16.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libfiletime-53a8df723271b12b.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libindexmap-d550c56ea960b803.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libhashbrown-65c41e87393f30cf.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libunicode_normalization-0296fff8ee5dc897.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtinyvec-c6e4c1fcb0c2069a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtinyvec_macros-c4a75622237aa9ba.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libseptem-08471bc93192ed52.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libxi_unicode-c7913f3c384eaf81.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libparagraph_breaker-8ddbc94fe3ea7457.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libkl_hyphenate-b7c3ac0f56d75c72.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libkl_hyphenate_commons-ecb525f2a4fafc60.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbincode-ca320343c1ef6115.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libatlatl-3d0fc91673e3c724.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libfnv-c8af8e199affcdbf.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libregex-f52924dffe553035.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libregex_automata-6944d743c1bafb97.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libaho_corasick-0f8f6ba376762ff0.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libmemchr-49b0a0532883f07f.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libregex_syntax-235c88e3afbbc8e2.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libpercent_encoding-020079d23323a1d2.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libzip-3cc33c0e1fd85ade.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libpbkdf2-442fd81315629848.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libsha2-89ce545ccbe1d486.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libpassword_hash-48e181c2091323f9.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbase64ct-649243966142ed81.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/librand_core-673c2bd634c7576e.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtime-34b5650cb3eb7559.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtime_core-4b15e05365ebfaed.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libcrossbeam_utils-1bb5aea30cc11751.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libzstd-6a8e902315157128.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libzstd_safe-e04182480aac9e28.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libzstd_sys-7c5d27fb3b9b2781.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbzip2-0e0f7c455124a186.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbzip2_sys-5d7b645941c64d6c.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libflate2-bcb105881dc79721.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libminiz_oxide-8f50e211d2f5b554.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libsimd_adler32-f444e718fceb053e.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libcrc32fast-b91517912f3882da.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libaes-bcc2550196f11638.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libcipher-4fc1a6382d85b2e9.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libinout-ac28ad6e3b614ebe.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libsha1-1931f6be95ca2d27.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libhmac-44bb9ec1ede01f9f.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libdigest-2d5d0065da39f129.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libsubtle-adb8aa3149e073c3.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libblock_buffer-4511a6bf94b93d9b.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libcrypto_common-2b9f8f840593afda.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libgeneric_array-32c85c8597ed0c9e.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libtypenum-d23db2d2c6d6afd4.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libconstant_time_eq-bbc1453db8f25dc2.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/liblevenshtein-7a74637f6bcf40a9.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libchrono-620ede919eb11638.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libnum_traits-c6880f8155b29d8a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libiana_time_zone-1a4c42a0c53f12c5.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libwalkdir-06f29b011bb6d928.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libsame_file-43c4f54789c10351.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libentities-62dabc7e6761cfa6.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libfxhash-7df67110769b826a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbyteorder-5a9c49be9a0e3d4f.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libnix-b1994f602a85a1e6.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libmemoffset-c486720b03dc3328.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libstatic_assertions-de731da3939760dc.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libpin_utils-d39adde7447c376a.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libbitflags-f813c6476486630c.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libcfg_if-206c5d8cca920afb.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/liblibc-4495e0f9bf3d8083.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libanyhow-2ca579001e097159.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/liblazy_static-7e81d010971cea6f.rlib" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libserde-eae4e9f31bf7a944.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libstd-865f428860ef4a57.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libpanic_unwind-9ce0985793eb7681.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libobject-5e3359e580973068.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libmemchr-88010f390aef6a43.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libaddr2line-5418ae5efd5a8939.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libgimli-77f01ff6ee4d2dbb.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librustc_demangle-6ed06d4d97c9f5b7.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libstd_detect-45d7747b88e32872.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libhashbrown-5ba4a5330e264724.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librustc_std_workspace_alloc-e80a61f564ddc266.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libminiz_oxide-ddd36d488009d59d.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libadler-ec74d1fd205c5956.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libunwind-2142be9c4d69b189.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcfg_if-d06d37049d725503.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liblibc-a48a4b3bee1708e2.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liballoc-e7bcb304c60ba485.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librustc_std_workspace_core-e0f32149b34e97a2.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore-4b133d14fd2b4911.rlib" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcompiler_builtins-e3104a858c3de47f.rlib" "-Wl,-Bdynamic" "-ldjvulibre" "-lmupdf" "-lharfbuzz" "-lfreetype" "-lmupdf" "-lstdc++" "-lz" "-lbz2" "-ljpeg" "-lpng16" "-lgumbo" "-lopenjp2" "-ljbig2dec" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/cocoa/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-o" "/home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/plato-3e7905521f16a3f9" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
  = note: /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 3 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 4 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 5 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 6 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 7 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 8 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: libs/libmupdf.so: .dynsym local symbol at index 9 (>= sh_info of 3)
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: /home/cocoa/plato/target/arm-unknown-linux-gnueabihf/release/deps/libplato_core-e71a8ab97081e530.rlib(plato_core-e71a8ab97081e530.plato_core.7e1b1405f29334d5-cgu.5.rcgu.o): in function `plato_core::font::font_data_from_script':
          plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x12b4): undefined reference to `_binary_NotoSerifDogra_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1438): undefined reference to `_binary_NotoSansWancho_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x157c): undefined reference to `_binary_NotoSerifKhojki_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1608): undefined reference to `_binary_NotoSansGunjalaGondi_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1610): undefined reference to `_binary_NotoSerifYezidi_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1618): undefined reference to `_binary_NotoNaskhArabic_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x163c): undefined reference to `_binary_NotoSansElymaic_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1644): undefined reference to `_binary_NotoSansMasaramGondi_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1648): undefined reference to `_binary_NotoSerifGrantha_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1660): undefined reference to `_binary_NotoSansTaiTham_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1674): undefined reference to `_binary_NotoSansMedefaidrin_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x16a0): undefined reference to `_binary_NotoSansHanifiRohingya_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x16b4): undefined reference to `_binary_NotoSansOldSogdian_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x16b8): undefined reference to `_binary_NotoSansSoyombo_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x16f0): undefined reference to `_binary_NotoSerifBengali_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x170c): undefined reference to `_binary_NotoSerifDevanagari_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1758): undefined reference to `_binary_NotoSerifMalayalam_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1778): undefined reference to `_binary_NotoSansNushu_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x177c): undefined reference to `_binary_NotoSerifNyiakengPuachueHmong_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x1790): undefined reference to `_binary_NotoSansOriya_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x17a8): undefined reference to `_binary_NotoSansSogdian_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x17c0): undefined reference to `_binary_NotoSerifTelugu_Regular_otf'
          /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: plato_core.7e1b1405f29334d5-cgu.5:(.text._ZN10plato_core4font21font_data_from_script17h27127e4ff5409c7dE+0x17d4): undefined reference to `_binary_NotoSansZanabazarSquare_Regular_otf'
          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#cargorustc-link-libkindname)

error: could not compile `plato` (bin "plato") due to previous error

Unfortunately, as I'm working on something that uses Plato's code as a base, I can't just use a precompiled binary (though, to be clear, this output is from trying to build the unmodified Plato codebase - when I wasn't able to compile my own code, I went back to the original to see if that built, only to find it didn't)

baskerville commented 1 year ago

Try this: rm -rf libs && ./build.sh.

momijizukamori commented 1 year ago

Thanks, that did the trick! And I was able to compile my forked codebase as well :)

momijizukamori commented 1 year ago

Okay, building is working, but running ./dist.sh and copying over the dist folder to my device gives me a build that crashes as soon as I try to run it, with the following errors in info.log:

./plato: /lib/libm.so.6: version `GLIBC_2.35' not found (required by ./plato)
./plato: /lib/libm.so.6: version `GLIBC_2.27' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.32' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.27' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.25' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.29' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.33' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.28' not found (required by ./plato)
./plato: /lib/libc.so.6: version `GLIBC_2.34' not found (required by ./plato)
baskerville commented 1 year ago

/usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin

It seems you're compiling using GCC 11. That would explain the GLIBC version mismatches.

momijizukamori commented 1 year ago

Okay, after staring at a bunch of compiler errors for a while, I finally figured it out - I was using the toolchain linked in #292 after I had failed trying to build with the one from the Kobo repos, but the link there is bad - it links to the non-hf toolchain, not the hf one, and thus doesn't actually provide a version of arm-linux-gnueabihf-gcc to use, just arm-linux-gnueabi-gcc, so cargo falls back on system binaries, and the only installable arm-linux-gnueabihf-gcc version on Ubuntu 22.04 is for GCC 11. Once I cleaned up the failed builds and put the right toolchain first in my path, it worked like a charm.