liblogicalaccess/liblogicalaccess

Compile of v1.85.0 fails

Dirk1980ac opened this issue · 6 comments

On my Linux system (Fedora 27) compile fails with error message as follows:

/home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/src/evp_pkey.cpp: In Elementfunktion »int logicalaccess::openssl::EVPPKey::type() const«:
/home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/src/evp_pkey.cpp:32:46: Fehler: falsche Verwendung des unvollständigen Typs »using element_type = std::remove_extent<evp_pkey_st>::type {aka struct evp_pkey_st}«
return EVP_PKEY_type(d_pkey.get()->type);
^~
In file included from /usr/include/openssl/evp.h:14:0,
from /home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/include/logicalaccess/crypto/evp_pkey.hpp:16,
from /home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/src/evp_pkey.cpp:7:
/usr/include/openssl/ossl_typ.h:93:16: Anmerkung: Vorwärtsdeklaration von »using element_type = std::remove_extent<evp_pkey_st>::type {aka struct evp_pkey_st}«
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
/home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/src/evp_pkey.cpp:32:48: Fehler: falsche Verwendung des unvollständigen Typs »using element_type = std::remove_extent<evp_pkey_st>::type {aka struct evp_pkey_st}«
return EVP_PKEY_type(d_pkey.get()->type);
^~~~
In file included from /usr/include/openssl/evp.h:14:0,
from /home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/include/logicalaccess/crypto/evp_pkey.hpp:16,
from /home/dgottschalk/Projects/liblogicalaccess-1.85.0/plugins/cryptolib/src/evp_pkey.cpp:7:
/usr/include/openssl/ossl_typ.h:93:16: Anmerkung: Vorwärtsdeklaration von »using element_type = std::remove_extent<evp_pkey_st>::type {aka struct evp_pkey_st}«
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
make[2]: *** [plugins/cryptolib/CMakeFiles/logicalaccess-cryptolib.dir/build.make:519: plugins/cryptolib/CMakeFiles/logicalaccess-cryptolib.dir/src/evp_pkey.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:123: plugins/cryptolib/CMakeFiles/logicalaccess-cryptolib.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2

In short: Forward declaration of an incomplete type.

Somebody an idea where this comes from?

Openssl-Libs and boost are installed and working.

Hi @Dirk1980ac ,

What is your version of boost and openssl ?
Try to pull the current master and rebuild. It is enough stable to be used.

I am using
boost 1.64.0
openssl 1.1.0g
both for x86_64 architecture.

I already tried to compile the reopsitories master, but this endet with the same result.

I cannot say if openssl changed something or it is the version of gcc/clang that you are using that do not support this style of struct.

Travis has no problem to build it https://travis-ci.org/islog/liblogicalaccess

I use GCC 7.2.1 and the standarf glibc. Okay, I'll take a deeper look and see if I can find the Problem. Thanks for you advice.

Hi @Dirk1980ac ,

have you been able to find the issue on the build ?

Yes, thank you. I did not find the problem itself, but i did a reinstall of the *-devel packages and now it works. Obviously something was messed up on them.