Headers not found issue when I am building a open source PAM module

I am trying to learn how PAM works in macOS, in that process I came across one of the apple open source project in git hub. So I downloaded the project and opened it in xcode. When I tried to build the project initially I got base SDK error. I resolved that by changing the value to macOS(initially the value for base SDK is macosx.internal). After that most of the dependency error are resolved but now I am getting some of the header files are not found and also some of '.a' files are also missing. I have explored over the internet for those files but unable to get those.

I have attached the missing header files and '.a' files below. Can you please help me in build this project.

GitHub link: [https://github.com/apple-oss-distributions/pam_modules/tree/pam_modules-195)

Header files:

     #include <Security/SecKeychainPriv.h>
     #include <OpenDirectory/OpenDirectoryPriv.h>
     #include <Heimdal/krb5.h>

This is, sadly, expected. Lots of Darwin projects depend on stuff from the internal SDK and thus can’t be built out of the box. You have a couple of options:

  • Explore the source without building it. This is what I usually do.

  • Modify the source to fix those dependencies. This can get very tricky very fast. Some of the the internal components are in Darwin, so you can grab the necessary bits from there. But some are not, so you have to tweak the source to break the dependency.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Headers not found issue when I am building a open source PAM module
 
 
Q