box86
box86 copied to clipboard
Dropbox in Box86
Hi,
I am trying to run Dropbox (headless) in box86 as it is too slow under qemu to be of any use. However, I run it this way:
BOX86_LD_LIBRARY_PATH=.:lib:/usr/i686-linux-gnu/lib box86 /root/.dropbox-dist/dropbox-lnx.x86-74.4.115/dropbox.
Where /usr/i686-linux-gnu contains the i386 libc and other libs (ubuntu package libc6-i386-cross). However, it crashes with the following error messages:
BOX86_LD_LIBRARY_PATH: ./:lib/:/usr/i686-linux-gnu/lib/ Using default BOX86_PATH: ./:bin/ Counted 12 Env var Looking for /root/.dropbox-dist/dropbox-lnx.x86-74.4.115/dropbox.i686 Using native(wrapped) libpthread.so.0 Using native(wrapped) libdl.so.2 Using emulated /usr/i686-linux-gnu/lib/libutil.so.1 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux.so.2 Using native(wrapped) librt.so.1 Using native(wrapped) libm.so.6 Warning, don't know of to handle rel #2 type: 0xe (unknown) (0xb6f42ff0) Error: Symbol grantpt not found, cannot apply R_386_JMP_SLOT @0xb6f43010 (0x1056) Error: Symbol endutent not found, cannot apply R_386_JMP_SLOT @0xb6f43014 (0x1066) Error: Symbol pututline not found, cannot apply R_386_JMP_SLOT @0xb6f43024 (0x10a6) Error: Symbol ptsname_r not found, cannot apply R_386_JMP_SLOT @0xb6f43028 (0x10b6) Error: Symbol ttyname_r not found, cannot apply R_386_JMP_SLOT @0xb6f43050 (0x1156) Error: Symbol setutent not found, cannot apply R_386_JMP_SLOT @0xb6f43054 (0x1166) Error: Symbol unlockpt not found, cannot apply R_386_JMP_SLOT @0xb6f43064 (0x11a6) Error: Symbol utmpname not found, cannot apply R_386_JMP_SLOT @0xb6f43068 (0x11b6) Error: Symbol updwtmp not found, cannot apply R_386_JMP_SLOT @0xb6f4306c (0x11c6) Error: Symbol getutline_r not found, cannot apply R_386_JMP_SLOT @0xb6f43070 (0x11d6) Error: Symbol getpt not found, cannot apply R_386_JMP_SLOT @0xb6f43074 (0x11e6) Error: Symbol fexecve not found, cannot apply R_386_JMP_SLOT @0xb6c46060 (0x6e596) Error: Symbol siginterrupt not found, cannot apply R_386_JMP_SLOT @0xb6c460d4 (0x6e766) Error: Symbol llistxattr not found, cannot apply R_386_JMP_SLOT @0xb6c460f4 (0x6e7e6) Error: Symbol ttyname not found, cannot apply R_386_JMP_SLOT @0xb6c46134 (0x6e8e6) Error: Symbol getgrouplist not found, cannot apply R_386_JMP_SLOT @0xb6c46174 (0x6e9e6) Error: Symbol sched_setscheduler not found, cannot apply R_386_JMP_SLOT @0xb6c46184 (0x6ea26) Error: Symbol sched_getscheduler not found, cannot apply R_386_JMP_SLOT @0xb6c46198 (0x6ea76) Error: Symbol fremovexattr not found, cannot apply R_386_JMP_SLOT @0xb6c461b0 (0x6ead6) Error: Symbol ctermid not found, cannot apply R_386_JMP_SLOT @0xb6c461e0 (0x6eb96) Error: Symbol __xmknodat not found, cannot apply R_386_JMP_SLOT @0xb6c461f8 (0x6ebf6) Error: Symbol lsetxattr not found, cannot apply R_386_JMP_SLOT @0xb6c461fc (0x6ec06) Error: Symbol mkdirat not found, cannot apply R_386_JMP_SLOT @0xb6c46208 (0x6ec36) Error: Symbol getloadavg not found, cannot apply R_386_JMP_SLOT @0xb6c4620c (0x6ec46) Error: Symbol fgetxattr not found, cannot apply R_386_JMP_SLOT @0xb6c46210 (0x6ec56) Error: Symbol renameat not found, cannot apply R_386_JMP_SLOT @0xb6c46214 (0x6ec66) Error: Symbol sigwait not found, cannot apply R_386_JMP_SLOT @0xb6c46244 (0x6ed26) Error: Symbol fchownat not found, cannot apply R_386_JMP_SLOT @0xb6c4624c (0x6ed46) Error: Symbol tcsetpgrp not found, cannot apply R_386_JMP_SLOT @0xb6c4625c (0x6ed86) Error: Symbol getservbyport not found, cannot apply R_386_JMP_SLOT @0xb6c46260 (0x6ed96) Error: Symbol sigwaitinfo not found, cannot apply R_386_JMP_SLOT @0xb6c46280 (0x6ee16) Error: Symbol __wcsncpy_chk not found, cannot apply R_386_JMP_SLOT @0xb6c46290 (0x6ee56) Error: Symbol openat64 not found, cannot apply R_386_JMP_SLOT @0xb6c46294 (0x6ee66) Error: Symbol fchmodat not found, cannot apply R_386_JMP_SLOT @0xb6c462a0 (0x6ee96) Error: Symbol symlinkat not found, cannot apply R_386_JMP_SLOT @0xb6c462d8 (0x6ef76) Error: Symbol if_nameindex not found, cannot apply R_386_JMP_SLOT @0xb6c46304 (0x6f026) Error: Symbol readlinkat not found, cannot apply R_386_JMP_SLOT @0xb6c46324 (0x6f0a6) Error: Symbol removexattr not found, cannot apply R_386_JMP_SLOT @0xb6c46328 (0x6f0b6) Error: Symbol tcgetpgrp not found, cannot apply R_386_JMP_SLOT @0xb6c46334 (0x6f0e6) Error: Symbol flistxattr not found, cannot apply R_386_JMP_SLOT @0xb6c46338 (0x6f0f6) Error: Symbol setxattr not found, cannot apply R_386_JMP_SLOT @0xb6c46344 (0x6f126) Error: Symbol preadv64 not found, cannot apply R_386_JMP_SLOT @0xb6c46388 (0x6f236) Error: Symbol sched_getparam not found, cannot apply R_386_JMP_SLOT @0xb6c46390 (0x6f256) Error: Symbol __open64_2 not found, cannot apply R_386_JMP_SLOT @0xb6c4643c (0x6f506) Error: Symbol accept4 not found, cannot apply R_386_JMP_SLOT @0xb6c46448 (0x6f536) Error: Symbol lremovexattr not found, cannot apply R_386_JMP_SLOT @0xb6c46468 (0x6f5b6) Error: Symbol posix_fallocate64 not found, cannot apply R_386_JMP_SLOT @0xb6c46478 (0x6f5f6) Error: Symbol fsetxattr not found, cannot apply R_386_JMP_SLOT @0xb6c46498 (0x6f676) Error: Symbol mkfifoat not found, cannot apply R_386_JMP_SLOT @0xb6c464b0 (0x6f6d6) Error: Symbol getxattr not found, cannot apply R_386_JMP_SLOT @0xb6c464bc (0x6f706) Error: Symbol pause not found, cannot apply R_386_JMP_SLOT @0xb6c464f4 (0x6f7e6) Error: Symbol lgetxattr not found, cannot apply R_386_JMP_SLOT @0xb6c46510 (0x6f856) Error: Symbol faccessat not found, cannot apply R_386_JMP_SLOT @0xb6c46518 (0x6f876) Error: Symbol if_freenameindex not found, cannot apply R_386_JMP_SLOT @0xb6c46544 (0x6f926) Error: Symbol sigtimedwait not found, cannot apply R_386_JMP_SLOT @0xb6c4657c (0x6fa06) Error: Symbol lockf64 not found, cannot apply R_386_JMP_SLOT @0xb6c46590 (0x6fa56) Error: Symbol unlinkat not found, cannot apply R_386_JMP_SLOT @0xb6c46594 (0x6fa66) Error: Symbol linkat not found, cannot apply R_386_JMP_SLOT @0xb6c46598 (0x6fa76) Error: Symbol listxattr not found, cannot apply R_386_JMP_SLOT @0xb6c465d8 (0x6fb76) Error: Symbol futimens not found, cannot apply R_386_JMP_SLOT @0xb6c465ec (0x6fbc6) Error: Symbol getitimer not found, cannot apply R_386_JMP_SLOT @0xb6c465f4 (0x6fbe6) Error: Symbol confstr not found, cannot apply R_386_JMP_SLOT @0xb6c46600 (0x6fc16) Error: Symbol __fxstatat64 not found, cannot apply R_386_JMP_SLOT @0xb6c46604 (0x6fc26) Error: Symbol pthread_getcpuclockid not found, cannot apply R_386_JMP_SLOT @0xb6c46610 (0x6fc56) Error: Symbol __sched_cpualloc not found, cannot apply R_386_JMP_SLOT @0xb6c46624 (0x6fca6) Error: Symbol __sched_cpufree not found, cannot apply R_386_JMP_SLOT @0xb6c46628 (0x6fcb6) Error: Symbol sched_rr_get_interval not found, cannot apply R_386_JMP_SLOT @0xb6c46640 (0x6fd16) Error: Symbol sched_setparam not found, cannot apply R_386_JMP_SLOT @0xb6c4664c (0x6fd46) Error: Symbol pwritev64 not found, cannot apply R_386_JMP_SLOT @0xb6c46650 (0x6fd56) dropbox: locating interpreter dropbox: logging to /tmp/dropbox-antifreeze-fABMYL dropbox: initializing dropbox: initializing python 3.7.2 dropbox: setting program path '/root/.dropbox-dist/dropbox-lnx.x86-74.4.115/dropbox.i686' dropbox: setting home path '/root/.dropbox-dist/dropbox-lnx.x86-74.4.115' dropbox: setting python path '/root/.dropbox-dist/dropbox-lnx.x86-74.4.115:/root/.dropbox-dist/dropbox-lnx.x86-74.4.115/python-packages-37.zip' Segmentation fault (core dumped)
What is wrong here? The installed libraries I try to use? It would be nice to have some more standard libraries natively wrapped like libc6, libssl and so on.
So, that's a lot of unwrapped functions.
I guess some may comes for libutil.so that is emulated. I'll see if I can that lib to the list of wrapped one.
I'll try to get that dropbox executable, so I can test myself. I assume the crash is because of some unwrapped function for now.
Now, about other libs, libssl is added, but there are just a handfull of function wrapped for now.
So I have added some function, but many are still missing (but it may go a bit farther).
With latest commit, dropbox seems to launch... until it crash. I get :
Using default BOX86_LD_LIBRARY_PATH: ./:lib/
Using default BOX86_PATH: ./:bin/
Counted 60 Env var
Looking for dropbox
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using emulated /mnt/utmp/codeblocks/usr/lib/i386-linux-gnu/libutil.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libm.so.6
Warning, don't know of to handle rel #4 type: 0xe (unknown) (0x40133ff0)
dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-Zeqzjx
dropbox: initializing
dropbox: initializing python 3.7.2
dropbox: setting program path '/media/sda1/sources/dropbox/.dropbox-dist/dropbox-lnx.x86-76.3.110/dropbox'
dropbox: setting home path '/media/sda1/sources/dropbox/.dropbox-dist/dropbox-lnx.x86-76.3.110'
dropbox: setting python path '/media/sda1/sources/dropbox/.dropbox-dist/dropbox-lnx.x86-76.3.110:/media/sda1/sources/dropbox/.dropbox-dist/dropbox-lnx.x86-76.3.110/python-packages-37.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
Using emulated /media/sda1/sources/dropbox/.dropbox-dist/dropbox-lnx.x86-76.3.110/_heapq.cpython-37m-i386-linux-gnu.so
dropbox: running main script
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "dropbox/__init__.pyc", line 10, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "dropbox/overrides.pyc", line 71, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "build_number/__init__.pyc", line 23, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "build_number/_frozen_version.pyc", line 3, in <module>
File "build_number/versions.pyc", line 186, in __init__
AssertionError: Bad platform 'lnx.armv7l'
!! dropbox: fatal python exception:
['Traceback (most recent call last):\n', ' File "<frozen importlib._bootstrap>", line 983, in _find_and_load\n', ' File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 668, in _load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible\n', ' File "dropbox/__init__.pyc", line 10, in <module>\n', ' File "<frozen importlib._bootstrap>", line 983, in _find_and_load\n', ' File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 668, in _load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible\n', ' File "dropbox/overrides.pyc", line 71, in <module>\n', ' File "<frozen importlib._bootstrap>", line 983, in _find_and_load\n', ' File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 668, in _load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible\n', ' File "build_number/__init__.pyc", line 23, in <module>\n', ' File "<frozen importlib._bootstrap>", line 983, in _find_and_load\n', ' File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 668, in _load_unlocked\n', ' File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible\n', ' File "build_number/_frozen_version.pyc", line 3, in <module>\n', ' File "build_number/versions.pyc", line 186, in __init__\n', "AssertionError: Bad platform 'lnx.armv7l'\n"] (error 3)
Segmentation fault
So it seems it detect my true cpu "armv7l" and crash with that. Not sure how to fix that.
That is Python. I am figuring how that could be solved.
Ok, with commit 8c285de23c0227930f5df9731a493c3f8dee113b dropbox seems to load much farther now, I guess you can try again @lunderhage
Yeah, we get past the cpu architecture check.
I get even further by force installing libffi6 for i386: dpkg --force all -i /tmp/libffi6_3.2.1-9_i386.deb (it's a docker container anyway)
librsync1_0.9.7-10build1_i386.deb is needed as well.
This is the current state after installing those two i386 libraries:
dropbox-box86_1 | dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/linuxffi.gnu.compiled._linuxffi_gnu.cpython-37m-i386-linux-gnu.so' dropbox-box86_1 | Using emulated /home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/linuxffi.gnu.compiled._linuxffi_gnu.cpython-37m-i386-linux-gnu.so dropbox-box86_1 | Using emulated /home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/_yappi.cpython-37m-i386-linux-gnu.so dropbox-box86_1 | Using emulated /home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/nucleus_python.cpython-37m-i386-linux-gnu.so dropbox-box86_1 | thread panicked while processing panic. aborting. dropbox-box86_1 | 0022|0xb2c6efe6: Unimplemented Opcode 0F 0B 0F 0B B9 01 00 00 docker-dropbox-box86-arm_dropbox-box86_1 exited with code 72
That "thread panicked while processing panic" doesn't sounds good.
Also the OpCode "0F 0B" is "Undefined Opcode 2", i.e. ud2
: an opcode who sole purpose is to trigger an invalid opcode interruption. That doesn't sounds too good either.
According to this post it could work to delete nucleus_python.cpython-37m-i386-linux-gnu.so in the dropbox installation: https://www.dropboxforum.com/t5/Installs-integrations/Linux-Dropbox-doesn-t-start-Illegal-instruction/td-p/319640
Then it segfaults this way instead: dropbox-box86_1 | dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/linuxffi.gnu.compiled._linuxffi_gnu.cpython-37m-i386-linux-gnu.so' dropbox-box86_1 | Using emulated /home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/linuxffi.gnu.compiled._linuxffi_gnu.cpython-37m-i386-linux-gnu.so dropbox-box86_1 | Using emulated /home/dropbox/.dropbox-dist/dropbox-lnx.x86-76.4.126/_yappi.cpython-37m-i386-linux-gnu.so dropbox-box86_1 | Warning, call to __cxa_thread_atexit_impl(0xb4d4bd30, 0xa5201824, 0xb4e9693c) ignored dropbox-box86_1 | Warning, call to __cxa_thread_atexit_impl(0xb4d48360, 0xa520184c, 0xb4e9693c) ignored dropbox-box86_1 | Segmentation fault (core dumped) docker-dropbox-box86-arm_dropbox-box86_1 exited with code 139
Can you try if it's working now, and close the ticket if it does?
Made an attempt today:
Box86 v0.1.9 0a3c6788 built on Jan 5 2021 14:43:32 dropbox: locating interpreter dropbox: logging to /tmp/dropbox-antifreeze-899lq9 dropbox: initializing dropbox: initializing python 3.7.9 dropbox: setting program path '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/dropbox.i686' dropbox: setting python path '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321:/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/python-packages.zip' dropbox: python initialized dropbox: running dropbox dropbox: setting args dropbox: enabling allocator metrics dropbox: applying overrides dropbox: running main script dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/cryptography.hazmat.bindings._constant_time.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/cryptography.hazmat.bindings._openssl.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/cryptography.hazmat.bindings._padding.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/psutil._psutil_linux.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/psutil._psutil_posix.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/apex._apex.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/tornado.speedups.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/wrapt._wrappers.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/PyQt5.QtWidgets.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/PyQt5.QtCore.cpython-37m-i386-linux-gnu.so' dropbox: load fq extension '/home/dropbox/.dropbox-dist/dropbox-lnx.x86-112.4.321/PyQt5.QtGui.cpython-37m-i386-linux-gnu.so' 0030|Double SIGSEGV! 0029|SIGSEGV @0x628b4646 (???(box86/0x628b4646)) (x86pc=0x62ad308f/???:"???", esp=0xab833c90), for accessing (nil) (code=1) 0032|Double SIGSEGV!
Was there any progress on this? I am also interested in getting DB to work on an odroid board using box86
@pimaster3141 Maybe give it a try and see? If it crashes, a new error log might be helpful too
It seems to be working now
Can the ticket be closed?