Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get mod_auth_kerb installed, but I can't seem to find any information on compiling it on OS X. I'm getting the following when I attempt to compile:

./apxs.sh "-I. -Ispnegokrb5 -I/include  " "-dynamic -g -O2 -arch x86_64 -Wl,-search_paths_first -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv  -lresolv" "" "/Applications/XAMPP/xamppfiles/bin/apxs" "-c" "src/mod_auth_kerb.c"
/Applications/XAMPP/xamppfiles/build/libtool --silent --mode=compile gcc -prefer-pic -I/Applications/XAMPP/xamppfiles/include -L/Applications/XAMPP/xamppfiles/lib -mmacosx-version-min=10.4 -arch i386 -arch ppc  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/Applications/XAMPP/xamppfiles/include  -I/Applications/XAMPP/xamppfiles/include   -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -I. -Ispnegokrb5 -I/include  -c -o src/mod_auth_kerb.lo src/mod_auth_kerb.c && touch src/mod_auth_kerb.slo
src/mod_auth_kerb.c: In function ‘authenticate_user_krb5pwd’:
src/mod_auth_kerb.c:1030: warning: passing argument 8 of ‘verify_krb5_user’ discards qualifiers from pointer target type
src/mod_auth_kerb.c: In function ‘authenticate_user_krb5pwd’:
src/mod_auth_kerb.c:1030: warning: passing argument 8 of ‘verify_krb5_user’ discards qualifiers from pointer target type
/Applications/XAMPP/xamppfiles/build/libtool --silent --mode=link gcc -o src/mod_auth_kerb.la -dynamic -g -O2 -arch x86_64 -Wl,-search_paths_first -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -lresolv  -rpath /Applications/XAMPP/xamppfiles/modules -module -avoid-version    src/mod_auth_kerb.lo
ld: warning: in src/.libs/mod_auth_kerb.o, missing required architecture x86_64 in file
warning: no debug symbols in executable (-arch x86_64)

I'm configuring as follows:

./configure --with-krb4=no CFLAGS='-g -O2 -arch x86_64'

I should mention that I'm using XAMPP with the development package on this machine.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Hard to be 100% certain without a little more output, but chances are good that some dependency is not available in 64-bit architecture.

Easiest fix, change your CFLAGS to: -g -O2 -arch i386

that will compile it in 32-bit mode.


Let me improve on this hurried and somewhat incorrect answer.

This problem is caused by a mismatch in the code compilation. Some code is being compiled for 64-bit and some for 32-bit.

I recently ran into this problem with program I was building. I had set the CFLAGS to "-arch i386 -arch ppc" to get 32-bit universal, but I neglected to set the CPPLFAGS. Unfortunately, part of the program was in C and another part was in C++. So I ended up with the same error. Once I set the CPPFLAGS so that all files were compiled as 32-bit the error was resolved.

I see in your output you have some files with -arch i386 and some with -arch x86_64. That's like the source of your problem.

share|improve this answer
    
I added the full compilation output. Hopefully that will be more informative. I attempted to compile in 32-bit as you suggested and I received a similar error. I've seen one thread on this subject that mentioned it's important to specify x86_64. How true that is, I'm not sure as I don't believe the their issue was actually resolved. Is there any way for me to track down what's missing? –  bshacklett Dec 14 '09 at 0:36
    
Now that I look at that output more closely, I notice that the architecture messages are just warnings. While they may be related to the ultimate problem, they're not stopping the compilation. What is the actual error causing compilation to fail? –  Wade Williams Dec 14 '09 at 15:15
    
Interesting... I assumed it was the last line, but you're right, that's just a warning. That's all the output that I got. –  bshacklett Dec 14 '09 at 21:03
    
I just noticed your edit. I'll be taking a look at this shortly. Thank you. –  bshacklett Mar 9 '10 at 20:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.