Open s-ol opened 3 years ago
Okay, so I realized after posting that I was overriding LD_PRELOAD_PATH
, not LD_PRELOAD
which is the correct env var. Fixing this curiously prevents the emulator from starting for different reasons:
nix run .#emulator
adding vulkan...
LD_PRELOAD_PATH: '/nix/store/si20clrvrfsjvdgs65z4zrsvwmwrqi3v-vulkan-loader-1.2.162.0/lib/libvulkan.so:'
Looking for a free TCP port in range 5554-5584
grep: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
We have a free TCP port: 5554
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
grep: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
/nix/store/3y52qkcx7knmfdjzycsp82091ncn2h6i-emulate-MyAndroidApp/bin/run-tost-emulator: line 59: /tmp/nix-android-vm-NNXY/.android/avd/device.avd/config.ini: No such file or directory
Waiting until the emulator has booted the device and the package manager is ready...
emulator: Android emulator version 30.6.3.0 (build_id 7266284) (CL:N/A)
emulator: ERROR: Unknown AVD name [device], use -list-avds to see valid list.
ANDROID_SDK_HOME is defined but there is no file device.ini in $ANDROID_SDK_HOME/avd
(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)
and then, after also adding export JAVA_HOME="${jdk8.home}"
:
nix run .#emulator
adding vulkan...
LD_PRELOAD_PATH: '/nix/store/si20clrvrfsjvdgs65z4zrsvwmwrqi3v-vulkan-loader-1.2.162.0/lib/libvulkan.so:'
Looking for a free TCP port in range 5554-5584
grep: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
We have a free TCP port: 5554
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
Usage:
avdmanager [global options] [action] [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.
Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- list device : Lists existing devices.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
grep: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
sed: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/v8q6nxyppy1myi3rxni2080bv8s9jxiy-glibc-2.32-40/lib/libpthread.so.0)
Usage:
avdmanager [global options] [action] [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.
Valid actions are composed of a verb and an optional direct object:
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- list device : Lists existing devices.
- create avd : Creates a new Android Virtual Device.
- move avd : Moves or renames an Android Virtual Device.
- delete avd : Deletes an Android Virtual Device.
/nix/store/lcz0p582a6vjhd453vhh0pw5v62liqy9-emulate-MyAndroidApp/bin/run-tost-emulator: line 59: /tmp/nix-android-vm-TFT3/.android/avd/device.avd/config.ini: No such file or directory
Waiting until the emulator has booted the device and the package manager is ready...
emulator: Android emulator version 30.6.3.0 (build_id 7266284) (CL:N/A)
emulator: ERROR: Unknown AVD name [device], use -list-avds to see valid list.
ANDROID_SDK_HOME is defined but there is no file device.ini in $ANDROID_SDK_HOME/avd
(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)
Describe the bug
Emulators created with
androidenv.emulateApp
do not start correctly and only show a black screen until manually quit. Vulkan errors on STDOUT/STDERR.To Reproduce
create flake.nix:
nix run
)Expected behavior The emulator should launch.
Logs
Additional context This happens both with and without
enableGPU = true
. Vulkan is working on my AMD GPU system,vkcube
innix-shell -p vulkan-tools
works ok. I have tried adding thelibvulkan.so
orlibvulkan.so.1
fromvulkan-loader
toLD_PRELOAD_PATH
(the ones used byvkcube
, as revealed byldd $(which vkcube)
, but that also did not help and the output was still the same, including the "added library" and "cannot add library" lines.Notify maintainers I could not find any
meta.maintainers
, but it appears that @svanderburg and @erikarvstedt did extensive work onemulateApp
and/orandroidenv
in general.Metadata
nix-shell -p nix-info --run "nix-info -m"
"x86_64-linux"
Linux 5.11.11, NixOS, 20.09.3765.d6f63659a70 (Nightingale)
yes
yes
nix-env (Nix) 2.4pre20210326_dd77f71
"nixos-unstable-21.03pre263749.b3616bd9640, nixos-21.03pre263749.b3616bd9640"
"nixos-20.09.3765.d6f63659a70, home-manager"
/nix/var/nix/profiles/per-user/root/channels/nixos