[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


  • To: "Justin He (Arm Technology China)" <Justin.He@xxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Felipe Huici <Felipe.Huici@xxxxxxxxx>
  • Date: Tue, 3 Sep 2019 13:15:38 +0000
  • Accept-language: en-US
  • Delivery-date: Tue, 03 Sep 2019 13:15:49 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVXbVi/nxZbwkWDEiSXh7wsDBUgKcXuR0AgAI+0wA=
  • Thread-topic: [Minios-devel] [UNIKRAFT/LIBLUA PATCH 0/3] support for the lua language

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.

    
    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...


    --
    Cheers,
    Justin (Jia He)
    
    
    
    > -----Original Message-----
    > From: Minios-devel <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf
    > Of Felipe Huici
    > Sent: 2019年8月28日 23:29
    > To: minios-devel@xxxxxxxxxxxxx
    > Cc: Felipe Huici <felipe.huici@xxxxxxxxx>
    > Subject: [Minios-devel] [UNIKRAFT/LIBLUA PATCH 0/3] support for the lua
    > language
    >
    > This is our intial port of the lua language to Unikraft. For now it 
supports
    > interactive mode, running a string (i.e., a script)  and running a script
    > from a file provided via initrd.
    >
    > Felipe Huici (3):
    >   Introduce library skeleton
    >   Add Makefile.uk and main loop glue code
    >   Export symbols
    >
    >  .gitignore      |  27 +++
    >  CODING_STYLE.md |   4 +
    >  CONTRIBUTING.md |   4 +
    >  COPYING.md      |  39 ++++
    >  Config.uk       |   4 +
    >  MAINTAINERS.md  |  11 +
    >  Makefile.uk     | 100 +++++++++
    >  README.md       |   9 +
    >  exportsyms.uk   |  93 +++++++++
    >  lua.c           | 620
    > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    >  10 files changed, 911 insertions(+)
    >  create mode 100644 .gitignore
    >  create mode 100644 CODING_STYLE.md
    >  create mode 100644 CONTRIBUTING.md
    >  create mode 100644 COPYING.md
    >  create mode 100644 Config.uk
    >  create mode 100644 MAINTAINERS.md
    >  create mode 100644 Makefile.uk
    >  create mode 100644 README.md
    >  create mode 100644 exportsyms.uk
    >  create mode 100644 lua.c
    >
    > --
    > 2.11.0
    >
    >
    > _______________________________________________
    > Minios-devel mailing list
    > Minios-devel@xxxxxxxxxxxxxxxxxxxx
    > https://lists.xenproject.org/mailman/listinfo/minios-devel
    IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
    

_______________________________________________
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®.