Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Google Backup and Sync tool can't find libGL.so.1 (ELF) #342

Open
oscarbg opened this issue Sep 2, 2017 · 6 comments
Open

Running Google Backup and Sync tool can't find libGL.so.1 (ELF) #342

oscarbg opened this issue Sep 2, 2017 · 6 comments
Labels
Application Compatibility Darling needs fixes for compatibility with a specific Application

Comments

@oscarbg
Copy link

oscarbg commented Sep 2, 2017

using otool I get:
Darling [/Volumes/SystemRoot/media/ivan/datosx/progs2]$ otool -L Backup\ and\ Sync.app/Contents/MacOS/Backup\ and\ Sync
Backup and Sync.app/Contents/MacOS/Backup and Sync:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 2577.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.11.0)

running it I get:
Backup\ and\ Sync.app/Contents/MacOS/Backup\ and\ Sync
Cannot load libGL.so.1 (ELF): libGL.so.1: cannot open shared object file: No such file or directory
Abort trap: 6 (core dumped)

@stek29
Copy link
Contributor

stek29 commented Sep 2, 2017

GUI is not supported yet :(

@bugaevc
Copy link
Member

bugaevc commented Sep 2, 2017

Yes, GUI apps are not quite supported yet, but we'd still like to know more about this problem. Do you actually have libGL.so.1 on the host? Where is it? Can you check (with strace) why the process can't find it?

@oscarbg
Copy link
Author

oscarbg commented Sep 3, 2017

yeah I know that and don't report about lots of apps wanting Carbon framework but this error seemed strange as I'm on Ubuntu 17.04 and Nvidia 381.26.13 via ppa driver working.. I have libGL.so.1 everywhere now as I created symlinks to to /usr/lib/nvidia-381/libGL.so.1 in /usr/lib64 & /usr/lib in addition to existing /usr/lib/x86_64-..../libGL.so.1 also created links to /usr/lib32/nvidia-381/libGL.so.1 in /usr/lib32 in addition of existing /usr/lib/i386-.../ links.. and even updated sudo ldconfig so don't know much more to do..
will test strace later I'm writing that on Windows..

@oscarbg
Copy link
Author

oscarbg commented Sep 3, 2017

well running strace no clue either:
"strace darling shell /Volumes/SystemRoot/media/ivan/datosx/progs2/Backup\ and\ Sync.app/Contents/MacOS/Backup\ and\ Sync"

execve("/usr/local/bin/darling", ["darling", "shell", "/Volumes/SystemRoot/media/ivan/d"...], [/* 62 vars */]) = 0
brk(NULL)                               = 0xb91000
fcntl(0, F_GETFD)                       = 0
fcntl(1, F_GETFD)                       = 0
fcntl(2, F_GETFD)                       = 0
access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c3cbcb000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=300841, ...}) = 0
mmap(NULL, 300841, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6c3cb81000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=10656, ...}) = 0
mmap(NULL, 2105608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c3c7a6000
mprotect(0x7f6c3c7a8000, 2093056, PROT_NONE) = 0
mmap(0x7f6c3c9a7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f6c3c9a7000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\5\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1856752, ...}) = 0
mmap(NULL, 3959200, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c3c3df000
mprotect(0x7f6c3c59d000, 2093056, PROT_NONE) = 0
mmap(0x7f6c3c79c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bd000) = 0x7f6c3c79c000
mmap(0x7f6c3c7a2000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6c3c7a2000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c3cb7f000
arch_prctl(ARCH_SET_FS, 0x7f6c3cb7f700) = 0
mprotect(0x7f6c3c79c000, 16384, PROT_READ) = 0
mprotect(0x7f6c3c9a7000, 4096, PROT_READ) = 0
mprotect(0x606000, 4096, PROT_READ)     = 0
mprotect(0x7f6c3cbce000, 4096, PROT_READ) = 0
munmap(0x7f6c3cb81000, 300841)          = 0
geteuid()                               = 1001
readlink("/proc/self/exe", "/usr/local/bin/darling", 4095) = 22
write(2, "Sorry, the `/usr/local/bin/darli"..., 83Sorry, the `/usr/local/bin/darling' binary is not setuid root, which is mandatory.
) = 83
write(2, "Darling needs this in order to c"..., 86Darling needs this in order to create mount and PID namespaces and to perform mounts.
) = 86
exit_group(1)                           = ?
+++ exited with 1 +++

worried about:

write(2, "Sorry, the `/usr/local/bin/darli"..., 83Sorry, the `/usr/local/bin/darling' binary is not setuid root, which is mandatory.
) = 83
write(2, "Darling needs this in order to c"..., 86Darling needs this in order to create mount and PID namespaces and to perform mounts.

but
/usr/local/bin$ ls -l darling
-rwsr-xr-x 1 root root 58216 sep 2 10:52 darling

@bugaevc
Copy link
Member

bugaevc commented Sep 3, 2017

Well, when you want to starce a suid binary, you have to run strace itself as root (and use -u $USER to let the program know what the original user was). However, in this case, strace-ing darling shell invocation won't get you anything interesting, because the real shell is spawned from shellspawn.

Instead, you should launch darling shell as usual, figure out its PID (from outside of the container), and then use something like sudo strace -f -p THAT_PID (again, from the outside).

(And we should really start documenting these things...)

@bugaevc
Copy link
Member

bugaevc commented Feb 4, 2018

Please retest, this should have been fixed in 81372b9

@ahyattdev ahyattdev added the Application Compatibility Darling needs fixes for compatibility with a specific Application label May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Application Compatibility Darling needs fixes for compatibility with a specific Application
Projects
None yet
Development

No branches or pull requests

4 participants