unikraft / lib-libcxx

Unikraft port of the C++ standard library
0 stars 10 forks source link

`stddef.h` not found when building with `musl`. #12

Closed StefanJum closed 1 year ago

StefanJum commented 2 years ago

Building with Musl fails on this line, since there is no stddef.h header file located after the libcxx sources in the include paths.

In order to use the stddef.h musl header, a simple solution would be replacing #include_next with a simple #include, but this feels very hacky.

In file included from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/initializer_list:47,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/algorithm:640,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/__string:56,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/string_view:176,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/string:500,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/__locale:15,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/ios:216,
                 from unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/iostream:38,
                 from musl-test/unikraft-musl/apps/cpp/helloworld.cpp:1:
unikraft/musl-test/unikraft-musl/apps/cpp/build/libcxx/origin/libcxx-7.0.0.src/include/cstddef:44:15: fatal error: stddef.h: No such file or directory
   44 | #include_next <stddef.h>
razvand commented 1 year ago

Solved by #18