InfiniTimeOrg / InfiniTimeOrg/InfiniSim

Linking main executable with lvgl(?) failed on Mac (M1)

Open
#127 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
203
Forks
97
PR merge metrics
No merged PRs in 30d

Description

I've been trying to get the simulator working on my Mac (M1), but it keeps failing when linking the main infinisim executable to what I assume is the lvgl library:

[100%] Linking CXX executable infinisim
Undefined symbols for architecture arm64:
  "__lv_anim_ll", referenced from:
      __lv_anim_core_init in libsim-base.a(lv_anim.c.o)
      _anim_task in libsim-base.a(lv_anim.c.o)
      _anim_mark_list_change in libsim-base.a(lv_anim.c.o)
      _lv_anim_start in libsim-base.a(lv_anim.c.o)
      _lv_anim_del in libsim-base.a(lv_anim.c.o)
      _lv_anim_del_all in libsim-base.a(lv_anim.c.o)
      _lv_anim_get in libsim-base.a(lv_anim.c.o)
      ...
  "__lv_disp_ll", referenced from:
      _lv_init in libsim-base.a(lv_obj.c.o)
      _lv_obj_get_disp in libsim-base.a(lv_obj.c.o)
      _lv_disp_drv_register in libsim-base.a(lv_hal_disp.c.o)
      _lv_disp_remove in libsim-base.a(lv_hal_disp.c.o)
      _lv_disp_get_next in libsim-base.a(lv_hal_disp.c.o)
  "__lv_draw_mask_list", referenced from:
      _lv_draw_mask_add in libsim-base.a(lv_draw_mask.c.o)
      _lv_draw_mask_apply in libsim-base.a(lv_draw_mask.c.o)
      _lv_draw_mask_remove_id in libsim-base.a(lv_draw_mask.c.o)
      _lv_draw_mask_remove_custom in libsim-base.a(lv_draw_mask.c.o)
      _lv_draw_mask_get_cnt in libsim-base.a(lv_draw_mask.c.o)
  "__lv_drv_ll", referenced from:
      __lv_fs_init in libsim-base.a(lv_fs.c.o)
      _lv_fs_get_drv in libsim-base.a(lv_fs.c.o)
      _lv_fs_drv_register in libsim-base.a(lv_fs.c.o)
      _lv_fs_get_letters in libsim-base.a(lv_fs.c.o)
  "__lv_font_decompr_buf", referenced from:
      _lv_font_get_bitmap_fmt_txt in libsim-base.a(lv_font_fmt_txt.c.o)
      __lv_font_clean_up_fmt_txt in libsim-base.a(lv_font_fmt_txt.c.o)
  "__lv_img_cache_array", referenced from:
      __lv_img_cache_open in libsim-base.a(lv_img_cache.c.o)
      _lv_img_cache_set_size in libsim-base.a(lv_img_cache.c.o)
      _lv_img_cache_invalidate_src in libsim-base.a(lv_img_cache.c.o)
  "__lv_img_defoder_ll", referenced from:
      __lv_img_decoder_init in libsim-base.a(lv_img_decoder.c.o)
      _lv_img_decoder_create in libsim-base.a(lv_img_decoder.c.o)
      _lv_img_decoder_get_info in libsim-base.a(lv_img_decoder.c.o)
      _lv_img_decoder_open in libsim-base.a(lv_img_decoder.c.o)
      _lv_img_decoder_delete in libsim-base.a(lv_img_decoder.c.o)
  "__lv_indev_ll", referenced from:
      _lv_init in libsim-base.a(lv_obj.c.o)
      _lv_indev_drv_register in libsim-base.a(lv_hal_indev.c.o)
      _lv_indev_get_next in libsim-base.a(lv_hal_indev.c.o)
  "__lv_mem_buf", referenced from:
      __lv_mem_buf_get in libsim-base.a(lv_mem.c.o)
      __lv_mem_buf_release in libsim-base.a(lv_mem.c.o)
      __lv_mem_buf_free_all in libsim-base.a(lv_mem.c.o)
     (maybe you meant: __lv_mem_buf_free_all, __lv_mem_buf_release , __lv_mem_buf_get )
  "__lv_obj_style_trans_ll", referenced from:
      _lv_init in libsim-base.a(lv_obj.c.o)
      _trans_del in libsim-base.a(lv_obj.c.o)
      _trans_create in libsim-base.a(lv_obj.c.o)
      _trans_anim_ready_cb in libsim-base.a(lv_obj.c.o)
      _lv_obj_finish_transitions in libsim-base.a(lv_obj.c.o)
  "__lv_task_act", referenced from:
      _lv_task_handler in libsim-base.a(lv_task.c.o)
      _lv_task_del in libsim-base.a(lv_task.c.o)
  "__lv_task_ll", referenced from:
      __lv_task_core_init in libsim-base.a(lv_task.c.o)
      _lv_task_handler in libsim-base.a(lv_task.c.o)
      _lv_task_create in libsim-base.a(lv_task.c.o)
      _lv_task_del in libsim-base.a(lv_task.c.o)
      _lv_task_set_prio in libsim-base.a(lv_task.c.o)
      _lv_task_get_next in libsim-base.a(lv_task.c.o)
  "__lv_theme_empty_styles", referenced from:
      _lv_theme_empty_init in libsim-base.a(lv_theme_empty.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [infinisim] Error 1
make[1]: *** [CMakeFiles/infinisim.dir/all] Error 2
make: *** [all] Error 2

In the readme it says:

-DInfiniTime_DIR=InfiniTime: a full path to an existing InfiniTime repository checked out. Inside that directory the src/libs/lvgl submodule must be checked out as well. The default value points to the InfiniTime submodule in this repository.

I verified that the submodule is indeed checked out. Also, I can build the main firmware itself without problems. For the simulator's dependencies I just ran npm install from the repo root, since there's a package.json. For building I simply used the given instructions:

cmake -S . -B build
cmake --build build -j4

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.

Research direction

Reproduce the arm64 failure with cmake -S . -B build and cmake --build build -j4, confirming the InfiniTime repository and src/libs/lvgl submodule are present. Inspect the CMake configuration for the infinisim target and its LVGL-related dependencies; done means the simulator links and builds successfully on the reported Mac setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.