Closed naimulhq closed 2 years ago
We are planning a release, if you could confirm if https://github.com/Yubico/yubihsm-shell/pull/238 fixes this it will be in that release.
@qpernil That did fix the issue. There was also a bunch of errors saying -Werror=missing-field-initializers so I made a PR to fix that. #239
When running make again, I had an error saying that it could not find #include
[root@testenvironment build]# make
[ 0%] Building C object lib/CMakeFiles/yubihsm.dir/__/aes_cmac/aes.c.o
[ 1%] Building C object lib/CMakeFiles/yubihsm.dir/__/aes_cmac/aes_cmac.c.o
[ 2%] Building C object lib/CMakeFiles/yubihsm.dir/__/common/hash.c.o
[ 2%] Building C object lib/CMakeFiles/yubihsm.dir/__/common/pkcs5.c.o
[ 3%] Building C object lib/CMakeFiles/yubihsm.dir/__/common/rand.c.o
[ 4%] Building C object lib/CMakeFiles/yubihsm.dir/__/common/ecdh.c.o
[ 4%] Building C object lib/CMakeFiles/yubihsm.dir/__/common/openssl-compat.c.o
[ 5%] Building C object lib/CMakeFiles/yubihsm.dir/error.c.o
[ 6%] Building C object lib/CMakeFiles/yubihsm.dir/lib_util.c.o
[ 6%] Building C object lib/CMakeFiles/yubihsm.dir/yubihsm.c.o
[ 7%] Linking C shared library libyubihsm.so
[ 7%] Built target yubihsm
[ 7%] Building C object lib/CMakeFiles/yubihsm_usb.dir/yubihsm_usb.c.o
[ 8%] Building C object lib/CMakeFiles/yubihsm_usb.dir/yubihsm_libusb.c.o
[ 9%] Building C object lib/CMakeFiles/yubihsm_usb.dir/lib_util.c.o
[ 10%] Linking C shared library libyubihsm_usb.so
[ 10%] Built target yubihsm_usb
[ 11%] Building C object lib/CMakeFiles/yubihsm_http.dir/yubihsm_curl.c.o
[ 12%] Building C object lib/CMakeFiles/yubihsm_http.dir/lib_util.c.o
[ 12%] Linking C shared library libyubihsm_http.so
[ 12%] Built target yubihsm_http
[ 13%] Building C object lib/tests/CMakeFiles/test_parsing.dir/test_parsing.c.o
[ 14%] Linking C executable test_parsing
[ 14%] Built target test_parsing
[ 14%] Building C object lib/tests/CMakeFiles/test_pbkdf2.dir/test_pbkdf2.c.o
[ 15%] Building C object lib/tests/CMakeFiles/test_pbkdf2.dir/__/__/common/pkcs5.c.o
[ 16%] Building C object lib/tests/CMakeFiles/test_pbkdf2.dir/__/__/common/hash.c.o
[ 17%] Linking C executable test_pbkdf2
[ 17%] Built target test_pbkdf2
[ 17%] Building C object lib/tests/CMakeFiles/test_usb_url.dir/test_usb_url.c.o
[ 18%] Building C object lib/tests/CMakeFiles/test_usb_url.dir/__/lib_util.c.o
[ 19%] Linking C executable test_usb_url
[ 19%] Built target test_usb_url
[ 19%] Building C object lib/tests/CMakeFiles/test_util.dir/test_util.c.o
[ 20%] Building C object lib/tests/CMakeFiles/test_util.dir/__/lib_util.c.o
[ 21%] Linking C executable test_util
[ 21%] Built target test_util
[ 22%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/__/common/hash.c.o
[ 22%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/__/common/util.c.o
[ 23%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/__/common/parsing.c.o
[ 24%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/__/common/openssl-compat.c.o
[ 24%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/util_pkcs11.c.o
[ 25%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/yubihsm_pkcs11.c.o
[ 26%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/list.c.o
[ 26%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/debug_p11.c.o
[ 27%] Building C object pkcs11/CMakeFiles/yubihsm_pkcs11.dir/cmdline.c.o
[ 28%] Linking C shared library yubihsm_pkcs11.so
[ 29%] Built target yubihsm_pkcs11
[ 29%] Building C object pkcs11/tests/CMakeFiles/ecdh_derive_test.dir/ecdh_derive_test.c.o
[ 30%] Building C object pkcs11/tests/CMakeFiles/ecdh_derive_test.dir/common.c.o
[ 31%] Linking C executable ecdh_derive_test
[ 31%] Built target ecdh_derive_test
[ 32%] Building C object ykhsmauth/CMakeFiles/ykhsmauth.dir/error.c.o
[ 33%] Building C object ykhsmauth/CMakeFiles/ykhsmauth.dir/ykhsmauth.c.o
[ 33%] Linking C shared library libykhsmauth.so
[ 33%] Built target ykhsmauth
[ 34%] Building C object ykhsmauth/CMakeFiles/ykhsmauth_static.dir/error.c.o
[ 35%] Building C object ykhsmauth/CMakeFiles/ykhsmauth_static.dir/ykhsmauth.c.o
[ 35%] Linking C static library libykhsmauth.a
[ 35%] Built target ykhsmauth_static
[ 35%] Building C object yubihsm-auth/CMakeFiles/yubihsm-auth.dir/main.c.o
[ 36%] Building C object yubihsm-auth/CMakeFiles/yubihsm-auth.dir/__/common/parsing.c.o
[ 37%] Building C object yubihsm-auth/CMakeFiles/yubihsm-auth.dir/__/common/pkcs5.c.o
[ 37%] Building C object yubihsm-auth/CMakeFiles/yubihsm-auth.dir/__/common/hash.c.o
[ 38%] Building C object yubihsm-auth/CMakeFiles/yubihsm-auth.dir/cmdline.c.o
[ 39%] Linking C executable yubihsm-auth
[ 40%] Built target yubihsm-auth
[ 41%] Building manpage for yubihsm-auth
[ 41%] Built target yubihsm-auth-man
[ 42%] Building C object src/CMakeFiles/yubihsm-shell.dir/commands.c.o
[ 43%] Building C object src/CMakeFiles/yubihsm-shell.dir/main.c.o
In file included from /usr/include/readline/keymaps.h:35:0,
from /usr/include/editline/readline.h:37,
from /home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:64:
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c: In function ‘tokenize’:
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:933:17: error: expected identifier before '\x20'
enum states { SPACE, WORD, QUOTE } state = SPACE;
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:966:19: error: ‘QUOTE’ undeclared (first use in this function)
state = QUOTE;
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:966:19: note: each undeclared identifier is reported only once for each function it appears in
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:971:19: error: ‘WORD’ undeclared (first use in this function)
state = WORD;
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c: In function ‘complete_arg’:
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:1005:18: error: storage size of ‘w’ isn’t known
struct winsize w;
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:1007:3: error: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration]
ioctl(fileno(stdout), TIOCGWINSZ, &w);
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c:1007:25: error: ‘TIOCGWINSZ’ undeclared (first use in this function)
ioctl(fileno(stdout), TIOCGWINSZ, &w);
^
/home/lucidadmin/Downloads/yubihsm-shell-master/src/main.c: At top level:
cc1: error: unrecognized command line option "-Wno-implicit-fallthrough" [-Werror]
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/yubihsm-shell.dir/main.c.o] Error 1
make[1]: *** [src/CMakeFiles/yubihsm-shell.dir/all] Error 2
make: *** [all] Error 2
I was able to get it to build by adding additional flags in CMakeLists.txt and making some changes to src/main.c
Would you care to share those changes ? If not the changes then at least a short description what you had to change. For my understanding of the situation.
Yes I will share those changes and put a link on it here
Here is the link to the PR #241 . The PR discusses the changes that were made and why they were made. There was only one minor change to the source code and CMakeLists.txt. Other than that, the rest of the changes were a result of missing header files or .pc files that did not come with the installation of the -devel packages.
This issue will be closed for lack of activity soon.
Closing this for lack of activity. Some issues reported were fixed.
I have been trying to build yubihsm-shell on RedHat 7.9 but have been unsuccessful. When I run make, I get a bunch of errors about missing braces. I would run make -i to ignore the errors but it would end up failing afterwards when I run make install. Here are the output that I get from running the commands specified on the README.