[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/LIBLUA PATCH 0/3] support for the lua language



Hi Felipe,

Sorry for using gmail box, our outlook filtered your replies.

Please see inline

On 2019/9/3 21:15, Felipe Huici wrote:
Hi Justin, please see inline.

On 02.09.19, 06:58, "Justin He (Arm Technology China)" <Justin.He@xxxxxxx> 
wrote:

     Hi Felipe
     Besides, I found another 2 issues:
     1. some head files are missing after fetching the liblua src codes
     root@jong:~/hj/UK/apps/helloworld# ll  
/root/hj/UK/apps/helloworld/build/liblua/include/
     total 28
     drwxr-xr-x 2 root root 4096 9月   2 12:52 ./
     drwxr-xr-x 4 root root 4096 9月   2 12:53 ../
     lrwxrwxrwx 1 root root   71 9月   2 12:52 lauxlib.h -> 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lauxlib.h
     lrwxrwxrwx 1 root root   71 9月   2 12:52 luaconf.h -> 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/luaconf.h
     lrwxrwxrwx 1 root root   67 9月   2 12:52 lua.h -> 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lua.h
     lrwxrwxrwx 1 root root   69 9月   2 12:52 lua.hpp -> 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lua.hpp
     lrwxrwxrwx 1 root root   70 9月   2 12:52 lualib.h -> 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lualib.h
     root@jong:~/hj/UK/apps/helloworld# ll 
/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lauxlib.h
     ls: cannot access 
'/root/hj/UK/apps/helloworld/build/liblua/origin/lua-5.3.5/src/lauxlib.h': No 
such file or directory
     root@jong:~/hj/UK/apps/helloworld#
I guess something wrong in Makefile.uk
     # TO_INC
     UK_PREPARE += $(LIBLUA_BUILD)/include/lua.h
     UK_PREPARE += $(LIBLUA_BUILD)/include/luaconf.h
     UK_PREPARE += $(LIBLUA_BUILD)/include/lualib.h
     UK_PREPARE += $(LIBLUA_BUILD)/include/lauxlib.h
     UK_PREPARE += $(LIBLUA_BUILD)/include/lua.hpp
This is actually a problem of the build system, we're currently working on it. As a workaround, in your app's Makefile please put:

all:
        @make -C $(UK_ROOT) A=$(PWD) L=$(LIBS) fetch
        @make -C $(UK_ROOT) A=$(PWD) L=$(LIBS) prepare
        @make -C $(UK_ROOT) A=$(PWD) L=$(LIBS)

This will make sure the prepare step runs before the actual make, which is 
what's causing the error.


     2. seems liblua can't be built with nolibc enabled, no signal.h is found

Yes, one of the commits says it, this library can't build against noblic (at 
least for now), it requires newlib.


How about make it explictly depends on newlib? instead of "select LIBNOLIBC if !HAVE_LIBC“


3, with newlib enabled, the helloworld app (almost dummy main()) can't
     be linked:
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`__collate_err':
     sglist.c:(.text+0x788d): undefined reference to `write'
     sglist.c:(.text+0x78a5): undefined reference to `write'
     sglist.c:(.text+0x78bb): undefined reference to `write'
     sglist.c:(.text+0x78ee): undefined reference to `write'
     sglist.c:(.text+0x7904): undefined reference to `write'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_close_r':
     sglist.c:(.text+0xf219): undefined reference to `close'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_fstat_r':
     sglist.c:(.text+0xf3bc): undefined reference to `fstat'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_mkdir_r':
     sglist.c:(.text+0xf50c): undefined reference to `mkdir'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_open_r':
     sglist.c:(.text+0xf550): undefined reference to `open'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_read_r':
     sglist.c:(.text+0xf58f): undefined reference to `read'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_stat_r':
     sglist.c:(.text+0xf67d): undefined reference to `stat'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_unlink_r':
     sglist.c:(.text+0xf6ca): undefined reference to `unlink'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`_write_r':
     sglist.c:(.text+0xf70f): undefined reference to `write'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`flush_meta':
     hash.c:(.text+0x1040c): undefined reference to `write'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`hdestroy':
     hash.c:(.text+0x105ad): undefined reference to `close'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`__hash_open':
     sglist.c:(.text+0x10f28): undefined reference to `stat'
     sglist.c:(.text+0x10f62): undefined reference to `open'
     sglist.c:(.text+0x10f9a): undefined reference to `fstat'
     sglist.c:(.text+0x1104b): undefined reference to `stat'
     sglist.c:(.text+0x11206): undefined reference to `read'
     sglist.c:(.text+0x1169d): undefined reference to `close'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`__get_page':
     sglist.c:(.text+0x1304e): undefined reference to `read'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`__put_page':
     sglist.c:(.text+0x132ae): undefined reference to `unlink'
     sglist.c:(.text+0x133fa): undefined reference to `write'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`__add_ovflpage':
     sglist.c:(.text+0x136ab): undefined reference to `write'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`pmain':
     lua.c:(.text+0x67a97): undefined reference to 
`ukplat_memregion_find_initrd0'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`luaD_throw':
     linit.c:(.text+0x6cbd0): undefined reference to `longjmp'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`luaD_rawrunprotected':
     linit.c:(.text+0x6cdce): undefined reference to `setjmp'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`os_execute':
     loslib.c:(.text+0x82f0f): undefined reference to `system'
     /root/hj/UK/apps/helloworld/build/helloworld_kvm-x86_64.o: In function 
`main':
     sglist.c:(.text.startup+0x77): undefined reference to `luaL_openlibs'
     sglist.c:(.text.startup+0xc8): undefined reference to `luaL_loadbufferx'
This is strange. Most of the symbols are newlib ones, did you do a properclean; make and you still get these errors? I ask becase I have all of those symbols in my final image...

I will double check it

---
Cheers,
Justin (Jia He)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.