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

nix building process #78

Open
LeoSum8 opened this issue Feb 8, 2024 · 1 comment
Open

nix building process #78

LeoSum8 opened this issue Feb 8, 2024 · 1 comment

Comments

@LeoSum8
Copy link

LeoSum8 commented Feb 8, 2024

Hi there,
I would like to start contributing to this project. My c-coding-abilities are limited so I'd like to learn on the way and maybe start with getting the documentation up to date. I guess this would help others to chime in more easily in the future.

My initial starting point to look at this project was that I wanted to get euphonium working on the louder esp32 board for which I needed to create a new TAS5805m DAC driver. Since my esp32 board at hand only had 4mb of flash, I started forking the outdated master branch on which also the last available release (0.3.0 from July 2022) seems to be based. I got that to work on my fork: https://github.com/LeoSum8/euphonium_louderESP

Now I have a 16mb flash board sitting here and I am trying to integrate the driver into the current develop branch.
However the build doesn't currently complete.

It fails with:

...
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: buildPhase
The following Python requirements are not satisfied:
Requirement 'urllib3<2' was not met. Installed version: 2.1.0
'No package metadata was found for filelock' - was not found and is required by the application
To install the missing packages, please run "install.sh"
Diagnostic information:
    IDF_PYTHON_ENV_PATH: /nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/.espressif/python_env/idf5.1_py3.10_env
    Python interpreter used: /nix/store/vrzzx29scs4bamd757r8grnsr665nhmy-python3-3.10.13-env/bin/python3.10
    Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
    PATH: /nix/store/czis9iqs3ph8rxkndks4lf2qgh752yf4-which-2.21/bin:/nix/store/lfkis8r2qp13sby7jvh46s3qsplvg613-esp32-toolchain-12.2.0_20230208/bin:/nix/store/za04kin80ybavb7qp577dghpax4mf82z-git-2.43.0/bin:/nix/store/jacf2kn4dfj99c3ywbvfyg6w53xvxsfl-cmake-3.27.8/bin:/nix/store/5lbxsj5mnz95rq5hkq7ixxb1cg96k07g-ninja-1.11.1/bin:/nix/store/d1k9z3gazfanyrsf61csfxnrinr4q7md-protobuf-24.4/bin:/nix/store/vrzzx29scs4bamd757r8grnsr665nhmy-python3-3.10.13-env/bin:/nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/bin:/nix/store/01nygk9550khsba4msxd751bvgs8jj23-pkg-config-wrapper-0.29.2/bin:/nix/store/cjbyb45nxiqidj95c4k1mh65azn1x896-bash-5.2-p21/bin:/nix/store/xkr0grhkk57jkjcvk3is9lrm6fldhc0z-python3.10-littlefs-python-0.8.0/bin:/nix/store/r7zmd3bb6a6vbs5i5nl8vs9z53zhhydg-python3.10-pytest-7.4.3/bin:/nix/store/cawqhcxl9ar46yws7jvscn64rn052kg2-python3-3.10.13/bin:/nix/store/p0jq68qigbaipq4yb6wxk5dhd2f9d6j9-python3.10-tox-4.11.4/bin:/nix/store/gif07b888my45divihsqib88fky1vaam-python3.10-chardet-5.2.0/bin:/nix/store/5yify2b54zvgypn99j7fkn7hamx13c0i-python3.10-virtualenv-20.25.0/bin:/nix/store/44pqwx8bjngjpkbk1y2dd8pzs49s14w9-patchelf-0.15.0/bin:/nix/store/31ypha82n391iy1knf5bp4bhh8jfn38j-clang-wrapper-14.0.6/bin:/nix/store/iz43xy0k0agppjrq1iqr39pl5srph1lq-clang-14.0.6/bin:/nix/store/dvvb6frpdnimidx1f51zjgi3af8rlny1-glibc-2.38-27-bin/bin:/nix/store/5idwbbv23b6vnqdicx97s3hsgrwwnj7j-coreutils-9.4/bin:/nix/store/s7ngsaqykqaz422afsm89srg5sl7rbig-binutils-wrapper-2.40/bin:/nix/store/0gi4vbw1qfjncdl95a9ply43ymd6aprm-binutils-2.40/bin:/nix/store/vznbgkblfbfvlawp4mx6hlj0qppf15qq-compiler-rt-libc-14.0.6/bin:/nix/store/5idwbbv23b6vnqdicx97s3hsgrwwnj7j-coreutils-9.4/bin:/nix/store/4ajik70nplhkb8ndn3gqh7v0b09hmvg9-findutils-4.9.0/bin:/nix/store/y4m3b33d240amsyd50d6mn0m9pyf987p-diffutils-3.10/bin:/nix/store/9zial3lqry9f7rsw31r7vs5p1mnb7lan-gnused-4.9/bin:/nix/store/6i00hdmzlj56qy500p5gb5v88wfj6nhg-gnugrep-3.11/bin:/nix/store/w48cndp5bwz4x4l49yr2gbz09g6f91dq-gawk-5.2.2/bin:/nix/store/msavqbm59r0q4wv54s4smp0ixwl6y3dz-gnutar-1.35/bin:/nix/store/6z1ssks5dbmc9zs5cczn9qgx28yl8j8y-gzip-1.13/bin:/nix/store/zd07lalq650lv09xkkp2yc9ahx66lm25-bzip2-1.0.8-bin/bin:/nix/store/05sqpqfnha0pmb5aia3gz968im7n806v-gnumake-4.4.1/bin:/nix/store/cjbyb45nxiqidj95c4k1mh65azn1x896-bash-5.2-p21/bin:/nix/store/mmfzn2r4rq6ljlikmpgk7y1i914g40xi-patch-2.7.6/bin:/nix/store/fp49ki5fbhsq744ljmffcc646yczhw9m-xz-5.4.5-bin/bin:/nix/store/8rk7cyqxf7mdvwjnnvlh5kw7zvvnv3y0-file-5.45/bin
