Hello,

I am compiling the SELINUX userspace tools (https://github.com/SELinuxProject/selinux) and I encountered this error.

load_policy.c:15:25: fatal error: sepol/sepol.h: No such file or directory
compilation terminated.

The sub-package libselinux depends on libsepol, but by default the PTXDist rule file does not run makefile sections in sequential order, i.e. it executes the compile section for all sub-packages first, followed by install section. This results in the required libsepol dependencies to not be found when libselinux needs it, and thus the above error.

Is there any way to accomplish this without splitting the sub-packages into separate rule files? I am thinking of calling something like this:

@$(call compile, libsepol)
@$(call install, libsepol)
@$(call compile, libselinux)
@$(call install, libselinux)

but I am unsure if that is possible, or what the correct syntax is. Kindly advise. Thanks.


Regards,
You Wen