site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 16, 2008, at 11:26 AM, Justin C. Walker wrote: On Dec 15, 2008, at 01:25 , Macarov Anatoli wrote: This isn't exactly accurate. To refine this a bit for the archives: -Dave _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... How to compile a PAM module? Where to download libpam-dev or files pam_appl.h, libpam.so? I'd like to get PAM module from yubico-pam.c, here what I'm guided by:http://code.google.com/p/yubico-pam/wiki/ReadMe. This is error when compiling: "configure: error: PAM header files not found, install libpam-dev" I'd look on the darwin website. All the available source for the "open source" part of Mac OS X should be there. As for where to find header files, the first place I'd look is "/usr/include". Also, FWIW, shared libraries are typically (but not always) tagged with a ".dylib" extension on Mac OS X, not ".so". Libraries linked to by an executable (e.g. the .dylib file was given to the static linker (ld) command-line when building the executable) are loaded and resolved by the dyld dynamic linker and have the extension .dylib and the Mach-O file type MH_DYLIB. "Shared Objects" that the app loads itself have the Mach-O file type MH_BUNDLE and carry almost any extension. These bundles have a slightly different format from a .dylib. Do not confuse MH_DYLIB with MH_BUNDLE as there is a distinction on OS X. For building a PAM module you want to build MH_BUNDLE. Typically the extension is dictated by the application or library that will be loading the bundle. Often times the .so extension is used when the loading program or library originated on an ELF system. For example PAM uses /usr/lib/pam/*.so, SASL2 uses /usr/lib/sasl2/*.so, and Apache uses /usr/libexec/apache2/mod_*.so. Notably PAM itself is /usr/lib/libpam.1.dylib which is something that an app using PAM directly could link against (e.g. -lpam). But the modules that the PAM library loads are MH_BUNDLE files with the .so extension. If you are used to ELF semantics, these are a little different in that you have to be explicit at link time whether you are bundling a bundle or a dylib. You can examine more about these files using otool. In particular try it with -hv to display the header, -lv to display the load commands, and -Lv to display the libraries loaded (you can get this from the LC_LOAD_DYLIB load commands but -Lv shows it to you in an easier to read format). This email sent to site_archiver@lists.apple.com
participants (1)
-
David Elliott