unikraft / app-helloworld-cpp

kraft-ready repo for building c++ applications with Unikraft
3 stars 16 forks source link

stddef.h: No such file or directory #17

Open panjea opened 1 year ago

panjea commented 1 year ago
 D  pulling manifest package libcxx
 D  using cache local=/home/rap/.local/share/kraftkit/sources/libcxx-stable.tar.gz remote=https://github.com/unikraft/lib-libcxx/archive/refs/heads/stable.tar.gz
 T  unarchiving from=/home/rap/.local/share/kraftkit/sources/libcxx-stable.tar.gz to=/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx
 i  pulling lib/libunwind:stable
 D  pulling manifest package libunwind
 D  using cache local=/home/rap/.local/share/kraftkit/sources/libunwind-stable.tar.gz remote=https://github.com/unikraft/lib-libunwind/archive/refs/heads/stable.tar.gz
 T  unarchiving from=/home/rap/.local/share/kraftkit/sources/libunwind-stable.tar.gz to=/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind
 i  configuring helloworld-cpp (qemu/x86_64)
 D  defconfig CONFIG_LIBPOSIX_SYSINFO=y
 D  defconfig CONFIG_KVM_BOOT_PROTO_MULTIBOOT=y
 D  defconfig CONFIG_LIBMUSL_ENV=y
 D  defconfig CONFIG_LIBMUSL_STAT=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP0_NOTEMPTY=y
 D  defconfig CONFIG_HAVE_LIBC=y
 D  defconfig CONFIG_LIBMUSL_PASSWD=y
 D  defconfig CONFIG_LIBVFSCORE=y
 D  defconfig CONFIG_LIBMUSL_FORCE_THREAD=y
 D  defconfig CONFIG_LIBCXX=y
 D  defconfig CONFIG_UK_NAME=helloworld-cpp
 D  defconfig CONFIG_LIBMUSL_SETJMP=y
 D  defconfig CONFIG_LIBUKSGLIST=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON=y
 D  defconfig CONFIG_KVM_SERIAL_BAUD_115200=y
 D  defconfig CONFIG_KVM_PCI=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP2=
 D  defconfig CONFIG_HZ=100
 D  defconfig CONFIG_OPTIMIZE_NOOMITFP=y
 D  defconfig CONFIG_LIBLIBCXX=y
 D  defconfig CONFIG_UKPLAT_LCPU_MAXCOUNT=1
 D  defconfig CONFIG_LIBMUSL_UNISTD=y
 D  defconfig CONFIG_LIBMUSL_PRNG=y
 D  defconfig CONFIG_LIBUKBOOT_MAXNBARGS=60
 D  defconfig CONFIG_LIBMUSL_MQ=y
 D  defconfig CONFIG_HAVE_BOOTENTRY=y
 D  defconfig CONFIG_LIBUNWIND=y
 D  defconfig CONFIG_LIBPOSIX_TIME=y
 D  defconfig CONFIG_LIBPOSIX_PROCESS_PIDS=y
 D  defconfig CONFIG_LLVM_TARGET_ARCH=
 D  defconfig CONFIG_LIBMUSL_REGEX=y
 D  defconfig CONFIG_KVM_KERNEL_SERIAL_CONSOLE=y
 D  defconfig CONFIG_UK_APP=/home/rap/app-helloworld-cpp
 D  defconfig CONFIG_KVM_KERNEL_VGA_CONSOLE=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP0=PATH=/bin
 D  defconfig CONFIG_LIBMUSL_NETWORK=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP8=
 D  defconfig CONFIG_LIBMUSL_MULTIBYTE=y
 D  defconfig CONFIG_LIBPOSIX_PROCESS_MAX_PID=31
 D  defconfig CONFIG_UK_DEFNAME=helloworld-cpp
 D  defconfig CONFIG_LIBMUSL_TIME=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP3=
 D  defconfig CONFIG_LIBMUSL_ERRNO=y
 D  defconfig CONFIG_LIBUKSCHED=y
 D  defconfig CONFIG_LIBUKDEBUG_REDIR_PRINTD=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP1=
 D  defconfig CONFIG_LIBUKLOCK_RWLOCK=y
 D  defconfig CONFIG_OPTIMIZE_COMPRESS=y
 D  defconfig CONFIG_OPTIMIZE_PERF=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP13=
 D  defconfig CONFIG_LIBMUSL_FENV=y
 D  defconfig CONFIG_LIBUKBOOT_BANNER_POWEREDBY=y
 D  defconfig CONFIG_KVM_VMM_QEMU=y
 D  defconfig CONFIG_LIBUKMMAP=y
 D  defconfig CONFIG_LIBMUSL_LEGACY=y
 D  defconfig CONFIG_UK_FULLVERSION=0.14.0~31806dd
 D  defconfig CONFIG_LIBMUSL_MALLOC=y
 D  defconfig CONFIG_LIBLIBUNWIND=y
 D  defconfig CONFIG_LIBCOMPILER_RT=y
 D  defconfig CONFIG_LIBUKSCHED_TCB_INIT=y
 D  defconfig CONFIG_LIBUKDEBUG_PRINT_SRCNAME=y
 D  defconfig CONFIG_UK_ARCH=x86_64
 D  defconfig CONFIG_LIBMUSL_CTYPE=y
 D  defconfig CONFIG_LIBMUSL_LDSO=y
 D  defconfig CONFIG_KVM_DEBUG_SERIAL_CONSOLE=y
 D  defconfig CONFIG_LIBMUSL_PROCESS=y
 D  defconfig CONFIG_LIBSYSCALL_SHIM=y
 D  defconfig CONFIG_LIBMUSL_LOCALE_LEGACY=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP12=
 D  defconfig CONFIG_ARCH_X86_64=y
 D  defconfig CONFIG_UK_BASE=/home/rap/app-helloworld-cpp/.unikraft/unikraft
 D  defconfig CONFIG_LIBMUSL_MISC=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP4=
 D  defconfig CONFIG_LIBUKBOOT_INITBBUDDY=y
 D  defconfig CONFIG_LIBUKLOCK_MUTEX=y
 D  defconfig CONFIG_LIBUKDEBUG_PRINTK=y
 D  defconfig CONFIG_LIBCOMPILER_RT_MATH=y
 D  defconfig CONFIG_LIBMUSL_TERMIOS=y
 D  defconfig CONFIG_LIBUKBUS=y
 D  defconfig CONFIG_LIBMUSL_CRYPT=y
 D  defconfig CONFIG_LIBMUSL_LOCALE=y
 D  defconfig CONFIG_LIBMUSL_FCNTL=y
 D  defconfig CONFIG_LIBMUSL_SEARCH=y
 D  defconfig CONFIG_LIBUKTIMECONV=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP11=
 D  defconfig CONFIG_LIBUKALLOCBBUDDY=y
 D  defconfig CONFIG_LIBCOMPILER-RT=y
 D  defconfig CONFIG_LIBUKSCHEDCOOP=y
 D  defconfig CONFIG_LIBMUSL_EXIT=y
 D  defconfig CONFIG_LIBMUSL_SELECT=y
 D  defconfig CONFIG_LIBMUSL_INTERNAL=y
 D  defconfig CONFIG_LIBUKDEBUG_ENABLE_ASSERT=y
 D  defconfig CONFIG_STACK_SIZE_PAGE_ORDER=4
 D  defconfig CONFIG_LIBUKSIGNAL=y
 D  defconfig CONFIG_LIBPOSIX_PROCESS_CLONE=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP7=
 D  defconfig CONFIG_LIBMUSL_MMAN=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP9=
 D  defconfig CONFIG_LIBUKALLOC=y
 D  defconfig CONFIG_LIBCXXABI=y
 D  defconfig CONFIG_LIBMUSL_STDLIB=y
 D  defconfig CONFIG_LIBMUSL_TEMP=y
 D  defconfig CONFIG_LIBPOSIX_PROCESS_INIT_PIDS=y
 D  defconfig CONFIG_DEBUG_SYMBOLS_LVL3=y
 D  defconfig CONFIG_LIBUKARGPARSE=y
 D  defconfig CONFIG_LIBMUSL_CONF=y
 D  defconfig CONFIG_LIBUKLOCK=y
 D  defconfig CONFIG_LIBUKDEBUG_PRINT_TIME=y
 D  defconfig CONFIG_LIBUKDEBUG=y
 D  defconfig CONFIG_LIBMUSL=y
 D  defconfig CONFIG_CROSS_COMPILE=
 D  defconfig CONFIG_LIBMUSL_SIGNAL=y
 D  defconfig CONFIG_HAVE_SCHED=y
 D  defconfig CONFIG_KVM_MAX_IRQ_HANDLER_ENTRIES=8
 D  defconfig CONFIG_LIBUKBOOT=y
 D  defconfig CONFIG_LIBVFSCORE_PIPE_SIZE_ORDER=16
 D  defconfig CONFIG_LIBMUSL_THREAD=y
 D  defconfig CONFIG_LIBMUSL_MATH=y
 D  defconfig CONFIG_LIBSYSCALL_SHIM_NOWRAPPER=y
 D  defconfig CONFIG_VIRTIO_BUS=y
 D  defconfig CONFIG_LIBMUSL_AIO=y
 D  defconfig CONFIG_LIBPOSIX_PROCESS=y
 D  defconfig CONFIG_LIBPOSIX_FUTEX=y
 D  defconfig CONFIG_LIBMUSL_DIRENT=y
 D  defconfig CONFIG_LIBUKSTREAMBUF=y
 D  defconfig CONFIG_LIBUKBOOT_INITSCHEDCOOP=y
 D  defconfig CONFIG_LIBLIBCXXABI=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP10=
 D  defconfig CONFIG_LIBUKLIBID=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP5=
 D  defconfig CONFIG_LIBMUSL_STDIO=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP14=
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP6=
 D  defconfig CONFIG_UKPLAT_MEMREGION_MAX_COUNT=128
 D  defconfig CONFIG_LIBMUSL_STRING=y
 D  defconfig CONFIG_LIBMUSL_IPC=y
 D  defconfig CONFIG_MARCH_X86_64_GENERIC=y
 D  defconfig CONFIG_LIBMUSL_SCHED=y
 D  defconfig CONFIG_LIBUKDEBUG_PRINTK_ERR=y
 D  defconfig CONFIG_LIBMUSL_LINUX=y
 D  defconfig CONFIG_KVM_DEBUG_VGA_CONSOLE=y
 D  defconfig CONFIG_LIBSYSCALL_SHIM_LEGACY_VERBOSE=y
 D  defconfig CONFIG_LIBPOSIX_ENVIRON_ENVP15=
 D  defconfig CONFIG_UKPLAT_ALLOW_GIC=y
 D  defconfig CONFIG_LIBUKLOCK_SEMAPHORE=y
 D  defconfig CONFIG_PLAT_KVM=y
 D  defconfig CONFIG_UK_CODENAME=Prometheus
 D  defconfig CONFIG_HAVE_TIME=y
 D  make O=/home/rap/app-helloworld-cpp/.unikraft/build A=/home/rap/app-helloworld-cpp L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi N=helloworld-cpp C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 /home/rap/app-helloworld-cpp/.unikraft/build/Makefile -C /home/rap/app-helloworld-cpp/.unikraft/unikraft --no-print-directory -s
 D  make A=/home/rap/app-helloworld-cpp L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt N=helloworld-cpp C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 UK_DEFCONFIG=/tmp/helloworld-cpp-config3413325854 O=/home/rap/app-helloworld-cpp/.unikraft/build defconfig -C /home/rap/app-helloworld-cpp/.unikraft/unikraft -n
 D  make UK_DEFCONFIG=/tmp/helloworld-cpp-config3413325854 O=/home/rap/app-helloworld-cpp/.unikraft/build A=/home/rap/app-helloworld-cpp L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt N=helloworld-cpp C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 defconfig -C /home/rap/app-helloworld-cpp/.unikraft/unikraft --no-print-directory -s
 i  #
 i  # configuration written to /home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64
 i  #
 i  building helloworld-cpp (qemu/x86_64)
 D  make L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi N=helloworld-cpp C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 O=/home/rap/app-helloworld-cpp/.unikraft/build A=/home/rap/app-helloworld-cpp prepare -C /home/rap/app-helloworld-cpp/.unikraft/unikraft --no-print-directory
 i    CP      config
 i    GEN     libuklibid: libraries.in.new
 D  make C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 O=/home/rap/app-helloworld-cpp/.unikraft/build A=/home/rap/app-helloworld-cpp L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt N=helloworld-cpp -C /home/rap/app-helloworld-cpp/.unikraft/unikraft -n
 D  make C=/home/rap/app-helloworld-cpp/.config.helloworld-cpp_qemu-x86_64 O=/home/rap/app-helloworld-cpp/.unikraft/build A=/home/rap/app-helloworld-cpp L=/home/rap/app-helloworld-cpp/.unikraft/libs/musl:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxxabi:/home/rap/app-helloworld-cpp/.unikraft/libs/libcxx:/home/rap/app-helloworld-cpp/.unikraft/libs/libunwind:/home/rap/app-helloworld-cpp/.unikraft/libs/compiler-rt N=helloworld-cpp -C /home/rap/app-helloworld-cpp/.unikraft/unikraft --no-print-directory
 i    GEN     libsyscall_shim: provided_syscalls.in.new
 i    CP      libsyscall_shim: provided_syscalls.in
 i    CP      config
 i    GEN     libuklibid: libraries.in.new
 i    CP      libuklibid: libraries.in
 i    AWK     libuklibid: libid.h
 i    AWK     libuklibid: namemap.c
 i    AWK     libuklibid: selfids.c
 i    AWK     libuklibid: exportsyms.uk
 i    CC      libkvmplat: trace.common.o
 i    CC      libkvmplat: traps.isr.o
 i    CC      libkvmplat: cpu_native.common.o
 i    CC      libkvmplat: lcpu.x86_common.o
 i    CC      libkvmplat: tls.common.o
 i    CC      libkvmplat: multiboot.o
 i    CC      libkvmplat: traps.o
 i    CC      libkvmplat: setup.o
 i    CC      libkvmplat: console.o
 i    CC      libkvmplat: lcpu.o
 i    CC      libkvmplat: intctrl.o
 i    CC      libkvmplat: tscclock.o
 i    CC      libkvmplat: time.o
 i    CC      libkvmplat: vga_console.o
 i    CC      libkvmplat: serial_console.o
 i    CC      libkvmplat: shutdown.o
 i    CC      libkvmplat: irq.o
 i    CC      libkvmplat: lcpu.common.o
 i    CC      libkvmplat: memory.common.o
 i    CC      libkvmplat: bootinfo.common.o
 i    LD      libkvmplat.ld.o
 E  /usr/bin/ld: warning: /home/rap/app-helloworld-cpp/.unikraft/build/libkvmplat/lcpu_start.o: missing .note.GNU-stack section implies executable stack
 E  /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
 i    OBJCOPY libkvmplat.o
 i    CC      libkvmpci: pci_bus.common.o
 i    CC      libkvmpci: pci_bus_x86.x86.o
 i    LD      libkvmpci.ld.o
 i    OBJCOPY libkvmpci.o
 i    CC      libkvmvirtio: virtio_bus.o
 i    CC      libkvmvirtio: virtio_ring.o
 i    LD      libkvmvirtio.ld.o
 i    OBJCOPY libkvmvirtio.o
 i    CXX     apphelloworldcpp: helloworld.o
 E  In file included from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/type_traits:420,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/__functional/weak_result_type.h:16,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/__functional/invoke.h:14,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/__functional_base:15,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/memory:808,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/__locale:18,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/ios:214,
 E                   from /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/iostream:37,
 E                   from /home/rap/app-helloworld-cpp/helloworld.cpp:1:
 E  /home/rap/app-helloworld-cpp/.unikraft/build/libcxx/origin/libcxx-14.0.6.src/include/cstddef:44:15: fatal error: stddef.h: No such file or directory
 E     44 | #include_next <stddef.h>
 E        |               ^~~~~~~~~~
 E  compilation terminated.
 E  make[2]: *** [/home/rap/app-helloworld-cpp/.unikraft/unikraft/support/build/Makefile.build:27: /home/rap/app-helloworld-cpp/.unikraft/build/apphelloworldcpp/helloworld.o] Error 1
 E  make[1]: *** [Makefile:1134: sub-make] Error 2
 E  make: *** [Makefile:41: _all] Error 2
exit status 2
razvand commented 1 year ago

@panjea , this is a known issue happening with kraftkit. There is a fix incoming, Cc: @nderjung , @craciunoiuc . In the meanwhile, I suggest you used the Make-based build: https://github.com/unikraft/app-helloworld-cpp#work-with-the-basic-build--run-toolchain-advanced