You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wslbridge-backend is currently distributed as a dynamic executable, which makes it dependent on the libc it's built against (most recently, glibc in the Ubuntu 14.04 WSL image). To use wslbridge with a non-glibc WSL distribution, it's necessary to rebuild wslbridge-backend. If it were instead distributed as a static binary, maybe that wouldn't be necessary.
wslbridge-backend.cc:(.text.startup+0x116f): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Maybe wslbridge could parse /etc/passwd or invoke getent passwd "$USER" if things like LDAP and NIS are relevant.
Linking with -static -pthread produces a binary that mostly works, but apparently attempting to join a thread causes a segfault. The fix is to build with -static -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive: https://stackoverflow.com/a/45271521
The text was updated successfully, but these errors were encountered:
That is only a warning. g++ can compile the binary. But that also depends on /etc/passwd file. What happens if that file is not present? WSL team has added a feature in init where Linux distributions can be run without /etc/passwd. See this: microsoft/WSL#3001
wslbridge-backend
is currently distributed as a dynamic executable, which makes it dependent on the libc it's built against (most recently, glibc in the Ubuntu 14.04 WSL image). To use wslbridge with a non-glibc WSL distribution, it's necessary to rebuildwslbridge-backend
. If it were instead distributed as a static binary, maybe that wouldn't be necessary.Current issues with static linking:
The new call to
getpwuid
(for Invoke user's default shell #17) generates a linker warning:Maybe wslbridge could parse
/etc/passwd
or invokegetent passwd "$USER"
if things like LDAP and NIS are relevant.Linking with
-static -pthread
produces a binary that mostly works, but apparently attempting to join a thread causes a segfault. The fix is to build with-static -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
: https://stackoverflow.com/a/45271521The text was updated successfully, but these errors were encountered: