TEN-framework / TEN-framework/ten-framework

[BUG] ESP32 client build failed

Open
#1,207 1 comment 0 reactions 1 assignee View on GitHub

@cyfyifanchen is already working on this.

Since Sep 8, 2025.

bug
Dominant language
Python
Stars
11.1k
Forks
1.4k
Avg merge
2d 15m
Merged PRs (30d)
22

Description

Description

As docs described, using IDF v5.2.3 and ADF v2.7, build failed as errors.

I checked adf v2.7 and its submodule. Do not have jpeg_enc_handle_t in esp-adf-libs

https://github.com/espressif/esp-adf-libs/blame/f1b8cdbf9986402fbd9a743704eb699a3521900a/esp_codec/include/codec/esp_jpeg_enc.h

/home/comfyui/esp/esp-adf/components/esp-adf-libs/esp_codec/include/codec/esp_jpeg_enc.h:24:19: note: (near initialization for 'jpeg_enc_info')
   24 |         .rotate = JPEG_ROTATE_0D,              \
      |                   ^~~~~~~~~~~~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:86:37: note: in expansion of macro 'DEFAULT_JPEG_ENC_CONFIG'
   86 |   jpeg_enc_config_t jpeg_enc_info = DEFAULT_JPEG_ENC_CONFIG();
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:88:16: error: request for member 'width' in something not a structure or union
   88 |   jpeg_enc_info.width       = CAMERA_WIDTH;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:89:16: error: request for member 'height' in something not a structure or union
   89 |   jpeg_enc_info.height      = CAMERA_HIGH;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:91:16: error: request for member 'src_type' in something not a structure or union
   91 |   jpeg_enc_info.src_type    = JPEG_PIXEL_FORMAT_YCbYCr;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:91:31: error: 'JPEG_PIXEL_FORMAT_YCbYCr' undeclared (first use in this function)
   91 |   jpeg_enc_info.src_type    = JPEG_PIXEL_FORMAT_YCbYCr;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:91:31: note: each undeclared identifier is reported only once for each function it appears in
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:92:16: error: request for member 'subsampling' in something not a structure or union
   92 |   jpeg_enc_info.subsampling = subsampling;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:93:16: error: request for member 'quality' in something not a structure or union
   93 |   jpeg_enc_info.quality     = quality;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:95:16: error: request for member 'hfm_task_core' in something not a structure or union
   95 |   jpeg_enc_info.hfm_task_core     = hfm_core;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:96:16: error: request for member 'hfm_task_priority' in something not a structure or union
   96 |   jpeg_enc_info.hfm_task_priority = hfm_priority;
      |                ^
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:98:36: warning: passing argument 1 of 'jpeg_enc_open' from incompatible pointer type [-Wincompatible-pointer-types]
   98 |   jpeg_error_t ret = jpeg_enc_open(&jpeg_enc_info, &jpeg_enc);
      |                                    ^~~~~~~~~~~~~~
      |                                    |
      |                                    int *
/home/comfyui/esp/esp-adf/components/esp-adf-libs/esp_codec/include/codec/esp_jpeg_enc.h:50:38: note: expected 'jpeg_enc_info_t *' {aka 'struct jpeg_info *'} but argument is of type 'int *'
   50 | void *jpeg_enc_open(jpeg_enc_info_t *info);
      |                     ~~~~~~~~~~~~~~~~~^~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:98:22: error: too many arguments to function 'jpeg_enc_open'
   98 |   jpeg_error_t ret = jpeg_enc_open(&jpeg_enc_info, &jpeg_enc);
      |                      ^~~~~~~~~~~~~
/home/comfyui/esp/esp-adf/components/esp-adf-libs/esp_codec/include/codec/esp_jpeg_enc.h:50:7: note: declared here
   50 | void *jpeg_enc_open(jpeg_enc_info_t *info);
      |       ^~~~~~~~~~~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:98:22: error: incompatible types when initializing type 'jpeg_error_t' using type 'void *'
   98 |   jpeg_error_t ret = jpeg_enc_open(&jpeg_enc_info, &jpeg_enc);
      |                      ^~~~~~~~~~~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:101:12: error: incompatible types when returning type 'void *' but 'jpeg_enc_info_t' {aka 'struct jpeg_info'} was expected
  101 |     return NULL;
      |            ^~~~
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c: In function 'video_send_thread':
/workspace/luhualin/ten-framework/ai_agents/esp32-client/main/video_proc.c:112:3: error: unknown type name 'jpeg_enc_handle_t'; did you mean 'jpeg_enc_info_t'?
Environment

Ubuntu, x86

Steps to reproduce

Build esp32 client as doc in https://github.com/TEN-framework/ten-framework/tree/main/ai_agents/esp32-client.

Expected behavior

No build error.

Severity

Critical

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.