Compile error: undefined reference to symbol 'krb5_free_context@@krb5_3_MIT' #1

Merged
merged 2 commits into from Jan 30, 2012

Conversation

Projects
None yet
3 participants
Contributor

petRUShka commented Jan 30, 2012

When I try to compile I get an error

objs/ngx_modules.o \
-lpthread -lcrypt -lspnegohelp -lgssapi_krb5 -lpcre -lssl -lcrypto -ldl -lz
/usr/bin/ld: objs/addon/nginx-mod-auth-kerb/ngx_http_auth_sso_module.o: undefined reference to symbol 'krb5_free_context@@krb5_3_MIT'
/usr/bin/ld: note: 'krb5_free_context@@krb5_3_MIT' is defined in DSO /usr/lib/libkrb5.so.3 so try adding it to the linker command line
/usr/lib/libkrb5.so.3: could not read symbols: Invalid operation

I fix this error by getting krb5-config flags.

P.S. By the way I fix README viewing error.

@bringhurst bringhurst added a commit that referenced this pull request Jan 30, 2012

@bringhurst bringhurst Merge pull request #1 from petRUShka/master
Compile error: undefined reference to symbol 'krb5_free_context@@krb5_3_MIT'
188deae

@bringhurst bringhurst merged commit 188deae into bringhurst:master Jan 30, 2012

Owner

bringhurst commented Jan 30, 2012

Sweet. Thanks for the patch!

[quote]

krb5-config --libs gssapi

-Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl
[/quote]
may be replace
CORE_LIBS="$CORE_LIBS -lspnegohelp -lgssapi_krb5 krb5-config --libs gssapi"
to
CORE_LIBS="$CORE_LIBS -lspnegohelp krb5-config --libs gssapi"

Contributor

petRUShka replied Feb 27, 2012

If you have tested this, please make fork and send pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment