Skip to content

[BUG] libuv does not compile actually #3124

@fxdmhtt

Description

@fxdmhtt

Description / Steps to reproduce the issue

make distclean
./tools/configure.sh -l sim:lvgl_fb

kconfig-tweak --enable CONFIG_GRAPHICS_LVGL
kconfig-tweak --enable CONFIG_EXAMPLES_LVGLDEMO
kconfig-tweak --enable CONFIG_LV_USE_NUTTX
kconfig-tweak --disable CONFIG_DEBUG_FULLOPT
kconfig-tweak --enable CONFIG_DEBUG_SCHED
kconfig-tweak --enable CONFIG_DEBUG_SCHED_ERROR
kconfig-tweak --enable CONFIG_SCHED_BACKTRACE
kconfig-tweak --enable CONFIG_FRAME_POINTER
kconfig-tweak --enable CONFIG_PIPES
kconfig-tweak --enable CONFIG_LIBUV
kconfig-tweak --set-val CONFIG_TLS_TASK_NELEM 16
kconfig-tweak --disable CONFIG_DISABLE_ENVIRON
kconfig-tweak --enable CONFIG_LV_USE_NUTTX_LIBUV
make olddefconfig

make -j8

This will report:

/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c: In function ‘lv_nuttx_run’:
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:180:23: error: ‘ui_loop’ undeclared (first use in this function)
  180 |     lv_nuttx_uv_loop(&ui_loop, result);
      |                       ^~~~~~~
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:180:23: note: each undeclared identifier is reported only once for each function it appears in
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:180:5: error: too many arguments to function ‘lv_nuttx_uv_loop’
  180 |     lv_nuttx_uv_loop(&ui_loop, result);
      |     ^~~~~~~~~~~~~~~~
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:52:17: note: declared here
   52 |     static void lv_nuttx_uv_loop(lv_nuttx_result_t * result);
      |                 ^~~~~~~~~~~~~~~~
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c: In function ‘lv_nuttx_uv_loop’:
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:273:5: error: unknown type name ‘uv_loop_t ’
  273 |     uv_loop_t loop;
      |     ^~~~~~~~~
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:277:5: warning: implicit declaration of function ‘uv_loop_init’; did you mean ‘lv_ll_init’? [-Wimplicit-function-declaration]
  277 |     uv_loop_init(&loop);
      |     ^~~~~~~~~~~~
      |     lv_ll_init
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:288:5: warning: implicit declaration of function ‘uv_run’ [-Wimplicit-function-declaration]
  288 |     uv_run(loop, UV_RUN_DEFAULT);
      |     ^~~~~~
/root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c:288:18: error: ‘UV_RUN_DEFAULT’ undeclared (first use in this function); did you mean ‘LV_FONT_DEFAULT’?
  288 |     uv_run(loop, UV_RUN_DEFAULT);
      |                  ^~~~~~~~~~~~~~
      |                  LV_FONT_DEFAULT
make[2]: *** [/root/nuttxspace/apps/Application.mk:239: /root/nuttxspace/apps/graphics/lvgl/lvgl/src/drivers/nuttx/lv_nuttx_entry.c.root.nuttxspace.apps.graphics.lvgl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:54: /root/nuttxspace/apps/graphics/lvgl_all] Error 2
make: *** [tools/LibTargets.mk:248: /root/nuttxspace/apps/libapps.a] Error 2

This is normal, because apps/examples/lvgldemo/lvgldemo.c depends on uv_loop_init

uv_loop_init(loop);

and uv_loop_init in apps/system/libuv/libuv/src/unix/loop.c also depends on uv__process_init

https://github.com/libuv/libuv/blob/612a8262b840a1d104afcd9c45b2b88cde6b9e6d/src/unix/loop.c#L85

but uv__process_init exists in apps/system/libuv/libuv/src/unix/process.c and it is not in the apps/system/libuv/Makefile file.

Of course, there shouldn't be, since NuttX doesn't have a process model.

In fact, manually adding process.c to the compilation would introduce more problems.

So, what's the idea? Is libuv actually usable?

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu 24.04 LTS

NuttX Version

master

Issue Architecture

[Arch: simulator]

Issue Area

[Area: Examples]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions