Open poelzi opened 2 years ago
I think the problem is actually in platformio:
DEBUG Running add_pin_initial_states_array in esphome.components.esp8266.gpio (num 31)
DEBUG Adding global: const uint8_t ESPHOME_ESP8266_GPIO_INITIAL_MODE[16] = {OUTPUT, 255, 255, INPUT_PULLUP, INPUT_PULLUP, INPUT_PULLUP, 255, 255, 255, 255, 255, 255, OUTPUT, OUTPUT, OUTPUT, 255};
DEBUG Adding global: const uint8_t ESPHOME_ESP8266_GPIO_INITIAL_LEVEL[16] = {1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 1, 0, 0, 255};
DEBUG -> finished
DEBUG Running add_arduino_global_workaround in esphome.core.config (num 33)
DEBUG Adding global: #define yield() esphome::yield()
DEBUG Adding global: #define millis() esphome::millis()
DEBUG Adding global: #define micros() esphome::micros()
DEBUG Adding global: #define delay(x) esphome::delay(x)
DEBUG Adding global: #define delayMicroseconds(x) esphome::delayMicroseconds(x)
DEBUG -> finished
INFO Compiling app...
DEBUG Running: platformio run -d .esphome/build/flipperswitch -v
/nix/store/bcwyhqvik6jhcklib33v6kykdl4zp9d4-bash-5.1-p8/bin/sh: symbol lookup error: /usr/lib/libc.so.6: undefined symbol: _dl_audit_symbind_alt, version GLIBC_PRIVATE
Traceback (most recent call last):
File "/nix/store/5jngq8dlfvnh75ydhsx1pdz0yr28zw94-platformio-6.0.1/lib/python3.9/site-packages/platformio/project/helpers.py", line 71, in get_default_projects_dir
assert IS_WINDOWS
AssertionError
During handling of the above exception, another exception occurred:
cc @oxzi @makefu
Might this be related to #173599? At least both are mentioning xdg-user-dir
.
Unfortunately I cannot reproduce the error based on the YAML from the posted URL.
$ git describe
22.05-pre-48384-g4a88391c998
$ nix-shell -I nixpkgs=$(pwd) -p esphome --pure --run "esphome compile foo.yml"
. . .
INFO Successfully compiled program.
Im getting a similar glibc error when attempting to use Android Studio:
com.intellij.openapi.vcs.VcsException: /run/current-system/sw/bin/setsid: symbol lookup error: /usr/lib/libc.so.6: undefined symbol: _dl_audit_symbind_alt, version GLIBC_PRIVATE
After looking for a fix I found a few similar issues being reported: https://github.com/rust-lang/rust-analyzer/issues/12410 and https://github.com/haskell/haskell-language-server/issues/2928.
The last latter mentions a channel mismatch, although rebuilding my system (without any channels, just a flake) with my local nixpkgs checkout from which I build Android Studio didn't seem to change anything.
Edit: After rebooting my system with a matching glibc version the error disappeared, that might help with this issue as well.
@IvarWithoutBones What glibc version did you use to fix this? Could you please provide instructions on how to fix this?
@IvarWithoutBones What glibc version did you use to fix this? Could you please provide instructions on how to fix this?
I made my system use glibc from my local nixpkgs checkout so its consistent with the one in the package as follows:
~/nix/nixpkgs > nixos-rebuild switch --override-input nixpkgs .
~/nix/nixpkgs > reboot
~/nix/nixpkgs > nix build -Lf . esphome
~/nix/nixpkgs > ./result/bin/esphome
If you update your system to use the same version of glibc as the nixpkgs
flake registry entry it should work as well, so I expect this problem might go away with a regular system upgrade.
Of course it will go away, but that is the whole point of running NixOS in the first place. The 2022.11 version of esphome was broken so I just tried running the master version and this was broken as well for a different reason. The whole point of nixpkgs/nixos is to run contained reproduceable programs. Otherwise I can safe myself the headache nix brings as well '-)
Still having this issue in PlatformIO.
Describe the bug
Running esphome from nixpkgs on nixos2111 results in glibc errors.
Steps To Reproduce
Steps to reproduce the behavior:
flipper_switch.yaml is basically this config https://www.esphome-devices.com/devices/athom-smart-plug-tp29/
(esphome on nixos2111 was broken for me as well)
Expected behavior
Compiles firmware
Screenshots
Additional context
Add any other context about the problem here.
Notify maintainers
@globin @elseym @hexa
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.