[OpenAFS-devel] Jaguar pam compilation

David Botsch dwb7@ccmr.cornell.edu
Thu, 19 Sep 2002 15:33:11 -0400


Well, let me reply to my own email...

the pam_afs.so.1 module seems to work... but we need the kaserver 
module. Haven't gotten this one to compile yet...
  throwing the same options in gives the following error:

+ cc -bundle -flat_namespace -read_only_relocs warning -lpam -lpam_misc 
-o pam_afs.krb.so.1 afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o 
afs_account.o afs_session.o afs_password.o afs_pam_msg.o afs_message.o 
AFS_component_version_number.o 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libkauth.krb.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libprot.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libubik.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libauth.krb.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/librxkad.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libsys.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libdes.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/librx.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/liblwp.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libaudit.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libcmd.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/libcom_err.a 
/Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/util.a -lpam -lpam_misc
ld: Undefined symbols:
_environ
make: *** [pam_afs.krb.so.1] Error 1


any ideas what I need to link in to resolve this symbol?

Thanks!

On 2002.09.19 12:19 David Botsch wrote:
> Out of curiosity, what makes you think it should be a MH_BUNDLE ? Are 
> the stock pam modules compiled as MH_BUNDLE?
> 
> At the moment, with -bundle and either -fno_common, -flat_namespace 
> or neither of these latter two, I get the following error:
> 
> ld: /Users/rootdumb/Desktop/openafs-1.2.7-rc4/lib/liblwp.a(process.o) 
> has local relocation entries in non-writable section (__TEXT,__text)
> make: *** [pam_afs.so.1] Error 1
> 
> now, if I leave it with -flat_namespace and also throw a 
> -read_only_relocs warning, I do get a generated .so file. I'll have 
> to test it now to see if it works.
> 
> On 2002.09.19 11:15 Chaskiel M Grundman wrote:
>> --On Wednesday, September 18, 2002 14:22:00 -0400 David Botsch 
>> <dwb7@ccmr.cornell.edu> wrote:
>> 
>>> (CC) -Xlinker -dylib $(LDFLAGS) -lpam -lpam_misc -o $@ afs_setcred.o
>>> afs_auth. o afs_util.o $(SHOBJS) $(LIBS) ;;
>> 
>> I would think that a pam module would need to be an MH_BUNDLE object 
>> (-Xlinker -bundle), not an MH_DYLIB module like you are doing.
>> 
>> It may also be the case that because you are not telling gcc what 
>> you are doing (by using -Xlinker), it's doing something that is 
>> proper for executables but not for dylibs or bundles. Note that 
>> while they are not listed in the manpage, 10.2's gcc (and I think 
>> even older ones) accept -dynamiclib and -bundle switches directly.
>> 
>> I suspect that you are *still* going to lose after making this 
>> change, since the afs code is not compiled with -fno-common (and 
>> enabling that will probably require lots of changes throughout the 
>> afs source), or -flat_namespace (I don't remember if -flat_namespace 
>> is really required or not. that's the hard part about this)
>> _______________________________________________
>> OpenAFS-devel mailing list
>> OpenAFS-devel@openafs.org
>> https://lists.openafs.org/mailman/listinfo/openafs-devel
> 
>-- 
> ********************************
> David William Botsch
> Consultant/Advisor II
> CCMR Computing Facility
> dwb7@ccmr.cornell.edu
> ********************************
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel

-- 
********************************
David William Botsch
Consultant/Advisor II
CCMR Computing Facility
dwb7@ccmr.cornell.edu
********************************