Recent

Author Topic: linking error about libicu.so and libandroidicu.so on android 13 (no such files)  (Read 1034 times)

Key-Real

  • Full Member
  • ***
  • Posts: 201
I'm trying to compile a native app on my tablet with android 13 and termux.
I use fpc 3.2.2 for aarch64 for Android.
I have installed the libicu and libicu-static packages, its the version 72.1

I searched for libicu.so, there is no one on my system.

what to do?

fpc gives me:
Code: Pascal  [Select][+][-]
  1. Linking test
  2. /data/data/com.termux/files/usr/bin/ld.bfd: warning: libicu.so, needed by /system/lib64//libharfbuzz_ng.so, not found (try using -rpath or -rpath-link)
  3. /data/data/com.termux/files/usr/bin/ld.bfd: warning: libandroidicu.so, needed by /system/lib64//libandroid_runtime.so, not found (try using -rpath or -rpath-link)
  4. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libandroid_runtime.so: undefined reference to `u_getIntPropertyMaxValue_android@LIBANDROIDICU_EXTERNAL_1'
  5. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `XzUnpacker_SetOutBuf'
  6. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `uregex_matches_android@LIBANDROIDICU_EXTERNAL_1'
  7. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `XzUnpacker_Code'
  8. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libandroid_runtime.so: undefined reference to `u_charMirror_android@LIBANDROIDICU_EXTERNAL_1'
  9. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libandroid_runtime.so: undefined reference to `u_charType_android@LIBANDROIDICU_EXTERNAL_1'
  10. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `OpenSSL_add_all_algorithms'
  11. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `HMAC_CTX_cleanup'
  12. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `uscript_getShortName@LIBICU_31'
  13. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_close_android@LIBANDROIDICU_EXTERNAL_1'
  14. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_CIPHER_CTX_cleanup'
  15. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_CIPHER_key_length'
  16. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `HMAC_CTX_init'
  17. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucnv_getNextUChar_android@LIBANDROIDICU_EXTERNAL_1'
  18. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `XzUnpacker_Construct'
  19. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libpdfium.so: undefined reference to `u_isalnum@LIBICU_31'
  20. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libpdfium.so: undefined reference to `u_toupper@LIBICU_31'
  21. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_CIPHER_iv_length'
  22. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_setPara_android@LIBANDROIDICU_EXTERNAL_1'
  23. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libandroid_runtime.so: undefined reference to `u_getIntPropertyValue_android@LIBANDROIDICU_EXTERNAL_1'
  24. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `uregex_close_android@LIBANDROIDICU_EXTERNAL_1'
  25. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_open_android@LIBANDROIDICU_EXTERNAL_1'
  26. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `u_getCombiningClass@LIBICU_31'
  27. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ucol_setAttribute_android@LIBANDROIDICU_EXTERNAL_1'
  28. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmediadrm.so: undefined reference to `mediametrics_setUid@LIBMEDIAMETRICS_1'
  29. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_detectAll_android@LIBANDROIDICU_EXTERNAL_1'
  30. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `u_getIntPropertyMaxValue@LIBICU_31'
  31. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ucol_strcoll_android@LIBANDROIDICU_EXTERNAL_1'
  32. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `utext_close_android@LIBANDROIDICU_EXTERNAL_1'
  33. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `uloc_addLikelySubtags_android@LIBANDROIDICU_EXTERNAL_1'
  34. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `uloc_canonicalize_android@LIBANDROIDICU_EXTERNAL_1'
  35. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `uscript_getScript_android@LIBANDROIDICU_EXTERNAL_1'
  36. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `Crc64GenerateTable'
  37. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `u_charMirror@LIBICU_31'
  38. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `u_hasBinaryProperty_android@LIBANDROIDICU_EXTERNAL_1'
  39. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ubrk_first_android@LIBANDROIDICU_EXTERNAL_1'
  40. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ucol_strcollIter_android@LIBANDROIDICU_EXTERNAL_1'
  41. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_following_android@LIBANDROIDICU_EXTERNAL_1'
  42. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `u_strToUTF8_android@LIBANDROIDICU_EXTERNAL_1'
  43. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `u_foldCase_android@LIBANDROIDICU_EXTERNAL_1'
  44. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `unorm2_getNFCInstance@LIBICU_31'
  45. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucnv_open_android@LIBANDROIDICU_EXTERNAL_1'
  46. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libpdfium.so: undefined reference to `u_isalpha@LIBICU_31'
  47. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_getName_android@LIBANDROIDICU_EXTERNAL_1'
  48. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `uregex_open_android@LIBANDROIDICU_EXTERNAL_1'
  49. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libandroid_runtime.so: undefined reference to `u_charDirection_android@LIBANDROIDICU_EXTERNAL_1'
  50. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_open_android@LIBANDROIDICU_EXTERNAL_1'
  51. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `uregex_setText_android@LIBANDROIDICU_EXTERNAL_1'
  52. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_cleanup'
  53. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `u_strToUpper_android@LIBANDROIDICU_EXTERNAL_1'
  54. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucnv_convertEx_android@LIBANDROIDICU_EXTERNAL_1'
  55. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `u_countChar32@LIBICU_31'
  56. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `unorm2_getRawDecomposition_android@LIBANDROIDICU_EXTERNAL_1'
  57. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmediadrm.so: undefined reference to `mediametrics_create@LIBMEDIAMETRICS_1'
  58. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_open_android@LIBANDROIDICU_EXTERNAL_1'
  59. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_setClassCallback_android@LIBANDROIDICU_EXTERNAL_1'
  60. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_setText_android@LIBANDROIDICU_EXTERNAL_1'
  61. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_getParaLevel_android@LIBANDROIDICU_EXTERNAL_1'
  62. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `uloc_toLanguageTag_android@LIBANDROIDICU_EXTERNAL_1'
  63. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `uiter_setUTF8_android@LIBANDROIDICU_EXTERNAL_1'
  64. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `CrcGenerateTable'
  65. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ucol_open_android@LIBANDROIDICU_EXTERNAL_1'
  66. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `u_isspace_android@LIBANDROIDICU_EXTERNAL_1'
  67. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `unorm2_getNFDInstance_android@LIBANDROIDICU_EXTERNAL_1'
  68. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `u_errorName_android@LIBANDROIDICU_EXTERNAL_1'
  69. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `unorm2_getRawDecomposition@LIBICU_31'
  70. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_isBoundary_android@LIBANDROIDICU_EXTERNAL_1'
  71. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ubrk_current_android@LIBANDROIDICU_EXTERNAL_1'
  72. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucnv_close_android@LIBANDROIDICU_EXTERNAL_1'
  73. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_close_android@LIBANDROIDICU_EXTERNAL_1'
  74. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `ucol_close_android@LIBANDROIDICU_EXTERNAL_1'
  75. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_getConfidence_android@LIBANDROIDICU_EXTERNAL_1'
  76. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `XzUnpacker_Free'
  77. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libpdfium.so: undefined reference to `u_isspace@LIBICU_31'
  78. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `Xzs_ReadBackward'
  79. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_next_android@LIBANDROIDICU_EXTERNAL_1'
  80. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_getVisualRun_android@LIBANDROIDICU_EXTERNAL_1'
  81. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmediadrm.so: undefined reference to `mediametrics_setCString@LIBMEDIAMETRICS_1'
  82. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `unorm2_composePair@LIBICU_31'
  83. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmediadrm.so: undefined reference to `mediametrics_delete@LIBMEDIAMETRICS_1'
  84. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libpdfium.so: undefined reference to `u_tolower@LIBICU_31'
  85. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_close_android@LIBANDROIDICU_EXTERNAL_1'
  86. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `Xzs_GetNumBlocks'
  87. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_MD_size'
  88. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `uloc_forLanguageTag_android@LIBANDROIDICU_EXTERNAL_1'
  89. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `Xzs_Construct'
  90. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `uscript_getScript@LIBICU_31'
  91. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `XzUnpacker_PrepareToRandomBlockDecoding'
  92. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmedia.so: undefined reference to `ucsdet_detect_android@LIBANDROIDICU_EXTERNAL_1'
  93. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubidi_countRuns_android@LIBANDROIDICU_EXTERNAL_1'
  94. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `u_strToLower_android@LIBANDROIDICU_EXTERNAL_1'
  95. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libunwindstack.so: undefined reference to `Xzs_Free'
  96. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `utext_openUChars_android@LIBANDROIDICU_EXTERNAL_1'
  97. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libsqlite.so: undefined reference to `EVP_CIPHER_block_size'
  98. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libmediadrm.so: undefined reference to `mediametrics_selfRecord@LIBMEDIAMETRICS_1'
  99. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libminikin.so: undefined reference to `ubrk_setUText_android@LIBANDROIDICU_EXTERNAL_1'
  100. /data/data/com.termux/files/usr/bin/ld.bfd: /system/lib64//libharfbuzz_ng.so: undefined reference to `u_getIntPropertyValue@LIBICU_31'
  101. test.pas(116,20) Error: Error while linking
  102.  

