Problem building/compiling in 12.04 (also in 11.10) with gssapi

2011-11-11 Thread Janåke Rönnblom
Hi

Im trying to compile a package called squid_auth_kerb in 12.04. I also tested 
it in 11.10 with the same result. It works in 10.04 without problems.

aptitude install build-essential libgss-dev libkrb5-dev libssl-dev libldap-dev 
libsasl2-dev krb5-user
cd /usr/local/src
wget 
http://downloads.sourceforge.net/project/squidkerbauth/squidkerbauth/squid_kerb_auth-1.0.7/squid_kerb_auth-1.0.7.tar.gz
tar -xzvf squid_kerb_auth-1.0.7.tar.gz
cd squid_kerb_auth-1.0.7/
./configure

- configure complains about missing spnego support in = 11.10 and works in 
10.04 !!!

make

dies with:
b5 -lk5crypto -lcom_err -L../../../lib -o squid_kerb_auth squid_kerb_auth.o 
base64.o derparse.o spnego.o spnegohelp.o spnegoparse.o  
squid_kerb_auth.o: In function `check_gss_err':
/usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:180: undefined reference 
to `gss_release_buffer'
/usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:170: undefined reference 
to `gss_display_status'
/usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:177: undefined reference 
to `gss_release_buffer'
...

Works with 10.04

If I try to compile squid_auth_ldap in 12.04 it also gives me a problem (works 
in 10.04)

wget 
http://downloads.sourceforge.net/project/squidkerbauth/squidkerbldap/squid_kerb_ldap-1.2.2/squid_kerb_ldap-1.2.2.tar.gz
tar -xzvf squid_kerb_ldap-1.2.2.tar.gz 
cd squid_kerb_ldap-1.2.2/
./configure 

missing-prototypes -Wmissing-declarations -Wdeclaration-after-statement 
-Wshadow  -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -lgssapi_krb5 
-lkrb5 -lk5crypto -lcom_err -o squid_kerb_ldap squid_kerb_ldap.o 
support_group.o support_netbios.o support_member.o support_krb5.o 
support_ldap.o support_sasl.o support_resolv.o support_lserver.o  -lldap -llber 
/usr/bin/ld: support_krb5.o: undefined reference to symbol 
'krb5_kt_free_entry@@krb5_3_MIT'
/usr/bin/ld: note: 'krb5_kt_free_entry@@krb5_3_MIT' is defined in DSO 
/usr/lib/x86_64-linux-gnu/libkrb5.so so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/libkrb5.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

I can get a bit further by manually editing the Makefile after the configure. 
But not all the way.

So anyone have an idea what changed and how do I fix it? Is the source broken 
with 11.10 or is 11.10+ broken?

-J

-
Janåke Rönnblom
mobile: +46-70-3970743
web: http://www.ronnblom.se
-
Those who do not understand Unix are condemned to reinvent it poorly. -- 
Henry Spencer




-- 
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam


Re: Problem building/compiling in 12.04 (also in 11.10) with gssapi

2011-11-11 Thread Clint Byrum
Excerpts from Janåke Rönnblom's message of Fri Nov 11 05:40:50 -0800 2011:
 Hi
 
 Im trying to compile a package called squid_auth_kerb in 12.04. I also tested 
 it in 11.10 with the same result. It works in 10.04 without problems.
 
 aptitude install build-essential libgss-dev libkrb5-dev libssl-dev 
 libldap-dev libsasl2-dev krb5-user
 cd /usr/local/src
 wget 
 http://downloads.sourceforge.net/project/squidkerbauth/squidkerbauth/squid_kerb_auth-1.0.7/squid_kerb_auth-1.0.7.tar.gz
 tar -xzvf squid_kerb_auth-1.0.7.tar.gz
 cd squid_kerb_auth-1.0.7/
 ./configure
 
 - configure complains about missing spnego support in = 11.10 and works in 
 10.04 !!!
 
 make
 
 dies with:
 b5 -lk5crypto -lcom_err -L../../../lib -o squid_kerb_auth squid_kerb_auth.o 
 base64.o derparse.o spnego.o spnegohelp.o spnegoparse.o  
 squid_kerb_auth.o: In function `check_gss_err':
 /usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:180: undefined 
 reference to `gss_release_buffer'
 /usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:170: undefined 
 reference to `gss_display_status'
 /usr/local/src/squid_kerb_auth-1.0.7/squid_kerb_auth.c:177: undefined 
 reference to `gss_release_buffer'
 ...
 
 Works with 10.04
 
 If I try to compile squid_auth_ldap in 12.04 it also gives me a problem 
 (works in 10.04)
 
 wget 
 http://downloads.sourceforge.net/project/squidkerbauth/squidkerbldap/squid_kerb_ldap-1.2.2/squid_kerb_ldap-1.2.2.tar.gz
 tar -xzvf squid_kerb_ldap-1.2.2.tar.gz 
 cd squid_kerb_ldap-1.2.2/
 ./configure 
 
 missing-prototypes -Wmissing-declarations -Wdeclaration-after-statement 
 -Wshadow  -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -lgssapi_krb5 
 -lkrb5 -lk5crypto -lcom_err -o squid_kerb_ldap squid_kerb_ldap.o 
 support_group.o support_netbios.o support_member.o support_krb5.o 
 support_ldap.o support_sasl.o support_resolv.o support_lserver.o  -lldap 
 -llber 
 /usr/bin/ld: support_krb5.o: undefined reference to symbol 
 'krb5_kt_free_entry@@krb5_3_MIT'
 /usr/bin/ld: note: 'krb5_kt_free_entry@@krb5_3_MIT' is defined in DSO 
 /usr/lib/x86_64-linux-gnu/libkrb5.so so try adding it to the linker command 
 line
 /usr/lib/x86_64-linux-gnu/libkrb5.so: could not read symbols: Invalid 
 operation
 collect2: ld returned 1 exit status
 
 I can get a bit further by manually editing the Makefile after the configure. 
 But not all the way.
 
 So anyone have an idea what changed and how do I fix it? Is the source broken 
 with 11.10 or is 11.10+ broken?
 

This is happening as a result of the --as-needed linker change in 11.10.

Add '--no-as-needed' to LDFLAGS and it should build fine. Long term you
should report this to the upstream project as they are linking to libldap
incorrectly by putting it in LDFLAGS instead of in LIBS, which is why
it is listed after the object files in the ld command line above. You
did not post the full ld line for the krb5 linking, but it seems likely
that it also suffers from this problem.

-- 
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam