managarm/libarch

meson warning: include sandbox violation

Opened this issue · 3 comments

Executing subproject libarch

libarch| Project name: libarch
libarch| Project version: undefined
libarch| C++ compiler for the host machine: clang++ (clang 10.0.0 "clang version 10.0.0 (https://github.com/llvm/llvm-project c0f0e89fc078179bda84d76bee60634d4cdaf8c5)")
libarch| C++ linker for the host machine: clang++ ld.bfd 2.32
libarch| C++ compiler for the build machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
libarch| C++ linker for the build machine: c++ ld.bfd 2.35.2
libarch| WARNING: include_directories sandbox violation!
The project is trying to access the directory subprojects/managarm/hel/include which belongs to a different
subproject. This is a problem as it hardcodes the relative paths of these two projeccts.
This makes it impossible to compile the project in any other directory layout and also
prevents the subproject from changing its own directory layout.

Instead of poking directly at the internals the subproject should be executed and
it should set a variable that the caller can then use. Something like:

# In subproject
some_dep = declare_dependency(include_directories: include_directories('include'))

# In subproject wrap file
[provide]
some = some_dep

# In parent project
some_dep = dependency('some')
executable(..., dependencies: [some_dep])

This warning will become a hard error in a future Meson release.

libarch| Build targets in project: 2
libarch| Subproject libarch finished.

the error explains it

Shouldn't this error be in https://github.com/managarm/libarch? It doesn't seem to be a libasync error

I promise I can read most of the time.

Yes, this ought to be transferred.

This can be solved by making hel/helix headers a separate package and installing it before libarch