Key-Real

  • Full Member
  • ***
  • Posts: 201
I found all this files at:

/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/33

on my linux mashine.

now it compiles, but I can't verify that this works correct at this moment.
« Last Edit: January 22, 2023, 11:07:12 pm by Key-Real »

Seenkao

  • Hero Member
  • *****
  • Posts: 550
    • New ZenGL.
По всему, что вы написали, непонятно что вы хотите сделать.

Если просто запустить файл из консоли, как обычное консольное приложение, то запускайте его как обычно в Linux.
Если вы хотите запустить графическое приложение, то здесь всё гораздо сложнее. Вам нужны примеры того, как запускали такие приложения из консоли. Потому что консоль не будет считаться графическим сервером (как минимум не должно считаться).

Если вы хотите создать приложение для любого Android то надо создавать APK-файл в любом случае. И для этого лучше создавать приложение через java-код и вызывать необходимые нативные методы.

Google translate:
From what you wrote, it's not clear what you want to do.

If you just run the file from the console, like a normal console application, then run it as usual in Linux.
If you want to run a graphical application, then everything is much more complicated here. You need examples of how such applications were launched from the console. Because the console will not be considered a graphical server (at least it should not be).

If you want to create an application for any Android, then you need to create an APK file anyway. And for this it is better to create an application through java code and call the necessary native methods.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

 

TinyPortal © 2005-2018