Closed techdragon closed 9 years ago
Hello,
There's a homebrew package for yubico-piv-tool, no macports as far as I know.
I'd suggest you go with the source package (the tar.gz) from https://developers.yubico.com/yubico-piv-tool/Releases/ instead of compiling current master. The README lists the dependencies that should be necessary, the notable for ocmpiling from git being help2man and gengetopt (version 2.22.6) with this it should compile from source.
/klas
So I've tried the release tar.gz and it has the same issues. gcc, and clang, both die when they try to compile this code.
util.c:203:10: error: use of undeclared identifier 'slot__NULL'
case slot__NULL:
^
I'm not a C programer, and trying to google this is much less than helpful. But from what I can deduce, it appears that my system is not correctly generating cmdline.h
. Something is wrong with how gengetopt is handling things. In the dpkg version of this repo, cmdline.h
looks like this https://github.com/Yubico/yubico-piv-tool-dpkg/blob/master/tool/cmdline.h#L42
But my generated version lacks slot__NULL
, in fact it appears to lack all the __NULL options that appear in the dpkg version of this file.
I can only assume is that something else is wrong with the environment in which I am compiling the code, something that isn't being found by the configure scripts which causes gengetopt to work incorrectly.
Edit:
I've confirmed this is the root cause of the behaviour. I'm able to successfully complete both make
and make --install
when I use the https://github.com/Yubico/yubico-piv-tool-dpkg repo. However I'm still not sure what the issue with gengetopt is. I did notice a minor version number difference, but it seems unusual that being 2 minor revisions behind the version of gengetopt that generated the files in the dpkg repo would be the cause.
Yes, there is this difference between gengetopt 2.22.4 and 2.22.6 though if you download the release tarball from https://developers.yubico.com/yubico-piv-tool/Releases/ (not from github, the github releases are broken) you shouldn't need gengetopt at all.
The prebuilt version on the releases page works, but you provide no install instructions, only compile instructions, and since there are crypto libraries included in the zip, naively overwriting the versions of these files I already have in
/usr/local/include/
/usr/local/lib/
etc, would be extremely foolish.