I am trying to compile lvgl_javascript
branch of lv_micropython
and I have compilation problems. Maybe you can help me to get it working.
The problems I encountered during building process are the following:
1. Compiler complains about redefinition of macros in clang_predefs.h
(alredy defined in built-in
).
// many many more...
build/clang_predefs.h:315:9: error: '__VERSION__' macro redefined
[-Werror,-Wmacro-redefined]
#define __VERSION__ "4.2.1 Compatible Clang 6.0.1 (/b/s/w/ir/cache/git/c...
^
<built-in>:23:9: note: previous definition is here
#define __VERSION__ "4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)"
I removed -Wall -Werror
flags to go through.
2. main.c
doesn’t compiler because of missing setjmp
and related stuff.
main.c:228:5: error: use of undeclared identifier 'jmp_buf'
jmp_buf dummy;
^
main.c:229:9: warning: implicit declaration of function 'setjmp' is invalid in
C99 [-Wimplicit-function-declaration]
if (setjmp(dummy) == 0) {
^
main.c:229:9: warning: declaration of built-in function 'setjmp' requires
inclusion of the header <setjmp.h> [-Wbuiltin-requires-header]
Adding #include <setjmp.h>
to the main.c
file helps.
3. wasm_file_api.c
uses EM_ASM_INT
and other emscripten-specific things
wasm_file_api.c:16:20: warning: implicit declaration of function 'EM_ASM_INT' is
invalid in C99 [-Wimplicit-function-declaration]
int fidx = EM_ASM_INT({return wasm_file_open(UTF8ToString($0)); ...
^
I don’t quite understand emscripten ecosystem, so I decided to remove this file from the Makefile
and try to build without filesystem support for now.
4. finally everything got compiled but linking failed
I got a huge list of warnings like
# warnings for all object files
emcc:WARNING: build/lib/timeutils/timeutils.o is not a valid input file
And finaly a linker error:
shared:ERROR: no input files
note that input files without a known suffix are ignored, make sure
your input files end with one of: ('.c', '.C', '.i', '.cpp', '.cxx', '.cc', '.c++',
'.CPP', '.CXX', '.CC', '.C++', '.ii', '.m', '.mi', '.mm', '.mii', '/dev/null', '.bc',
'.o', '.obj', '.lo', '.dylib', '.so', '.a', '.ll', '.h', '.hxx', '.hpp', '.hh', '.H',
'.HXX', '.HPP', '.HH')`
At this point I am stuck and have no idea how to proceed. Maybe I need some specific version of emsdk? If so which one?
Original micropython builds succesfully:
I was able to get micropython master branch fully working with ./emsdk activate latest-fastcomp
.
./emsdk activate latest
didn’t work so I switched to legacy emsdk.
Guys, I need help