jorgenkraghjakobsen / snapclient

WIP snapclient on ESP32
232 stars 45 forks source link

Failed to Build #42

Open sascha005 opened 2 years ago

sascha005 commented 2 years ago

Hello,

i try to build the Project using the esp-idf (v4.2) if i try : "idf.py build", i stopped with the following Errors :

` Generating binary image from built executable esptool.py v3.0 Generated /home/loos/esp/snapclient/build/bootloader/bootloader.bin [616/1317] Generating x509_crt_bundle /home/loos/.espressif/python_env/idf4.2_py3.6_env/lib/python3.6/site-packages/cryptography/x509/base.py:531: CryptographyDeprecationWarning: Parsed a negative serial number, which is disallowed by RFC 5280. return rust_x509.load_pem_x509_certificate(data) [1021/1317] Building C object esp-idf/custom_board/CMakeFiles/__idf_custom_board.dir/ma120x0/MerusAudio.c.obj ../components/custom_board/ma120x0/MerusAudio.c: In function 'ma120x0_get_volume': ../components/custom_board/ma120x0/MerusAudio.c:91:29: warning: passing argument 4 of 'ma_read_byte' makes pointer from integer without a cast [-Wint-conversion] ma_read_byte(0x20, 1, 64, rxbuf); ^~~~~ In file included from ../components/custom_board/ma120x0/MerusAudio.c:12: ../components/custom_board/ma120x0/include/MerusAudio.h:29:83: note: expected 'uint8_t ' {aka 'unsigned char '} but argument is of type 'uint8_t' {aka 'unsigned char'} esp_err_t ma_read_byte(uint8_t i2c_addr, uint8_t prot, uint16_t address, uint8_t *data);


[1094/1317] Building C object esp-idf/dsp_processor/CMakeFiles/__idf_dsp_processor.dir/dsp_processor.c.obj
../components/dsp_processor/dsp_processor.c: In function 'setup_dsp_i2s':
../components/dsp_processor/dsp_processor.c:51:7: warning: 'I2S_COMM_FORMAT_I2S' is deprecated [-Wdeprecated-declarations]
       .communication_format = I2S_COMM_FORMAT_I2S,
       ^
In file included from /home/loos/esp/esp-idf/components/soc/src/esp32/include/hal/i2s_ll.h:30,
                 from /home/loos/esp/esp-idf/components/soc/include/hal/i2s_hal.h:28,
                 from /home/loos/esp/esp-idf/components/driver/include/driver/i2s.h:24,
                 from ../components/dsp_processor/dsp_processor.c:6:
/home/loos/esp/esp-idf/components/soc/include/hal/i2s_types.h:70:5: note: declared here
     I2S_COMM_FORMAT_I2S       __attribute__((deprecated)) = 0x01, /*!< I2S communication format I2S, correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
     ^~~~~~~~~~~~~~~~~~~
../components/dsp_processor/dsp_processor.c:78:9: warning: 'I2S_COMM_FORMAT_I2S' is deprecated [-Wdeprecated-declarations]
         .communication_format = I2S_COMM_FORMAT_I2S,
         ^
In file included from /home/loos/esp/esp-idf/components/soc/src/esp32/include/hal/i2s_ll.h:30,
                 from /home/loos/esp/esp-idf/components/soc/include/hal/i2s_hal.h:28,
                 from /home/loos/esp/esp-idf/components/driver/include/driver/i2s.h:24,
                 from ../components/dsp_processor/dsp_processor.c:6:
/home/loos/esp/esp-idf/components/soc/include/hal/i2s_types.h:70:5: note: declared here
     I2S_COMM_FORMAT_I2S       __attribute__((deprecated)) = 0x01, /*!< I2S communication format I2S, correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
     ^~~~~~~~~~~~~~~~~~~
../components/dsp_processor/dsp_processor.c: In function 'dsp_i2s_task_handler':
../components/dsp_processor/dsp_processor.c:265:16: warning: variable 'ax' set but not used [-Wunused-but-set-variable]
       uint8_t *ax = audio ;
                ^~
[1118/1317] Building C object esp-idf/net_functions/CMakeFiles/__idf_net_functions.dir/net_functions.c.obj
../components/net_functions/net_functions.c:95:12: warning: 'sntp_synced' defined but not used [-Wunused-variable]
 static int sntp_synced = 0;
            ^~~~~~~~~~~
[1187/1317] Building C object esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/quant_LTP_gains.c.obj
FAILED: esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/quant_LTP_gains.c.obj
/home/loos/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DADF_VER=\"1b16567-dirty\" -DHAVE_CONFIG_H -Iconfig -I../components/opus -I../components/opus/opus/include -I../components/opus/opus/silk -I../components/opus/opus/silk/fixed -I../components/opus/opus/silk/float -I../components/opus/opus/celt -I/home/loos/esp/esp-idf/components/newlib/platform_include -I/home/loos/esp/esp-idf/components/freertos/include -I/home/loos/esp/esp-idf/components/freertos/xtensa/include -I/home/loos/esp/esp-idf/components/heap/include -I/home/loos/esp/esp-idf/components/log/include -I/home/loos/esp/esp-idf/components/lwip/include/apps -I/home/loos/esp/esp-idf/components/lwip/include/apps/sntp -I/home/loos/esp/esp-idf/components/lwip/lwip/src/include -I/home/loos/esp/esp-idf/components/lwip/port/esp32/include -I/home/loos/esp/esp-idf/components/lwip/port/esp32/include/arch -I/home/loos/esp/esp-idf/components/soc/src/esp32/. -I/home/loos/esp/esp-idf/components/soc/src/esp32/include -I/home/loos/esp/esp-idf/components/soc/include -I/home/loos/esp/esp-idf/components/esp_rom/include -I/home/loos/esp/esp-idf/components/esp_common/include -I/home/loos/esp/esp-idf/components/esp_system/include -I/home/loos/esp/esp-idf/components/xtensa/include -I/home/loos/esp/esp-idf/components/xtensa/esp32/include -I/home/loos/esp/esp-idf/components/esp32/include -I/home/loos/esp/esp-idf/components/driver/include -I/home/loos/esp/esp-idf/components/driver/esp32/include -I/home/loos/esp/esp-idf/components/esp_ringbuf/include -I/home/loos/esp/esp-idf/components/efuse/include -I/home/loos/esp/esp-idf/components/efuse/esp32/include -I/home/loos/esp/esp-idf/components/espcoredump/include -I/home/loos/esp/esp-idf/components/esp_timer/include -I/home/loos/esp/esp-idf/components/esp_ipc/include -I/home/loos/esp/esp-idf/components/soc/soc/esp32/include -I/home/loos/esp/esp-idf/components/soc/soc/esp32/../include -I/home/loos/esp/esp-idf/components/soc/soc/esp32/private_include -I/home/loos/esp/esp-idf/components/vfs/include -I/home/loos/esp/esp-idf/components/esp_wifi/include -I/home/loos/esp/esp-idf/components/esp_wifi/esp32/include -I/home/loos/esp/esp-idf/components/esp_event/include -I/home/loos/esp/esp-idf/components/esp_netif/include -I/home/loos/esp/esp-idf/components/esp_eth/include -I/home/loos/esp/esp-idf/components/tcpip_adapter/include -I/home/loos/esp/esp-idf/components/app_trace/include -mlongcalls -Wno-frame-address   -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.2\" -DESP_PLATFORM -MD -MT esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/quant_LTP_gains.c.obj -MF esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/quant_LTP_gains.c.obj.d -o esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/quant_LTP_gains.c.obj   -c ../components/opus/opus/silk/quant_LTP_gains.c
../components/opus/opus/silk/quant_LTP_gains.c: In function 'silk_quant_LTP_gains':
../components/opus/opus/silk/quant_LTP_gains.c:127:21: error: 'res_nrg_Q15' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         res_nrg_Q15 = silk_RSHIFT32( res_nrg_Q15, 2 );
cc1: some warnings being treated as errors
[1188/1317] Building C object esp-idf/opus/CMakeFiles/__idf_opus.dir/opus/silk/process_NLSFs.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1`

I am new in ESP32. Can someone may point me to the right direction ? 

Regards
Sascha
CarlosDerSeher commented 2 years ago

I changed the Cmake file for opus on my fork https://github.com/CarlosDerSeher/snapclient/blob/master/components/opus/CMakeLists.txt