Constraint file: /nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/.espressif/espidf.constraints.v5.1.txt
Requirement files:
 - /nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/sdk/tools/requirements/requirements.core.txt
Python being checked: /nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/.espressif/python_env/idf5.1_py3.10_env/bin/python

fatal: not a git repository: '/nix/store/4j63k455g4kmvdi44ni31526q7bxd6lx-esp-idf-5.1/sdk/.git'
WARNING: Git version unavailable, reading from source
ESP-IDF v5.1.2
error: builder for '/nix/store/r5sl4670vxrym9rw994a54kh4nwhn91k-euphonium-esp32.drv' failed with exit code 1
error: build of '/nix/store/16yld9i689f8vpxmxirjcq3j0rqa9mi1-nix-shell.drv', '/nix/store/5wrnmjd01lry0855k8gr0qz96l5anpnv-flash-storage.drv', '/nix/store/r5sl4670vxrym9rw994a54kh4nwhn91k-euphonium-esp32.drv' failed

I am building via the nixos docker container.

Here's my Dockerfile:

# nix base image
FROM nixos/nix:latest

# set Work dir
WORKDIR /app

# Clone Euphonium Repository recursively
RUN git clone --recursive --branch louderESP16mb https://github.com/LeoSum8/euphonium_louderESP.git .

I build and run it with:

docker build . -t euphonium_builder_16mb
docker run -it -v ~/result:/app/result euphonium_builder_16mb

Inside the container shell:

bash-5.2# nix-channel --update
bash-5.2# cd nix
bash-5.2# nix-build -E 'with import <nixpkgs> {}; callPackage ./default.nix {}'

Could someone who successfully builds euphonium share some insight on how you do it?
As stated in the beginning, I would offer to try and update the documentation accordingly as I learn.

@LeoSum8
Copy link
Author

LeoSum8 commented May 7, 2024

Hi again,
thank you @alufers for fixing the xxd issue. My build was failing due to this one.

I am now able to build again, however now I am encountering another weird behaviour but I am able to work around:

I run the build inside a docker container using the latest nixos/nix image via

git clone --recursive --branch develop https://github.com/muvox-io/euphonium app
cd app
nix --extra-experimental-features "nix-command flakes" build "git+file://$(pwd)?submodules=1#app-esp32" -L

the build stops/fails at:

...
euphonium-esp32> -- Building ESP-IDF components for target esp32
euphonium-esp32> Processing 1 dependencies:
euphonium-esp32> [1/1] idf (5.2.1)
euphonium-esp32> -- Project sdkconfig file /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/sdkconfig
euphonium-esp32> -- Compiler supported targets: xtensa-esp-elf
euphonium-esp32> -- Looking for sys/types.h
euphonium-esp32> -- Looking for sys/types.h - found
euphonium-esp32> -- Looking for stdint.h
euphonium-esp32> -- Looking for stdint.h - found
euphonium-esp32> -- Looking for stddef.h
euphonium-esp32> -- Looking for stddef.h - found
euphonium-esp32> -- Check size of time_t
euphonium-esp32> -- Check size of time_t - done
euphonium-esp32> -- Found Python3: /nix/store/yyx5g9vn2qzrflsfysz1pm577qmwgs6h-python3-3.10.13-env/bin/python3.10 (found version "3.10.13") found components: Interpreter
euphonium-esp32> -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
euphonium-esp32> -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
euphonium-esp32> -- App "euphonium-esp32" version: 1
euphonium-esp32> -- Adding linker script /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/build/esp-idf/esp_system/ld/memory.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_system/ld/esp32/sections.ld.in
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.api.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom/esp32/ld/esp32.rom.eco3.ld
euphonium-esp32> -- Adding linker script /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/soc/esp32/ld/esp32.peripherals.ld
euphonium-esp32> fatal: not a git repository (or any of the parent directories): .git
euphonium-esp32> fatal: not a git repository (or any of the parent directories): .git
euphonium-esp32> CMake Deprecation Warning at /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/CMakeLists.txt:1 (cmake_minimum_required):
euphonium-esp32>   Compatibility with CMake < 3.5 will be removed from a future version of
euphonium-esp32>   CMake.
euphonium-esp32>   Update the VERSION argument <min> value or use a ...<max> suffix to tell
euphonium-esp32>   CMake that the project does not need compatibility with older versions.
euphonium-esp32> -- Bell options:
euphonium-esp32> --     Disable all codecs: OFF
euphonium-esp32> --     - AAC audio codec: ON
euphonium-esp32> --     - MP3 audio codec: ON
euphonium-esp32> --     - Vorbis audio codec: ON
euphonium-esp32> --     - Opus audio codec: ON
euphonium-esp32> --     - ALAC audio codec: ON
euphonium-esp32> --     Disable built-in audio sinks: OFF
euphonium-esp32> --     Use Vorbis float version: OFF
euphonium-esp32> --     - ALSA sink: OFF
euphonium-esp32> --     - PortAudio sink: OFF
euphonium-esp32> --     Use cJSON only: OFF
euphonium-esp32> --     Disable Fmt: OFF
euphonium-esp32> --     Disable Mqtt: OFF
euphonium-esp32> --     Disable Regex: OFF
euphonium-esp32> --     Disable Web server: OFF
euphonium-esp32> -- Found Nanopb: /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/external/nanopb
euphonium-esp32> /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/external/nanopb
euphonium-esp32> CMake Deprecation Warning at /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/external/opus/CMakeLists.txt:1 (cmake_minimum_required):
euphonium-esp32>   Compatibility with CMake < 3.5 will be removed from a future version of
euphonium-esp32>   CMake.
euphonium-esp32>   Update the VERSION argument <min> value or use a ...<max> suffix to tell
euphonium-esp32>   CMake that the project does not need compatibility with older versions.
euphonium-esp32> CMake Error at /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/CMakeLists.txt:283 (add_subdirectory):
euphonium-esp32>   add_subdirectory given source "external/nlohmann_json" which is not an
euphonium-esp32>   existing directory.
euphonium-esp32> CMake Deprecation Warning at /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/cspot/cspot/CMakeLists.txt:1 (cmake_minimum_required):
euphonium-esp32>   Compatibility with CMake < 3.5 will be removed from a future version of
euphonium-esp32>   CMake.
euphonium-esp32>   Update the VERSION argument <min> value or use a ...<max> suffix to tell
euphonium-esp32>   CMake that the project does not need compatibility with older versions.
euphonium-esp32> -- Components: app_trace app_update bootloader bootloader_support bt cmock console core cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_littlefs esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__mdns esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
euphonium-esp32> -- Component paths: /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/app_trace /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/app_update /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/bootloader /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/bootloader_support /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/bt /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/cmock /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/console /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/components/core /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/cxx /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/driver /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/efuse /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp-tls /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_adc /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_app_format /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_bootloader_format /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_coex /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_common /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_eth /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_event /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_gdbstub /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_hid /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_http_client /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_http_server /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_https_ota /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_https_server /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_hw_support /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_lcd /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/components/esp_littlefs /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_local_ctrl /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_mm /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_netif /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_netif_stack /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_partition /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_phy /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_pm /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_psram /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_ringbuf /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_rom /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_system /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_timer /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esp_wifi /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/espcoredump /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/components/espressif__mdns /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/esptool_py /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/fatfs /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/freertos /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/hal /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/heap /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/http_parser /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/idf_test /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/ieee802154 /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/json /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/log /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/lwip /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/main /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/mbedtls /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/mqtt /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/newlib /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/nvs_flash /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/nvs_sec_provider /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/openthread /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/partition_table /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/perfmon /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/protobuf-c /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/protocomm /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/pthread /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/sdmmc /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/soc /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/spi_flash /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/spiffs /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/tcp_transport /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/ulp /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/unity /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/usb /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/vfs /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/wear_levelling /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/wifi_provisioning /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/wpa_supplicant /nix/store/y3m954ir2l27dirgs7s4iphb2p1s1p8d-esp-idf-5.2.1/sdk/components/xtensa
euphonium-esp32> -- Configuring incomplete, errors occurred!
euphonium-esp32> cmake failed with exit code 1, output of the command is in the /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/build/log/idf_py_stderr_output_22051 and /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/targets/esp32/build/log/idf_py_stdout_output_22051

I think the important part is:

euphonium-esp32> CMake Error at /tmp/nix-build-euphonium-esp32.drv-0/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/CMakeLists.txt:283 (add_subdirectory):
euphonium-esp32>   add_subdirectory given source "external/nlohmann_json" which is not an
euphonium-esp32>   existing directory.

nlohmann_json is there in the repo:

bash-5.2# ls -la /app/src/core/external/bell/external/
total 60
drwxr-xr-x 15 root root 4096 May  7 10:07 .
drwxr-xr-x  8 root root 4096 May  7 10:07 ..
drwxr-xr-x  5 root root 4096 May  7 10:07 alac
drwxr-xr-x  6 root root 4096 May  7 10:07 cJSON
drwxr-xr-x  3 root root 4096 May  7 10:07 civetweb
drwxr-xr-x  7 root root 4096 May  7 10:07 fmt
drwxr-xr-x  2 root root 4096 May  7 10:07 libhelix-mp3
drwxr-xr-x  3 root root 4096 May  7 10:07 mdnssvc
drwxr-xr-x  3 root root 4096 May  7 10:07 mqtt
drwxr-xr-x 12 root root 4096 May  7 10:07 nanopb
drwxr-xr-x 11 root root 4096 May  7 10:07 nlohmann_json
drwxr-xr-x  5 root root 4096 May  7 10:07 opencore-aacdec
drwxr-xr-x 14 root root 4096 May  7 10:07 opus
drwxr-xr-x  3 root root 4096 May  7 10:07 portaudio
drwxr-xr-x  4 root root 4096 May  7 10:07 tremor

but weirdly it doesn't seem to be copied to the temporary folder:

bash-5.2# ls -la /nix/store/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/src/core/external/bell/external/
total 52
dr-xr-xr-x 13 root root 4096 May  7 10:59 .
dr-xr-xr-x  8 root root 4096 Jan  1  1970 ..
dr-xr-xr-x  5 root root 4096 Jan  1  1970 alac
dr-xr-xr-x  6 root root 4096 Jan  1  1970 cJSON
dr-xr-xr-x  3 root root 4096 Jan  1  1970 civetweb
dr-xr-xr-x  7 root root 4096 Jan  1  1970 fmt
dr-xr-xr-x  2 root root 4096 Jan  1  1970 libhelix-mp3
dr-xr-xr-x  3 root root 4096 Jan  1  1970 mqtt
dr-xr-xr-x 12 root root 4096 Jan  1  1970 nanopb
dr-xr-xr-x  5 root root 4096 Jan  1  1970 opencore-aacdec
dr-xr-xr-x 14 root root 4096 Jan  1  1970 opus
dr-xr-xr-x  3 root root 4096 Jan  1  1970 portaudio
dr-xr-xr-x  4 root root 4096 Jan  1  1970 tremor

I notice that mdnssvc is also missing. So somehow not all of the source code seems to be copied.

So if I manually recopy the src folder (cp -R /app/src /nix/store/ibp2jwhmnsqsm7gilzq7gkrfzasln6c8-source/) over the folder in the store, the build advances further and it finally completes the build of the esp32 image.

So I am able to complete the build this way but it seems weird. Am I using nix wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant