-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added /usr/local/include/ykpiv to CGO include path for Linux #18
base: master
Are you sure you want to change the base?
Conversation
This makes it possible to build the latest version of [yubico-piv-tool](https://developers.yubico.com/yubico-piv-tool/) and install it to `/usr/local`. Without this change to the CGO parameters, the headers wouldn't be found in `/usr/local/include/ykpiv`. It's still necessary to ensure `/usr/local/lib` is mentioned in `/etc/ld.so.conf` for the linker to find the library.
By the way, an alternative approach would be, instead of adding This would certainly work on Linux, but I don't know the implications for Windows. |
Switching to Maybe we can test on a Windows box - iirc the SDK is dropped in the CWD and you build linking against those. Windows currently uses I like that idea much more, any chance we could rework this patch to do that? I'd absolutely merge something doing that. It's also more semantically correct. |
I can definitely rework the patch to do that, no problem :) |
You rock, thank you! |
https://packages.debian.org/sid/libykpiv-dev comes with |
@tianon amazing idea if so! |
|
Yeah I think tianon's right here 👍👍 |
On Ubuntu Linux (and derivatives, like the Mint Linux I'm using) the bundled version of yubico-piv-tool is 1.4.2, and is incompatible with this Go library (also see #16).
This PR makes it possible to build the latest version of yubico-piv-tool and install it to
/usr/local
. Without this change to the CGO parameters, the headers wouldn't be found in/usr/local/include/ykpiv
.It's still necessary to ensure
/usr/local/lib
is mentioned in/etc/ld.so.conf
for the linker to find the library.