ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.91k stars 290 forks source link

Seafile Server Professional Edition is not working #725

Open DarkoGNU opened 1 year ago

DarkoGNU commented 1 year ago

Disclaimer: I'm completely new to box64

OS: Ubuntu 22.04.2 LTS Box: (installed from repo) Box64 with Dynarec v0.2.3 900f3877 built on Mar 22 2023 07:33:12 Platform: Ampere A1 (Neoverse-N1) (Oracle Cloud)

Background: Seafile Server is a self-hosted file cloud. It has the free & open-source Community Edition (with ARM builds) and the Professional Edition (closed-source, free up to 3 users (paid for more users), only x86_64 builds). Installation guide: https://manual.seafile.com/deploy_pro/download_and_setup_seafile_professional_server/

Architecture: As far as I know, the file server is written in C, and Seahub, which provides an interface (website + API) to the file server, is written in Python (using the Django framework). The file server is the problematic part.

When I try to start the file server, it fails in the following way:

ubuntu@test:/opt/seafile/seafile-server-latest$ ./seafile.sh start

Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096 Running on Neoverse-N1 with 1 Cores
Params database has 22 entries
Box64 with Dynarec v0.2.3 900f3877 built on Mar 22 2023 07:33:12
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 31 Env var
Looking for /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seafile-controller
argv[1]="-t"
argv[2]="-c"
argv[3]="/opt/seafile/ccnet"
argv[4]="-d"
argv[5]="/opt/seafile/seafile-data"
argv[6]="-F"
argv[7]="/opt/seafile/conf"
Rename process to "seafile-controller"
Using native(wrapped) libpthread.so.0
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libcrypto.so.1.1
Using native(wrapped) libuuid.so.1
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libevent-2.1.so.6
Using native(wrapped) libglib-2.0.so.0
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libjansson.so.4
Using native(wrapped) libz.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Look for sysctl in loaded elfs
Found symbol with version GLIBC_2.17, value = 0xffff8b900900
Error: Symbol g_list_insert_sorted_with_data not found, cannot apply R_X86_64_JUMP_SLOT @0xffff8b65ded0 (0x3cc6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seafile-controller
** Message: 00:24:14.911: seafile-controller.c(1023): loading seafdav config from /opt/seafile/conf/seafdav.conf

Error: Symbol xmlTextWriterStartElement not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e788 (0x10006) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlFreeTextWriter not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e880 (0x101f6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderConstLocalName not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e890 (0x10216) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlReaderForIO not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e898 (0x10226) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterSetIndent not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e8b0 (0x10256) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol lzma_stream_encoder_mt not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e908 (0x10306) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterWriteBase64 not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e918 (0x10326) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterEndElement not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e9b0 (0x10456) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterWriteAttribute not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5e9c8 (0x10486) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterWriteFormatAttribute not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ea18 (0x10526) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderRead not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ea40 (0x10576) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterWriteString not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ea58 (0x105a6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderIsEmptyElement not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5eb30 (0x10756) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderSetErrorHandler not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5eb60 (0x107b6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol lzma_cputhreads not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5eb80 (0x107f6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol lzma_crc32 not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5eb90 (0x10816) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterEndDocument not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ec08 (0x10906) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderNodeType not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ec20 (0x10936) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderConstValue not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ec30 (0x10956) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextWriterStartDocument not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ec58 (0x109a6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlNewTextWriterMemory not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ed28 (0x10b46) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderMoveToNextAttribute not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5edf0 (0x10cd6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlFreeTextReader not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ee78 (0x10de6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol xmlTextReaderMoveToFirstAttribute not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5eec0 (0x10e76) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: Symbol lzma_memusage not found, cannot apply R_X86_64_JUMP_SLOT @0xffffbcf5ef78 (0x10fe6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libarchive.so.13
Error: relocating Plt symbols in elf libarchive.so.13
Error: Symbol tfind not found, cannot apply R_X86_64_JUMP_SLOT @0xffffadcd8d18 (0x29a6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/librdmacm.so.1
Error: Symbol tdelete not found, cannot apply R_X86_64_JUMP_SLOT @0xffffadcd8de8 (0x2b46) in /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/librdmacm.so.1
Error: relocating Plt symbols in elf librdmacm.so.1
Error: loading needed libs in elf /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
failed to run "seaf-server -t" [65280]

Seahub (the second component) seems to work. It seems to work even with box64 uninstalled (well, it's written in Python). Note that I had to remove the check whether the file server is running from the startup script:

ubuntu@test:/opt/seafile/seafile-server-latest$ ./seahub.sh start 1000

LC_ALL is not set in ENV, set to en_US.UTF-8

Warning: seafile-controller not running. Have you run "./seafile.sh start" ?

Starting seahub at port 1000 ...

Error happened during creating seafile admin.

Seahub is started

Done.

ubuntu@test:/opt/seafile/seafile-server-latest$ ss -tunap | grep 1000
tcp   LISTEN    0      2048             0.0.0.0:1000          0.0.0.0:*     users:(("python3",pid=7379,fd=8),("python3",pid=7378,fd=8),("python3",pid=7377,fd=8),("python3",pid=7376,fd=8),("python3",pid=7375,fd=8),("python3",pid=7374,fd=8))

This is probably not helpful for you at all, but... it works perfectly under a similar emulator, FEX-Emu.

ptitSeb commented 1 year ago

Well, need to wrap all the missing functions. I'll try to do that this weekend...

DarkoGNU commented 1 year ago

Thank you 🥇

ptitSeb commented 1 year ago

Ok, I have added all the missing function. But it will probably not work yet, and I'll need a log with BOX64_DLSYM_ERROR=1 env. var.

DarkoGNU commented 1 year ago

@ptitSeb tested.

ubuntu@test:/opt/seafile/seafile-server-latest$ export BOX64_DLSYM_ERROR=1

ubuntu@test:/opt/seafile/seafile-server-latest$ ./seafile.sh start

Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096 Running on Neoverse-N1 with 1 Cores
Params database has 24 entries
Box64 with Dynarec v0.2.3 29e7497a built on Apr 23 2023 16:15:52
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 31 Env var
Looking for /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seafile-controller
argv[1]="-t"
argv[2]="-c"
argv[3]="/opt/seafile/ccnet"
argv[4]="-d"
argv[5]="/opt/seafile/seafile-data"
argv[6]="-F"
argv[7]="/opt/seafile/conf"
Rename process to "seafile-controller"
Using native(wrapped) libpthread.so.0
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libcrypto.so.1.1
Using native(wrapped) libuuid.so.1
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libevent-2.1.so.6
Using native(wrapped) libglib-2.0.so.0
Using emulated /opt/seafile/seafile-pro-server-10.0.3/seafile/lib/libjansson.so.4
Using native(wrapped) libz.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Look for sysctl in loaded elfs
Found symbol with version GLIBC_2.17, value = 0xffff928f0900
** Message: 16:35:53.706: seafile-controller.c(1023): loading seafdav config from /opt/seafile/conf/seafdav.conf

Error: Symbol g_async_queue_new_full not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ad9f40 (0xc306) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol ldap_search_s not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada0a0 (0xc5c6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol ldap_set_rebind_proc not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada0a8 (0xc5d6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_hmac_unref not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada390 (0xcba6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol ldap_err2string not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada420 (0xccc6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_thread_pool_new not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada480 (0xcd86) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_list_copy_deep not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada510 (0xcea6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol ldap_parse_page_control not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada5a8 (0xcfd6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_thread_pool_push not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada700 (0xd286) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol ldap_create_page_control not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada7f0 (0xd466) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_thread_pool_unprocessed not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada850 (0xd526) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_hmac_update not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada858 (0xd536) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_hmac_get_digest not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96ada9e0 (0xd846) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_thread_pool_free not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96adabb8 (0xdbf6) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Error: Symbol g_hmac_new not found, cannot apply R_X86_64_JUMP_SLOT @0xffff96adad70 (0xdf66) in /opt/seafile/seafile-pro-server-10.0.3/seafile/bin/seaf-server
Call to dlopen("liblttng-ust-tracepoint.so.0"/0xffff87b45745, 102)
Warning: Cannot dlopen("liblttng-ust-tracepoint.so.0"/0xffff87b45745, 102)
Call to dlopen("liblttng-ust-tracepoint.so.0"/0xffff87b45745, 102)
Warning: Cannot dlopen("liblttng-ust-tracepoint.so.0"/0xffff87b45745, 102)
Call to dlopen("libproviders.so"/0x3aa10430, 2)
Warning: Cannot dlopen("libproviders.so"/0x3aa10430, 2)
2023-04-23 16:35:55 ../common/seaf-utils.c(409): Use database Mysql
failed to run "seaf-server -t" [139]

More missing functions, I guess.

LukeShortCloud commented 3 weeks ago

Most, if not all, of these functions still have not been wrapped. This is probably still a valid issue.