sepfy / libpeer

WebRTC Library for IoT/Embedded Device using C
MIT License
804 stars 108 forks source link

whip的esp32s3编译报错 #45

Open chatop2020 opened 8 months ago

chatop2020 commented 8 months ago

作者你好,我测试whip模式,无法通过编译,帮忙看看是否有什么需要注意的地方?

以下是报错信息

[993/1005] Building C object esp-idf/peer/CMakeFiles/.../Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj FAILED: esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc -DESP_PLATFORM -DHAVE_CONFIG_H -DIDF_VER=\"v5.1-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/config -I/Users/qiuzhouwei/Sources/libpeer/src -I/Users/qiuzhouwei/Sources/libpeer/src/transports -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/interface -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/dependency/3rdparty/llhttp/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreMQTT/source/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreMQTT/source/interface -I/Users/qiuzhouwei/Sources/esp-idf/components/newlib/platform_include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/include/freertos -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include/soc -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/port/esp32s3/. -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/port/esp32s3/private_include -I/Users/qiuzhouwei/Sources/esp-idf/components/heap/include -I/Users/qiuzhouwei/Sources/esp-idf/components/log/include -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/include -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/platform_port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/include/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_common/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/port/soc -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/port/include/private -I/Users/qiuzhouwei/Sources/esp-idf/components/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/xtensa/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include/apps -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include/apps/sntp -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/lwip/src/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/freertos/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/esp32xx/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/esp32xx/include/arch -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/mbedtls/include -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/mbedtls/library -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/esp_crt_bundle/include -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/esp-port -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/include -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include -I/Users/qiuzhouwei/Sources/esp-idf/components/json/cJSON -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressif__mdns/include -I/Users/qiuzhouwei/Sources/esp-idf/components/console -I/Users/qiuzhouwei/Sources/esp-idf/components/vfs/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_netif/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_event/include -mlongcalls -fdiagnostics-color=always -DESP32 -DHTTP_DO_NOT_USE_CUSTOM_CONFIG -DMQTT_DO_NOT_USE_CUSTOM_CONFIG -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3=. -fmacro-prefix-map=/Users/qiuzhouwei/Sources/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj -MF esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj.d -o esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj -c /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: In function 'dtls_srtp_selfsign_cert': /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:123:3: error: implicit declaration of function 'mbedtls_x509write_crt_set_serial'; did you mean 'mbedtls_x509write_crt_set_serial_raw'? [-Werror=implicit-function-declaration] 123 | mbedtls_x509write_crt_set_serial(&crt, &serial); | ^~~~~~~~ | mbedtls_x509write_crt_set_serial_raw /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: In function 'dtls_srtp_init': /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:147:16: error: unknown type name 'mbedtls_ssl_srtp_profile' 147 | static const mbedtls_ssl_srtp_profile default_profiles[] = { | ^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:148:4: error: 'MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80' undeclared (first use in this function) 148 | MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80, | ^~~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:148:4: note: each undeclared identifier is reported only once for each function it appears in /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:149:4: error: 'MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32' undeclared (first use in this function) 149 | MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32, | ^~~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:150:4: error: 'MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80' undeclared (first use in this function) 150 | MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80, | ^~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:151:4: error: 'MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32' undeclared (first use in this function) 151 | MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32, | ^~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:152:4: error: 'MBEDTLS_TLS_SRTP_UNSET' undeclared (first use in this function); did you mean 'MBEDTLS_TLS_EXT_SCT'? 152 | MBEDTLS_TLS_SRTP_UNSET | ^~~~~~ | MBEDTLS_TLS_EXT_SCT /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:197:5: error: implicit declaration of function 'mbedtls_ssl_conf_dtls_cookies'; did you mean 'mbedtls_ssl_conf_dn_hints'? [-Werror=implicit-function-declaration] 197 | mbedtls_ssl_conf_dtls_cookies(&dtls_srtp->conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &dtls_srtp->cookie_ctx); | ^~~~~~~~~ | mbedtls_ssl_conf_dn_hints /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:211:3: error: implicit declaration of function 'mbedtls_ssl_conf_dtls_srtp_protection_profiles' [-Werror=implicit-function-declaration] 211 | mbedtls_ssl_conf_dtls_srtp_protection_profiles(&dtls_srtp->conf, default_profiles); | ^~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:213:3: error: implicit declaration of function 'mbedtls_ssl_conf_srtp_mki_value_supported' [-Werror=implicit-function-declaration] 213 | mbedtls_ssl_conf_srtp_mki_value_supported(&dtls_srtp->conf, MBEDTLS_SSL_DTLS_SRTP_MKI_UNSUPPORTED); | ^~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: In function 'dtls_srtp_handshake_server': /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:367:5: error: implicit declaration of function 'mbedtls_ssl_set_client_transport_id'; did you mean 'mbedtls_ssl_conf_transport'? [-Werror=implicit-function-declaration] 367 | mbedtls_ssl_set_client_transport_id(&dtls_srtp->ssl, client_ip, sizeof(client_ip)); | ^~~~~~~~~~~ | mbedtls_ssl_conf_transport /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: In function 'dtls_srtp_handshake': /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:456:3: error: unknown type name 'mbedtls_dtls_srtp_info' 456 | mbedtls_dtls_srtp_info dtls_srtp_negotiation_result; | ^~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:457:3: error: implicit declaration of function 'mbedtls_ssl_get_dtls_srtp_negotiation_result' [-Werror=implicit-function-declaration] 457 | mbedtls_ssl_get_dtls_srtp_negotiation_result(&dtls_srtp->ssl, &dtls_srtp_negotiation_result); | ^~~~~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: At top level: /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:79:12: warning: 'dtls_srtp_cert_verify' defined but not used [-Wunused-function] 79 | static int dtls_srtp_cert_verify(void data, mbedtls_x509_crt crt, int depth, uint32_t *flags) { | ^~~~~ cc1: some warnings being treated as errors [996/1005] Building C object esp-idf/espressifmdns/CMakeFiles/idf_espressif__mdns.dir/mdns.c.obj ninja: build stopped: subcommand failed.

c4b4d4 commented 8 months ago

What steps did you follow?

I only followed these: https://github.com/sepfy/libpeer/tree/whip/examples/esp32#instructions but applied to the esp32s3's example folder (https://github.com/sepfy/libpeer/tree/whip/examples/esp32s3) and it worked

chatop2020 commented 8 months ago

What steps did you follow?

I only followed these: https://github.com/sepfy/libpeer/tree/whip/examples/esp32#instructions but applied to the esp32s3's example folder (https://github.com/sepfy/libpeer/tree/whip/examples/esp32s3) and it worked

i'll try it ,thanks alot

chatop2020 commented 8 months ago

I arranged the document method to try, the error is still the same, I mainly want to test the whip function of esp32s3, but the compilation error, can not continue In the compilation process, coreMQTT and coreHTTP are missing, I found the source code on github to supplement, but the compilation error still exists, the following is the complete error information

➜ esp32s3 git:(whip) ✗ idf.py build Setting IDF_PATH environment variable: /Users/qiuzhouwei/Sources/esp-idf /Users/qiuzhouwei/Sources/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources Executing action: all (aliases: build) Running cmake in directory /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/qiuzhouwei/Sources/esp-idf/tools/python_env/idf5.1_py3.11_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3"... -- IDF_TARGET is not set, guessed 'esp32s3' from sdkconfig '/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/sdkconfig' -- Found Git: /opt/homebrew/bin/git (found version "2.39.0") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32s3 Processing 5 dependencies: [1/5] espressif/esp32-camera (2.0.5) [2/5] espressif/esp_audio_codec (1.0.1) [3/5] espressif/esp_h264 (0.1.1) [4/5] espressif/mdns (1.2.1) [5/5] idf (5.1.0) -- Project sdkconfig file /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/sdkconfig Compiler supported targets: xtensa-esp32s3-elf

-- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of time_t -- Check size of time_t - done -- Found Python3: /Users/qiuzhouwei/Sources/esp-idf/tools/python_env/idf5.1_py3.11_env/bin/python (found version "3.11.4") found components: Interpreter -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "esp32-peer" version: 6cfde5a-dirty -- Adding linker script /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld {HTTP_INCLUDE_PUBLIC_DIRS}/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/include/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/interface/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/dependency/3rdparty/llhttp/include -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_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_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 espressifesp32-camera espressifesp_audio_codec espressifesp_h264 espressifmdns esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table peer perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs srtp tcp_transport touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa -- Component paths: /Users/qiuzhouwei/Sources/esp-idf/components/app_trace /Users/qiuzhouwei/Sources/esp-idf/components/app_update /Users/qiuzhouwei/Sources/esp-idf/components/bootloader /Users/qiuzhouwei/Sources/esp-idf/components/bootloader_support /Users/qiuzhouwei/Sources/esp-idf/components/bt /Users/qiuzhouwei/Sources/esp-idf/components/cmock /Users/qiuzhouwei/Sources/esp-idf/components/console /Users/qiuzhouwei/Sources/esp-idf/components/cxx /Users/qiuzhouwei/Sources/esp-idf/components/driver /Users/qiuzhouwei/Sources/esp-idf/components/efuse /Users/qiuzhouwei/Sources/esp-idf/components/esp-tls /Users/qiuzhouwei/Sources/esp-idf/components/esp_adc /Users/qiuzhouwei/Sources/esp-idf/components/esp_app_format /Users/qiuzhouwei/Sources/esp-idf/components/esp_coex /Users/qiuzhouwei/Sources/esp-idf/components/esp_common /Users/qiuzhouwei/Sources/esp-idf/components/esp_eth /Users/qiuzhouwei/Sources/esp-idf/components/esp_event /Users/qiuzhouwei/Sources/esp-idf/components/esp_gdbstub /Users/qiuzhouwei/Sources/esp-idf/components/esp_hid /Users/qiuzhouwei/Sources/esp-idf/components/esp_http_client /Users/qiuzhouwei/Sources/esp-idf/components/esp_http_server /Users/qiuzhouwei/Sources/esp-idf/components/esp_https_ota /Users/qiuzhouwei/Sources/esp-idf/components/esp_https_server /Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support /Users/qiuzhouwei/Sources/esp-idf/components/esp_lcd /Users/qiuzhouwei/Sources/esp-idf/components/esp_local_ctrl /Users/qiuzhouwei/Sources/esp-idf/components/esp_mm /Users/qiuzhouwei/Sources/esp-idf/components/esp_netif /Users/qiuzhouwei/Sources/esp-idf/components/esp_netif_stack /Users/qiuzhouwei/Sources/esp-idf/components/esp_partition /Users/qiuzhouwei/Sources/esp-idf/components/esp_phy /Users/qiuzhouwei/Sources/esp-idf/components/esp_pm /Users/qiuzhouwei/Sources/esp-idf/components/esp_psram /Users/qiuzhouwei/Sources/esp-idf/components/esp_ringbuf /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom /Users/qiuzhouwei/Sources/esp-idf/components/esp_system /Users/qiuzhouwei/Sources/esp-idf/components/esp_timer /Users/qiuzhouwei/Sources/esp-idf/components/esp_wifi /Users/qiuzhouwei/Sources/esp-idf/components/espcoredump /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressifesp32-camera /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressifesp_audio_codec /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressifesp_h264 /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressifmdns /Users/qiuzhouwei/Sources/esp-idf/components/esptool_py /Users/qiuzhouwei/Sources/esp-idf/components/fatfs /Users/qiuzhouwei/Sources/esp-idf/components/freertos /Users/qiuzhouwei/Sources/esp-idf/components/hal /Users/qiuzhouwei/Sources/esp-idf/components/heap /Users/qiuzhouwei/Sources/esp-idf/components/http_parser /Users/qiuzhouwei/Sources/esp-idf/components/idf_test /Users/qiuzhouwei/Sources/esp-idf/components/ieee802154 /Users/qiuzhouwei/Sources/esp-idf/components/json /Users/qiuzhouwei/Sources/esp-idf/components/log /Users/qiuzhouwei/Sources/esp-idf/components/lwip /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/main /Users/qiuzhouwei/Sources/esp-idf/components/mbedtls /Users/qiuzhouwei/Sources/esp-idf/components/mqtt /Users/qiuzhouwei/Sources/esp-idf/components/newlib /Users/qiuzhouwei/Sources/esp-idf/components/nvs_flash /Users/qiuzhouwei/Sources/esp-idf/components/openthread /Users/qiuzhouwei/Sources/esp-idf/components/partition_table /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/peer /Users/qiuzhouwei/Sources/esp-idf/components/perfmon /Users/qiuzhouwei/Sources/esp-idf/components/protobuf-c /Users/qiuzhouwei/Sources/esp-idf/components/protocomm /Users/qiuzhouwei/Sources/esp-idf/components/pthread /Users/qiuzhouwei/Sources/esp-idf/components/sdmmc /Users/qiuzhouwei/Sources/esp-idf/components/soc /Users/qiuzhouwei/Sources/esp-idf/components/spi_flash /Users/qiuzhouwei/Sources/esp-idf/components/spiffs /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp /Users/qiuzhouwei/Sources/esp-idf/components/tcp_transport /Users/qiuzhouwei/Sources/esp-idf/components/touch_element /Users/qiuzhouwei/Sources/esp-idf/components/ulp /Users/qiuzhouwei/Sources/esp-idf/components/unity /Users/qiuzhouwei/Sources/esp-idf/components/usb /Users/qiuzhouwei/Sources/esp-idf/components/vfs /Users/qiuzhouwei/Sources/esp-idf/components/wear_levelling /Users/qiuzhouwei/Sources/esp-idf/components/wifi_provisioning /Users/qiuzhouwei/Sources/esp-idf/components/wpa_supplicant /Users/qiuzhouwei/Sources/esp-idf/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build Running ninja in directory /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build Executing "ninja all"... [7/1009] Generating ../../partition_table/partition-table.binPartition table binary generated. Contents:


ESP-IDF Partition Table

Name, Type, SubType, Offset, Size, Flags

nvs,data,nvs,0x9000,24K, phy_init,data,phy,0xf000,4K, factory,app,factory,0x10000,2M,


[491/1009] Performing configure step for 'bootloader'-- Found Git: /opt/homebrew/bin/git (found version "2.39.0") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32s3 -- Project sdkconfig file /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/sdkconfig Compiler supported targets: xtensa-esp32s3-elf

-- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of time_t -- Check size of time_t - done -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld -- App "bootloader" version: v5.1-dirty -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld -- Adding linker script /Users/qiuzhouwei/Sources/esp-idf/components/bootloader/subproject/main/ld/esp32s3/bootloader.rom.ld -- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa -- Component paths: /Users/qiuzhouwei/Sources/esp-idf/components/bootloader /Users/qiuzhouwei/Sources/esp-idf/components/bootloader_support /Users/qiuzhouwei/Sources/esp-idf/components/efuse /Users/qiuzhouwei/Sources/esp-idf/components/esp_app_format /Users/qiuzhouwei/Sources/esp-idf/components/esp_common /Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support /Users/qiuzhouwei/Sources/esp-idf/components/esp_rom /Users/qiuzhouwei/Sources/esp-idf/components/esp_system /Users/qiuzhouwei/Sources/esp-idf/components/esptool_py /Users/qiuzhouwei/Sources/esp-idf/components/freertos /Users/qiuzhouwei/Sources/esp-idf/components/hal /Users/qiuzhouwei/Sources/esp-idf/components/log /Users/qiuzhouwei/Sources/esp-idf/components/bootloader/subproject/main /Users/qiuzhouwei/Sources/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/qiuzhouwei/Sources/esp-idf/components/newlib /Users/qiuzhouwei/Sources/esp-idf/components/partition_table /Users/qiuzhouwei/Sources/esp-idf/components/soc /Users/qiuzhouwei/Sources/esp-idf/components/spi_flash /Users/qiuzhouwei/Sources/esp-idf/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/bootloader [107/108] Generating binary image from built executableesptool.py v4.7.dev1 Creating esp32s3 image... Merged 1 ELF section Successfully created esp32s3 image. Generated /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/bootloader/bootloader.bin [108/108] cd /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/bootloader/esp-id... 0x0 /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/bootloader/bootloader.binBootloader binary size 0x5200 bytes. 0x2e00 bytes (36%) free. [945/1009] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/video.c.obj/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/main/video.c: In function 'video_task': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/main/video.c:111:11: warning: variable 'end_time' set but not used [-Wunused-but-set-variable] 111 int64_t end_time; ^~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/main/video.c:110:11: warning: variable 'start_time' set but not used [-Wunused-but-set-variable] 110 int64_t start_time; ^~~~~~ [959/1009] Building C object esp-idf/srtp/CMakeFiles/__idf_srtp.dir/libsrtp/crypto/cipher/cipher.c.obj/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c: In function 'srtp_cipher_output': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:108:56: warning: passing argument 3 of 'c->type->encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 108 return (((c)->type)->encrypt(((c)->state), buffer, num_octets_to_output)); ^~~~~~~~
uint32_t {aka long unsigned int }
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:108:56: note: expected 'unsigned int ' but argument is of type 'uint32_t ' {aka 'long unsigned int *'} /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c: In function 'srtp_cipher_encrypt': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:119:56: warning: passing argument 3 of 'c->type->encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 119 return (((c)->type)->encrypt(((c)->state), buffer, num_octets_to_output)); ^~~~~~~~
uint32_t {aka long unsigned int }
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:119:56: note: expected 'unsigned int ' but argument is of type 'uint32_t ' {aka 'long unsigned int *'} /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c: In function 'srtp_cipher_decrypt': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:130:56: warning: passing argument 3 of 'c->type->decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 130 return (((c)->type)->decrypt(((c)->state), buffer, num_octets_to_output)); ^~~~~~~~
uint32_t {aka long unsigned int }
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:130:56: note: expected 'unsigned int ' but argument is of type 'uint32_t ' {aka 'long unsigned int *'} /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c: In function 'srtp_cipher_type_test': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:297:49: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 297 status = srtp_cipher_encrypt(c, buffer, &len); ^~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:113:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 113 uint32_t *num_octets_to_output) ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:398:49: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 398 status = srtp_cipher_decrypt(c, buffer, &len); ^~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:124:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 124 uint32_t *num_octets_to_output) ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:520:49: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 520 status = srtp_cipher_encrypt(c, buffer, &length); ^~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:113:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 113 uint32_t *num_octets_to_output) ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:570:49: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 570 status = srtp_cipher_decrypt(c, buffer, &length); ^~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:124:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 124 uint32_t *num_octets_to_output) ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c: In function 'srtp_cipher_bits_per_second': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:649:45: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 649 if (srtp_cipher_encrypt(c, enc_buf, &len) != srtp_err_status_ok) { ^~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/cipher/cipher.c:113:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 113 uint32_t *num_octets_to_output) ~~^~~~~~~~ [977/1009] Building C object esp-idf/peer/CMakeFiles/__idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c.obj/Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c: In function 'peer_signaling_http_post': /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c:187:11: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 187 int32_t ret = EXIT_SUCCESS; ^~~ /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c: At top level: /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c:308:13: warning: 'peer_signaling_mqtt_publish' defined but not used [-Wunused-function] 308 static void peer_signaling_mqtt_publish(MQTTContext_t mqtt_ctx, const char message) { ^~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c:279:12: warning: 'peer_signaling_mqtt_subscribe' defined but not used [-Wunused-function] 279 static int peer_signaling_mqtt_subscribe() { ^~~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c:237:12: warning: 'peer_signaling_mqtt_connect' defined but not used [-Wunused-function] 237 static int peer_signaling_mqtt_connect(const char *hostname, int port) { ^~~~~~~ /Users/qiuzhouwei/Sources/libpeer/src/peer_signaling.c:96:14: warning: 'peer_signaling_create_offer' defined but not used [-Wunused-function] 96 static char peer_signaling_create_offer(char description) { ^~~~~~~ [985/1009] Building C object esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.objFAILED: esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj /Users/qiuzhouwei/Sources/esp-idf/tools/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc -DESP_PLATFORM -DHAVE_CONFIG_H -DIDF_VER=\"v5.1-dirty\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/config -I/Users/qiuzhouwei/Sources/libpeer/src -I/Users/qiuzhouwei/Sources/libpeer/src/transports -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/interface -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreHTTP/source/dependency/3rdparty/llhttp/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreMQTT/source/include -I/Users/qiuzhouwei/Sources/libpeer/third_party/coreMQTT/source/interface -I/Users/qiuzhouwei/Sources/esp-idf/components/newlib/platform_include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/include/freertos -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/include -I/Users/qiuzhouwei/Sources/esp-idf/components/freertos/esp_additions/arch/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include/soc -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/port/esp32s3/. -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_hw_support/port/esp32s3/private_include -I/Users/qiuzhouwei/Sources/esp-idf/components/heap/include -I/Users/qiuzhouwei/Sources/esp-idf/components/log/include -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/include -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/soc/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/include -I/Users/qiuzhouwei/Sources/esp-idf/components/hal/platform_port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/include/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_rom/esp32s3 -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_common/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/port/soc -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_system/port/include/private -I/Users/qiuzhouwei/Sources/esp-idf/components/xtensa/include -I/Users/qiuzhouwei/Sources/esp-idf/components/xtensa/esp32s3/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include/apps -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/include/apps/sntp -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/lwip/src/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/freertos/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/esp32xx/include -I/Users/qiuzhouwei/Sources/esp-idf/components/lwip/port/esp32xx/include/arch -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/port/include -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/mbedtls/include -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/mbedtls/library -I/Users/qiuzhouwei/Sources/esp-idf/components/mbedtls/esp_crt_bundle/include -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/esp-port -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/include -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include -I/Users/qiuzhouwei/Sources/esp-idf/components/json/cJSON -I/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/managed_components/espressif__mdns/include -I/Users/qiuzhouwei/Sources/esp-idf/components/console -I/Users/qiuzhouwei/Sources/esp-idf/components/vfs/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_netif/include -I/Users/qiuzhouwei/Sources/esp-idf/components/esp_event/include -mlongcalls -fdiagnostics-color=always -DESP32 -DHTTP_DO_NOT_USE_CUSTOM_CONFIG -DMQTT_DO_NOT_USE_CUSTOM_CONFIG -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3=. -fmacro-prefix-map=/Users/qiuzhouwei/Sources/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj -MF esp-idf/peer/CMakeFiles/idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj.d -o esp-idf/peer/CMakeFiles/__idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c.obj -c /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: In function 'dtls_srtp_selfsign_cert': /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:123:3: error: implicit declaration of function 'mbedtls_x509write_crt_set_serial'; did you mean 'mbedtls_x509write_crt_set_serial_raw'? [-Werror=implicit-function-declaration] 123 mbedtls_x509write_crt_set_serial(&crt, &serial); ^~~~~~~~ mbedtls_x509write_crt_set_serial_raw /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c: At top level: /Users/qiuzhouwei/Sources/libpeer/src/dtls_srtp.c:79:12: warning: 'dtls_srtp_cert_verify' defined but not used [-Wunused-function] 79 static int dtls_srtp_cert_verify(void data, mbedtls_x509_crt crt, int depth, uint32_t *flags) { ^~~~~ cc1: some warnings being treated as errors [990/1009] Building C object esp-idf/peer/CMakeFiles/__idf_peer.dir/Users/qiuzhouwei/Sources/libpeer/src/sctp.c.obj/Users/qiuzhouwei/Sources/libpeer/src/sctp.c:346:12: warning: 'sctp_handle_incoming_data' defined but not used [-Wunused-function] 346 static int sctp_handle_incoming_data(Sctp sctp, char data, size_t len, uint32_t ppid, uint16_t stream, int flags) { ^~~~~~~~~ [995/1009] Building C object esp-idf/srtp/CMakeFiles/__idf_srtp.dir/libsrtp/srtp/srtp.c.obj/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_kdf_generate': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:730:52: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 730 status = srtp_cipher_encrypt(kdf->cipher, key, &length); ^~~
unsigned int *
In file included from /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/include/srtp_priv.h:55, from /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:48: /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_protect_aead': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:1811:34: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 1811 (unsigned int *)&enc_octet_len); ^~~~~~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_unprotect_aead': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:1957:34: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 1957 &enc_octet_len); ^~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:226:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 226 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_protect_mki': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:2319:33: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 2319 (unsigned int *)&enc_octet_len); ^~~~~~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_unprotect_mki': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:2652:60: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 2652 (uint8_t *)enc_start, &enc_octet_len); ^~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:226:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 226 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_protect_rtcp_aead': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:3610:60: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 3610 (uint8_t *)enc_start, &enc_octet_len); ^~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:3629:71: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 3629 status = srtp_cipher_encrypt(session_keys->rtcp_cipher, NULL, &nolen); ^~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_unprotect_rtcp_aead': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:3779:60: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 3779 (uint8_t *)enc_start, &enc_octet_len); ^~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:226:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 226 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:3789:59: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 3789 (uint8_t *)auth_tag, &tmp_len); ^~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:226:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 226 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_protect_rtcp_mki': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:4053:60: warning: passing argument 3 of 'srtp_cipher_encrypt' from incompatible pointer type [-Wincompatible-pointer-types] 4053 (uint8_t *)enc_start, &enc_octet_len); ^~~~~~
unsigned int *
/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:223:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int *' 223 uint32_t *num_octets_to_output); ~~^~~~~~~~ /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c: In function 'srtp_unprotect_rtcp_mki': /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/srtp/srtp.c:4334:60: warning: passing argument 3 of 'srtp_cipher_decrypt' from incompatible pointer type [-Wincompatible-pointer-types] 4334 (uint8_t *)enc_start, &enc_octet_len); ^~~~~~
unsigned int *

/Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/components/srtp/libsrtp/crypto/include/cipher.h:226:49: note: expected 'uint32_t ' {aka 'long unsigned int '} but argument is of type 'unsigned int ' 226 | uint32_t num_octets_to_output); | ~~^~~~~~~~ [998/1009] Building C object esp-idf/espressifmdns/CMakeFiles/idf_espressif__mdns.dir/mdns.c.objninja: build stopped: subcommand failed. ninja failed with exit code 1, output of the command is in the /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/log/idf_py_stderr_output_55881 and /Users/qiuzhouwei/Sources/libpeer/examples/esp32s3/build/log/idf_py_stdout_output_55881 ➜ esp32s3 git:(whip) ✗

sepfy commented 8 months ago

Hi, could you check the sdkconfig? is CONFIG_MBEDTLS_SSL_PROTO_DTLS enabled? And mbedtls_x509write_crt_set_serial is removed from esp-idf 5.1, you can try to change this function to mbedtls_x509write_crt_set_serial_raw

diff --git a/src/dtls_srtp.c b/src/dtls_srtp.c
index 42accb3..8f77ffa 100644
--- a/src/dtls_srtp.c
+++ b/src/dtls_srtp.c
@@ -88,7 +88,7 @@ static int dtls_srtp_selfsign_cert(DtlsSrtp *dtls_srtp) {

   mbedtls_x509write_cert crt;

-  mbedtls_mpi serial;
+  char *serial = "peer";

   unsigned char *cert_buf = (unsigned char *) malloc(RSA_KEY_LENGTH * 2);

@@ -116,11 +116,7 @@ static int dtls_srtp_selfsign_cert(DtlsSrtp *dtls_srtp) {

   mbedtls_x509write_crt_set_issuer_name(&crt, "CN=dtls_srtp");

-  mbedtls_mpi_init(&serial);
-
-  mbedtls_mpi_fill_random(&serial, 16, mbedtls_ctr_drbg_random, &dtls_srtp->ctr_drbg);
-
-  mbedtls_x509write_crt_set_serial(&crt, &serial);
+  mbedtls_x509write_crt_set_serial_raw(&crt, (unsigned char *) serial, strlen(serial));

   mbedtls_x509write_crt_set_validity(&crt, "20180101000000", "20280101000000");

@@ -135,8 +131,6 @@ static int dtls_srtp_selfsign_cert(DtlsSrtp *dtls_srtp) {

   mbedtls_x509write_crt_free(&crt);

-  mbedtls_mpi_free(&serial);
-
   free(cert_buf);

   return ret;
chatop2020 commented 8 months ago

ok,i will try it

maherahmed commented 7 months ago

@sepfy I have tried to fix the compatibility issue with esp-idf(>5.0.2) that you mentioned.

But I get this error

I (34769) webrtc: PeerConnectionState: 2
I (34810) webrtc: PeerConnectionState: 3
ERROR   ./components/peer/src/dtls_srtp.c       419     failed! mbedtls_ssl_handshake returned -0x6e00

ERROR   ./components/peer/src/dtls_srtp.c       500     no remote fingerprint
ERROR   ./components/peer/src/dtls_srtp.c       419     failed! mbedtls_ssl_handshake returned -0x7700

ERROR   ./components/peer/src/dtls_srtp.c       500     no remote fingerprint

Any ideas?