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

merged 2 commits into from Jan 30, 2012


None yet
3 participants

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/ so try adding it to the linker command line
/usr/lib/ 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'

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


bringhurst commented Jan 30, 2012

Sweet. Thanks for the patch!


krb5-config --libs gssapi

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


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