< 返回版块

silent-rain 发表于 2023-04-13 11:21

Tags:tauri,sqlite3,compile,app

问题:使用 tauri 开发 App 在编译 sqlite3 过程中异常

问题描述

  1. 想在 Android 中使用 sqlite3 作为本地数据存储;
  2. 将 rusqlite 库引入,并在代码中进行 demo 测试;
  3. 编译后出现:ld: error: undefined symbol: __extenddftf2

引入 rusqlite 库

[lib]
crate-type = ["staticlib", "cdylib", "rlib"]

[dependencies]
rusqlite = { version = "0.29.0", features = ["bundled"] }

使用

use rusqlite::{Connection, Result};
let conn = Connection::open_in_memory()?;

cargo tauri android build 编译报错信息

error: linking with `/home/one/.android/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang` failed: exit status: 1lease
  |
  = note: LC_ALL="C" PATH="/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/one/.local/bin:/home/one/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/bin/remote-cli:/home/one/.local/bin:/home/one/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/opt/go/bin:/home/one/.go/bin:/opt/go/bin:/home/one/.go/bin" VSLANG="1033" "/home/one/.android/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang" "-m64" "/tmp/rustcg57XkO/symbols.o" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/chat_gpt-e6816658f68504ea.chat_gpt.d26f5c00-cgu.0.rcgu.o" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/chat_gpt-e6816658f68504ea.chat_gpt.d26f5c00-cgu.1.rcgu.o" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/chat_gpt-e6816658f68504ea.chat_gpt.d26f5c00-cgu.2.rcgu.o" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/chat_gpt-e6816658f68504ea.218v97glfufhogkn.rcgu.o" "-Wl,--as-needed" "-L" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps" "-L" "/home/one/code/chat-gpt-gui-dev/server/target/release/deps" "-L" "/home/one/code/chat-gpt-gui-dev/server/.cargo" "-L" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/build/libsqlite3-sys-c6837ab9c4aabcfc/out" "-L" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib" "-Wl,-Bstatic" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libchat_gpt.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtracing_subscriber-7568f484c0ec8b2e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libnu_ansi_term-f11f495a2fab9c06.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liboverload-0603423fa9119ebc.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsharded_slab-58f6669bc144f3ec.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmatchers-c5f5f5ab15c59860.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libregex_automata-41d785a23bb896a3.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtracing_log-5a942c13b8af15db.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtoml-62f12d934abb4f7a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtoml_edit-83a2553d8f8a8715.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserde_spanned-24ccfd91b08ba16f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libwinnow-c47342153bfa6ced.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtoml_datetime-c42d15451692119a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libwindow_vibrancy-37fc728d7ee42d36.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libdotenv-a8a5f7c3579f6618.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/librusqlite-83f5b15f1c677666.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbitflags-b4c5bbdb2e7577cb.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfallible_streaming_iterator-95e33d9a6faf34bb.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfallible_iterator-07fd6bd26257eff5.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhashlink-1f7b9890a7d76979.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtauri-a675b668149963c0.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libheck-4080157b140ebd33.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libos_info-578ac14c44a3ffed.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libopen-aae666fb077d13ba.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libpathdiff-4c216ec8003c578e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libzip-5e31fe8fda0b5c3e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtar-7a6766d2d4003ba8.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libxattr-40afbb449c837145.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfiletime-e8ce398ba0e7376d.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libflate2-97ce8f12be9bd779.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libminiz_oxide-c65308ff67db3134.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libadler-d3a3c75b431f0e31.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcrc32fast-a81661efbabe71b9.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtauri_runtime_wry-e5f2cf3607251166.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/librand-97f2b2a4c4b94436.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/librand_chacha-5ac9adaedaa23edd.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libppv_lite86-c350c7bddf5352e1.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/librand_core-1848070389b73578.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libwry-244f7a110ca611b6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbase64-b9d0e59cc5265218.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsha2-7659ad1abbb5f9d6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcpufeatures-3e69e25a278f3a32.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libdigest-b5bc401780ec629b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libblock_buffer-33b0fb2b4b79eb00.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcrypto_common-bf695739ab07f956.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libgeneric_array-4b952780c3ed934d.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtypenum-6395585844b95fa5.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcrossbeam_channel-c2d8065c34116fbb.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcrossbeam_utils-a5c1a6d7b9073693.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtao-4a8e9e44a9cf5fbd.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libndk_context-725259725c446685.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libndk-2cb17393be51e50c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libndk_sys-cdd46e0ee81d32ff.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libnum_enum-f8ea36741fd2072a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libinstant-124b5e2a2b092772.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtime-18e676516075c99c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtime_core-33bd984d6b0f7eda.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libminisign_verify-07f3c11f22a12633.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libstate-ff8087d0fd62a8d3.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libanyhow-60573dfae357276c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtauri_runtime-3dceb8786fb488cb.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libjni-555282c9d37574db.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcesu8-23574fc5c98b9fe0.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcombine-2ffe7c2ffc7cf4a6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libjni_sys-f1cc80610726d307.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhttp_range-26d9b34dfe2d8e2b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtauri_utils-93dcf293ce396817.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libglob-cdb42a316c1829ac.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libinfer-d360e433d1633cd9.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcfb-23a9e8d75c9968b6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libuuid-913c87de7a2b6adf.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbrotli-fca1e160dd483ad5.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbrotli_decompressor-024c5feb2ca7bac7.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liballoc_stdlib-e8adaf27de34e95f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liballoc_no_stdlib-5c4d5e4ec44bb873.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libkuchiki-27533ec15711e6bd.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libselectors-8d3086bcb4190654.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libthin_slice-7d5cc9408f237d86.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libservo_arc-7575028053f0cf1b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libstable_deref_trait-7d712177b3cfab5e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libnodrop-9251dfaa69f23e55.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfxhash-55b6f90244fd587b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbyteorder-28e954ffa8932dec.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcssparser-44972c977e414d71.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libitoa-1daf2b8349c81b58.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libdtoa_short-68b634313c14e034.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libdtoa-415b319a49c174e5.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmatches-92c03ad10855182a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhtml5ever-0d24939d10146c94.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmarkup5ever-4163596d6b194e81.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libstring_cache-be6ab72a7729ce57.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libprecomputed_hash-9762752946803fd0.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libparking_lot-266af847e455728f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libparking_lot_core-96d100d17dad1661.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsmallvec-b262b22990216b15.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblock_api-669bc605ab586020.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libscopeguard-8181409be0bf4da6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libphf-87033511d6fdf6e3.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libphf_shared-021b65dc687d5dfe.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtendril-041661d8a5775c89.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libutf8-23bea3f45afd8724.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutf-26cdcaf6b75dc16f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libdebug_unreachable-69b1ad3704faa55c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmac-eeddca3bf4a2f235.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libjson_patch-d2bf11099c178229.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtreediff-30d60367bb9cfc67.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libthiserror-8010f22a9fb62351.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserde_with-c2ed4daaea180178.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libphf-7f5416e5552ac0e6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libphf_shared-165a5408939d6e64.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsiphasher-e41bb5fee8e412b9.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libraw_window_handle-552304dd0d6730fc.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsemver-e5c105d8194d73a2.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserialize_to_javascript-23768381d124ebb4.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libreqwest-de5ae82d0f740217.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserde_urlencoded-a47931ca76b83662.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbase64-398909954c9de506.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libipnet-ed51d9139d5386c5.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmime-23a8c37dc938d627.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libencoding_rs-e0bc3360479fe6c8.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhyper-7cf23e0d9f870fe7.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libwant-2b16aed70a025984.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtry_lock-176c306e5067a85c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhttparse-1c27d1b49fc4af6d.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libh2-1439ef13c8aaa9cd.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libindexmap-a7df8d54be881f31.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhashbrown-9598268bfb5d90bf.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libahash-68c8d0caee4c596d.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libgetrandom-3979cc0686a7c35a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtower_service-16a724f5e4bb1bf6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutures_channel-67510b0640f270c9.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutures_util-272a84007b5be46e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libslab-4a0ce6f8c6f4a17c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutures_task-8f63f29f69b05eff.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libpin_utils-d6d21d7cf5157d03.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtokio_util-c886d3a27d0752b6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtracing-f266dc02907f8b57.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtracing_core-c72938a477ecc3b9.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutures_sink-13517a0df26550fb.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtokio-70606d47488d91be.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libnum_cpus-6eb5c853a0512553.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsocket2-481d1f8b2a9f3f48.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmio-1b6203accb8e7ae6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhttp_body-2d8e8479f9549d70.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libpin_project_lite-6fa847e251b7dd4f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfutures_core-27f7309e35231f73.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liburl-f4efcfcc6e6dbff2.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libidna-232b83806833f7a1.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libunicode_normalization-8390d79e694d520c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtinyvec-2f9a61c2a0115542.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtinyvec_macros-1b6ea393fc7d84e7.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libunicode_bidi-ae0e7bf924cee0ff.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libform_urlencoded-2bccd3599c80a0bd.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libpercent_encoding-799a5193730b4c03.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserde_json-eedf8dd9465e824c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libryu-b73cf36085406b7c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libhttp-6a534dc749b72d44.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libitoa-d118e0f70e03d24a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbytes-925b0a7402042b37.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libignore-abb3664be50793f6.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblazy_static-73406e02ae998d26.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libwalkdir-0de7e55d4265841c.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libsame_file-96fd2a245a1d3105.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libthread_local-c05e81ae68722513.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libonce_cell-0de0f71c3f1b6169.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libglobset-669a65d2b1dbc355.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfnv-7292bef9b5bde389.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblog-392fdb3b78ee3f3f.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbstr-1cc68d6b82b88e27.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libtempfile-ef236c9958f74435.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libfastrand-3be7bc84c3438773.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/librustix-cb2baf9845d940ec.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblinux_raw_sys-b4bfcabc236d1688.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libbitflags-49a8c66d6891f7db.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liberrno-3ddef9b96e5954a1.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libio_lifetimes-0284435360cb344a.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibc-06a350c25f27ce9b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libcfg_if-f4e35a417d565c02.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libserde-c08a419924c5c83b.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libregex-66f143364492a0f3.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libaho_corasick-8356caca2ce0ae6e.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libmemchr-43049c840d392e37.rlib" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/libregex_syntax-fd8a4c4a45cf77bb.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libstd-4dfe509d60a53420.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libpanic_unwind-fe37e429764ebe2b.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libobject-598363a7112b09fb.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libmemchr-90e1142075c61ddd.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libaddr2line-1afe654f2c12bf22.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libgimli-195e41671a177346.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/librustc_demangle-603a112b4cadfbfa.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libstd_detect-bc08440e112deacd.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libhashbrown-a4cf0bc884032edb.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libminiz_oxide-bee55fe01f09293c.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libadler-4e8d2d2dfc2dd14c.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/librustc_std_workspace_alloc-7fb928d995c8447c.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libunwind-be2ab282478313f9.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libcfg_if-8e80fad7b09ec9dd.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/liblibc-f57d44639a9bec33.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/liballoc-041d1685acdd39f5.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/librustc_std_workspace_core-e9e3e381106ad9fb.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libcore-e3d2ffae725503a0.rlib" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib/libcompiler_builtins-acaa1817466f2fa3.rlib" "-Wl,-Bdynamic" "-landroid" "-ldl" "-llog" "-lunwind" "-ldl" "-lm" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/one/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-linux-android/lib" "-o" "/home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/chat_gpt-e6816658f68504ea" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-landroid" "-llog" "-lOpenSLES"
  = note: ld: error: undefined symbol: __extenddftf2
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 6 more times
          
          ld: error: undefined symbol: __trunctfdf2
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 3 more times
          
          ld: error: undefined symbol: __multf3
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 15 more times
          
          ld: error: undefined symbol: __addtf3
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          
          ld: error: undefined symbol: __gttf2
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3VdbeExec) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3MemCompare) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 3 more times
          
          ld: error: undefined symbol: __getf2
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 4 more times
          
          ld: error: undefined symbol: __divtf3
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3AtoF) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3AtoF) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          
          ld: error: undefined symbol: __lttf2
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 5 more times
          
          ld: error: undefined symbol: __fixtfsi
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 3 more times
          
          ld: error: undefined symbol: __floatsitf
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 3 more times
          
          ld: error: undefined symbol: __subtf3
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3_str_vappendf) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 3 more times
          
          ld: error: undefined symbol: __floatditf
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3AtoF) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3AtoF) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced by sqlite3.c
          >>>               sqlite3.o:(sqlite3VdbeExec) in archive /home/one/code/chat-gpt-gui-dev/server/target/x86_64-linux-android/release/deps/liblibsqlite3_sys-ea7d98fe4b9d0118.rlib
          >>> referenced 4 more times
          clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `chat_gpt` (bin "chat_gpt") due to previous error
       Error `Failed to run `cargo build`: Command "cargo build --package chat_gpt --manifest-path /home/one/code/chat-gpt-gui-dev/server/Cargo.toml --target x86_64-linux-android --features custom-protocol --release --color always" didn't complete successfully, exiting with code 101.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:rustBuildX86_64Release'.
> Process 'command '/home/one/.cargo/bin/cargo-tauri'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 4 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD FAILED in 4m 19s
       Error Failed to assemble APK: command ["/home/one/code/chat-gpt-gui-dev/server/gen/android/chat_gpt/gradlew", "--project-dir", "/home/one/code/chat-gpt-gui-dev/server/gen/android/chat_gpt"] exited with code 1: command ["/home/one/code/chat-gpt-gui-dev/server/gen/android/chat_gpt/gradlew", "--project-dir", "/home/one/code/chat-gpt-gui-dev/server/gen/android/chat_gpt"] exited with code 1

评论区

写评论
作者 silent-rain 2023-04-13 15:11

找到了一个临时解决方案有效解决了编译sqlite3 ld: error: undefined symbol: __extenddftf2 的问题

借用这里的思路:termux/termux-packages#8029

在.cargo/config.toml中针对异常的编译目标(x86_64-linux-android)添加rustflags参数,我的参数如下:

[target.x86_64-linux-android]
linker = '$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang'
rustflags = [
    '-L',
    '/home/one/code/chat-gpt-gui-dev/server/.cargo',
    '-Clink-arg=-landroid',
    '-Clink-arg=-llog',
    '-Clink-arg=-lOpenSLES',
    '-Clink-arg=-lOpenSLES',
    '-Clink-arg=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-x86_64-android.a',
]
1 共 1 条评论, 1 页