lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 156 forks source link

CI fails due to LVGL external libraries #196

Closed amirgon closed 2 years ago

amirgon commented 2 years ago

CI Failure only on lv_binding_micropython CI: https://github.com/lvgl/lv_binding_micropython/runs/4122948432?check_suite_focus=true

External libraries (FreeType and Rlottie) are not linked although they are supposed to:

# Additional optional libraries

RLOTTIE_CFLAGS_MOD :=  $(shell pkg-config --silence-errors --cflags rlottie)
RLOTTIE_LDFLAGS_MOD := $(shell pkg-config --silence-errors --libs   rlottie)
ifneq ($(RLOTTIE_LDFLAGS_MOD),)
CFLAGS_MOD += $(RLOTTIE_CFLAGS_MOD) -DMICROPY_RLOTTIE=1
LDFLAGS_MOD += $(RLOTTIE_LDFLAGS_MOD)
endif

FREETYPE_CFLAGS_MOD :=  $(shell pkg-config --silence-errors --cflags freetype2)
FREETYPE_LDFLAGS_MOD := $(shell pkg-config --silence-errors --libs   freetype2)
ifneq ($(FREETYPE_LDFLAGS_MOD),)
CFLAGS_MOD += $(FREETYPE_CFLAGS_MOD) -DMICROPY_FREETYPE=1
LDFLAGS_MOD += $(FREETYPE_LDFLAGS_MOD)
endif

The same problem does not happen on lv_micropython or on LVGL CI.

@embeddedt - Maybe you would have an idea: How is it possible that this problem happens only on lv_binding_micropython but not on lv_micropython or LVGL CI, although they are building the unix port in the same way?

embeddedt commented 2 years ago

I'd have to investigate it further, but at first glance, the extra LDFLAGS_MOD argument here looks suspicious. I didn't add that to the LVGL CI.

amirgon commented 2 years ago

I'd have to investigate it further, but at first glance, the extra LDFLAGS_MOD argument here looks suspicious. I didn't add that to the LVGL CI.

You are right, of course! Thank you for pointing this out.

LDFLAGS_MOD on the make command line overrides LDFLAGS_MOD in the Makefile.
These linker options were added for debug when the run script crashed with SIGSEGV, but I think they are no longer needed.

Fixed by https://github.com/lvgl/lv_binding_micropython/commit/34706664d57bdedf071d2aceaf322a926a61b78e