unikraft / app-helloworld-cpp

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

helloworld-cpp failed to build (qemu/arm64) #23

Open valudimi opened 1 year ago

valudimi commented 1 year ago

EDIT: It was on my end. A simple sudo apt install g++-aarch64-linux-gnu fixed it. Might be worth mentioning that in the documentation?

Running kraft build --log-level debug --log-type basic, I get the following output:

 W  /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/plat/common/arm/pci_bus_arm64.c: In function ‘arch_pci_probe’:
 W  /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/plat/common/arm/pci_bus_arm64.c:99:12: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 W     99 |         if (ret < 0) {
 W        |            ^
 W  /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/plat/common/arm/pci_bus_arm64.c:72:13: note: ‘ret’ was declared here
 W     72 |         int ret;
 W        |             ^~~
 i    CC      libkvmgic: gic-v3.o
 W  /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/plat/common/pci_ecam.c: In function ‘gen_pci_irq_parse’:
 W  /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/plat/common/pci_ecam.c:236:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
 W    236 |         memset((void *)dummy_imask, cpu_to_fdt32(~0), ARRAY_SIZE(dummy_imask));
 W        |         ^~~~~~
 i    CC      libkvmpl031: pl031.o
 i    CC      libkvmpl031: rtc.o
 i    CXX     apphelloworldcpp: helloworld.o
 i    CC      libfdt: fdt.o
 W  aarch64-linux-gnu-gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
 W  compilation terminated.
 i    CC      libfdt: fdt_addresses.o
 W  make[2]: *** [/home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/unikraft/support/build/Makefile.build:27: /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp2/.unikraft/build/apphelloworldcpp/helloworld.o] Error 1
 W  make[2]: *** Waiting for unfinished jobs....
 W  make[1]: *** [Makefile:1134: sub-make] Error 2
 W  make: *** [Makefile:41: _all] Error 2
 E  build failed: exit status 2
valudimi commented 1 year ago

The error also happens when attempting to build through script.

  CXX     apphelloworldcpp: helloworld.o
aarch64-linux-gnu-gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
compilation terminated.
  AS      apphelloworldcpp: libinfo.libuklibid.o
make[3]: *** [/home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp/workdir/unikraft/support/build/Makefile.build:27: /home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp/workdir/build/apphelloworldcpp/helloworl1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1156: sub-make] Error 2
make[1]: *** [Makefile:41: _all] Error 2
make[1]: Leaving directory '/home/bob/Unikraft/hacktoberfest-2023/helloworld-cpp/workdir/unikraft'
make: *** [Makefile:7: all] Error 2