Skip to content

Conversation

@simmel
Copy link
Contributor

@simmel simmel commented Jan 12, 2021

Not sure about the placing or wording.

You can specify it both when you install it via pip but also when you install it from source. What do you think?

I was looking for this docs when I first tried to troubleshoot the macOS 11 issues but I couldn't figure it out. Thanks @jborean93 for mentioning it!

README.txt Outdated
$ export GSSAPI_LINKER_ARGS="$(krb5-config --libs gssapi)"
$ export GSSAPI_COMPILER_ARGS="$(krb5-config --cflags gssapi)"
$ # Too many variants, search for GSSAPI_MAIN_LIB in setup.py
$ export GSSAPI_MAIN_LIB="$PATH_TO/lib/yourkerberoslib.ext"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be PATH_TO/lib/libgssapi.so with a note saying the extension is .dylib on macOS. You might also want to mention that krb5-config selected in PATH should be for the Kerberos library you wish to link against.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other usecases on Windows; mingw, MIT Kerberos for Windows etc. Hence the comment. It became too messy to list them all.

Can the comment be improved somehow and still be brief?

Re: PATH, yes. Or maybe specify hard path e.g. /path/to/you/krb5-config. What's best?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other usecases on Windows; mingw, MIT Kerberos for Windows etc. Hence the comment. It became too messy to list them all.

I can't say I use this with Windows so I can't really speak more, I just think it should be more obvious that the default is libgssapi.so for Linux and libgssapi.dylib for macOS as per

python-gssapi/setup.py

Lines 186 to 192 in a7de108

if opt.startswith('gssapi'):
if os.name == 'nt':
main_lib = '%s.dll' % opt
if winkrb_path:
main_path = os.path.join(winkrb_path, 'bin')
else:
main_lib = 'lib%s.so' % opt
.

Or maybe specify hard path e.g. /path/to/you/krb5-config

You need to make sure it's first in PATH. Your linker and compiler args can use the full path but setup.py calls krb5-config gssapi --prefix so you need to ensure the correct krb5-config is selected there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to make sure it's first in PATH. Your linker and compiler args can use the full path but setup.py calls krb5-config gssapi --prefix so you need to ensure the correct krb5-config is selected there.

I totally missed that! Fixing.

@simmel simmel force-pushed the document_GSSAPI_vars branch from 4b1f423 to 378b8a7 Compare January 13, 2021 09:28
$ export PATH=/path/to/where/krb5-config/is:$PATH
$ export GSSAPI_LINKER_ARGS="$(krb5-config --libs gssapi)"
$ export GSSAPI_COMPILER_ARGS="$(krb5-config --cflags gssapi)"
$ export GSSAPI_MAIN_LIB="/path/to/where/libgss{{api,-3}.dll,api.{so,dylib}}/is"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't say I use this with Windows so I can't really speak more, I just think it should be more obvious that the default is libgssapi.so for Linux and libgssapi.dylib for macOS as per

I really don't think this is clearer @jborean93

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main comment was to do document libgssapi.so and just add a comment saying this could be .dylib or something else on other platforms.

@frozencemetery
Copy link
Member

In most cases, the issue is simply locating krb5-config, which will produce the right compiler/linker flags for us. Setting the compile/link/library flags manually shouldn't be required (outside of porting work). If that's not the behavior, we should fix it :)

I think we should reflect that in any install instructions: that mostly one just sets PATH, and mention that the other env vars exist. (It might be clearest not to even give usage examples for them, since it's potentially confusing.)

@simmel
Copy link
Contributor Author

simmel commented Jan 21, 2021 via email

@simmel
Copy link
Contributor Author

simmel commented Jun 16, 2021

stale bot is nice (for people like me who are forgetful ; )

@simmel
Copy link
Contributor Author

simmel commented Jun 16, 2021

@jborean93 is my force push available in this PR or do I need to open a new one since stalebot closed it?

While helping a co-worker getting python-gssapi to build on his Mac we tried to only use GSSAPI_COMPILER_ARGS and GSSAPI_LINKER_ARGS and that works.

@jborean93
Copy link
Contributor

I’m not sure sorry, that’s a question for @frozencemetery

@frozencemetery
Copy link
Member

is my force push available in this PR or do I need to open a new one since stalebot closed it?

I can't reopen it (the button is greyed out) - it looks like you might've force-pushed already? If you're not able to reopen either, I think a new PR would be in order.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants