unikraft / app-helloworld-cpp

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

Build fails when using Clang on QEMU + AArch64 #18

Open razvand opened 1 year ago

razvand commented 1 year ago

When building app-helloworld-cpp with Clang for QEMU and AArch64, it fails:

/home/unikraft/razvand/tmp/helloworld-cpp/build/libcxx/origin/libcxx-14.0.6.src/include/locale:821:12: error: use of undeclared identifier 'strtof_l'
    return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
           ^
/home/unikraft/razvand/tmp/helloworld-cpp/build/libcxx/origin/libcxx-14.0.6.src/include/locale:827:12: error: use of undeclared identifier 'strtod_l'
    return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
           ^
/home/unikraft/razvand/tmp/helloworld-cpp/build/libcxx/origin/libcxx-14.0.6.src/include/locale:833:12: error: use of undeclared identifier 'strtold_l'
In file included from /home/unikraft/razvand/tmp/helloworld-cpp/build/libsyscall_shim/uk_syscall6.c:    return strtold_l(__a, __p2, _LIBCPP_GET_C_LOCALE);

To reproduce, make sure you have Clang>=10 installed and run the following commands:

git clone https://github.com/unikraft/app-helloworld-cpp helloworld-cpp
cd helloworld-cpp/
git clone https://github.com/unikraft/unikraft .unikraft/unikraft
git clone https://github.com/unikraft/lib-libcxxabi .unikraft/libs/libcxxabi
git clone https://github.com/unikraft/lib-libcxx .unikraft/libs/libcxx
git clone https://github.com/unikraft/lib-compiler-rt .unikraft/libs/compiler-rt
git clone https://github.com/unikraft/lib-libunwind .unikraft/libs/libunwind
git clone https://github.com/unikraft/lib-musl .unikraft/libs/musl
UK_DEFCONFIG=$(pwd)/.config.helloworld-cpp-qemu-aarch64 make defconfig
make CC=clang -j $(nproc)