Xcode 10.1: Spurious warning "Missing submodule" when including bsm/audit_kevents.h

Originator:rsfinn
Number:rdar://46873878 Date Originated:2018-12-20
Status:Open Resolved:
Product:Xcode Product Version:10.1 (10B61)
Classification:UI/Usability Reproducible:Always
 
When compiling an Objective-C file that includes or imports the system header file <bsm/audit_kevents.h>, the compiler generates a warning message "Missing submodule 'Darwin.bsm.audit_kevents'" on the line that includes or imports the header. In projects that use the "-Werror" flag, this will prevent the compilation from succeeding, even though the header is included correctly.

Example source file:
✂-----
#import <Foundation/Foundation.h>

#include <bsm/libbsm.h>
#import <bsm/audit_kevents.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        printf("AUE_FORK = %d\n", AUE_FORK);
    }
    return 0;
}
✂-----

This file causes the warning "Missing submodule 'Darwin.bsm.audit_kevents'" for the line "#import <bsm/audit_kevents.h>".

Comments

Workaround: Use "-Wno-incomplete-umbrella"

Of course, it is possible to work around the issue by adding the flag "-Wno-incomplete-umbrella" to the "Other C flags" setting (OTHER_CFLAGS) for the file or project in question.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!