Skip to content
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

Cannot build develop/7 on Debian stretch (OpenSSL 1.1.0) #663

Open
jakubklimek opened this issue Jun 9, 2017 · 15 comments
Open

Cannot build develop/7 on Debian stretch (OpenSSL 1.1.0) #663

jakubklimek opened this issue Jun 9, 2017 · 15 comments

Comments

@jakubklimek
Copy link

@jakubklimek jakubklimek commented Jun 9, 2017

make[3]: Entering directory '/home/klimek/virtuoso-opensource/libsrc/Wi'
/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../libsrc/Dk    -fno-strict-aliasing -O2  -Wall  -DNDEBUG -DPOINTER_64   -I/home/klimek/virtuoso-opensource/libsrc/Xml.new  -DOPENSSL_NO_KRB5 -Dlinux -D_GNU_SOURCE -DFILE64 -D_LARGEFILE64_SOURCE   -I../../libsrc -I../../libsrc/Dk -I../../libsrc/zlib -I. -I../../libsrc/langfunc -I../../libsrc/plugin -I../../libsrc/Tidy -I../../libsrc/Xml.new -I../../libsrc/odbcsdk/include -DVAD -DDBP -DBIF_XPER -DOPSYS=\"Linux\" -DHOST=\"x86_64-unknown-linux-gnu\" -g -O2 -MT libwi_la-bif_crypto.lo -MD -MP -MF .deps/libwi_la-bif_crypto.Tpo -c -o libwi_la-bif_crypto.lo `test -f 'bif_crypto.c' || echo './'`bif_crypto.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../libsrc/Dk -fno-strict-aliasing -O2 -Wall -DNDEBUG -DPOINTER_64 -I/home/klimek/virtuoso-opensource/libsrc/Xml.new -DOPENSSL_NO_KRB5 -Dlinux -D_GNU_SOURCE -DFILE64 -D_LARGEFILE64_SOURCE -I../../libsrc -I../../libsrc/Dk -I../../libsrc/zlib -I. -I../../libsrc/langfunc -I../../libsrc/plugin -I../../libsrc/Tidy -I../../libsrc/Xml.new -I../../libsrc/odbcsdk/include -DVAD -DDBP -DBIF_XPER -DOPSYS=\"Linux\" -DHOST=\"x86_64-unknown-linux-gnu\" -g -O2 -MT libwi_la-bif_crypto.lo -MD -MP -MF .deps/libwi_la-bif_crypto.Tpo -c bif_crypto.c  -fPIC -DPIC -o .libs/libwi_la-bif_crypto.o
bif_crypto.c: In function ‘box_hmac’:
bif_crypto.c:184:12: error: storage size of ‘ctx’ isn’t known
   HMAC_CTX ctx;
            ^~~
bif_crypto.c:190:3: warning: ‘HMAC_Init’ is deprecated [-Wdeprecated-declarations]
   HMAC_Init (&ctx, key, box_length (key) - DV_STRINGP (key) ? 1 : 0, md);
   ^~~~~~~~~
In file included from /usr/include/openssl/hmac.h:13:0,
                 from /usr/include/openssl/ssl.h:56,
                 from http.h:39,
                 from bif_crypto.c:37:
/usr/include/openssl/hmac.h:28:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
 ^
bif_crypto.c:184:12: warning: unused variable ‘ctx’ [-Wunused-variable]
   HMAC_CTX ctx;
            ^~~
bif_crypto.c: In function ‘asn1_parse_to_xml’:
bif_crypto.c:351:13: warning: implicit declaration of function ‘d2i_ASN1_BOOLEAN’ [-Wimplicit-function-declaration]
        ii = d2i_ASN1_BOOLEAN (NULL, (const unsigned char **)&opp, len + hl);
             ^~~~~~~~~~~~~~~~
bif_crypto.c:418:5: warning: implicit declaration of function ‘M_ASN1_OCTET_STRING_free’ [-Wimplicit-function-declaration]
     M_ASN1_OCTET_STRING_free (os);
     ^~~~~~~~~~~~~~~~~~~~~~~~
bif_crypto.c:451:8: warning: implicit declaration of function ‘M_ASN1_INTEGER_free’ [-Wimplicit-function-declaration]
        M_ASN1_INTEGER_free (bs);
        ^~~~~~~~~~~~~~~~~~~
bif_crypto.c:482:8: warning: implicit declaration of function ‘M_ASN1_ENUMERATED_free’ [-Wimplicit-function-declaration]
        M_ASN1_ENUMERATED_free (bs);
        ^~~~~~~~~~~~~~~~~~~~~~
bif_crypto.c: In function ‘bio_to_strses’:
bif_crypto.c:726:33: error: dereferencing pointer to incomplete type ‘BIO {aka struct bio_st}’
   to_free = ((BUF_MEM *) out_bio->ptr)->data;
                                 ^~
bif_crypto.c: In function ‘bif_smime_sign’:
bif_crypto.c:927:21: error: dereferencing pointer to incomplete type ‘X509_STORE {aka struct x509_store_st}’
   if (store && store->objs)
                     ^~
bif_crypto.c:932:11: error: dereferencing pointer to incomplete type ‘X509_OBJECT {aka struct x509_object_st}’
    if (obj->type == X509_LU_X509)
           ^~
bif_crypto.c: In function ‘x509_certificate_verify_cb’:
bif_crypto.c:1184:18: error: dereferencing pointer to incomplete type ‘X509_STORE_CTX {aka struct x509_store_ctx_st}’
       switch (ctx->error)
                  ^~
bif_crypto.c: In function ‘BN_box’:
bif_crypto.c:1317:37: error: dereferencing pointer to incomplete type ‘BIGNUM {aka struct bignum_st}’
     buf = box_num ((unsigned long) x->d[0]);
                                     ^~
bif_crypto.c: In function ‘bif_get_certificate_info’:
bif_crypto.c:1501:41: error: dereferencing pointer to incomplete type ‘X509 {aka struct x509_st}’
  STACK_OF (X509_EXTENSION) * exts = cert->cert_info->extensions;
                                         ^~
bif_crypto.c:1513:5: warning: implicit declaration of function ‘M_ASN1_OCTET_STRING_print’ [-Wimplicit-function-declaration]
     M_ASN1_OCTET_STRING_print (mem, ex->value);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
bif_crypto.c:1513:39: error: dereferencing pointer to incomplete type ‘X509_EXTENSION {aka struct X509_extension_st}’
     M_ASN1_OCTET_STRING_print (mem, ex->value);
                                       ^~
bif_crypto.c:1540:11: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
      if (k->type == EVP_PKEY_RSA)
           ^~
bif_crypto.c:1543:65: error: dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’
   ret = list (3, box_dv_short_string ("RSAPublicKey"), BN_box (x->e), BN_box (x->n));
                                                                 ^~
bif_crypto.c:1551:65: error: dereferencing pointer to incomplete type ‘DSA {aka struct dsa_st}’
   ret = list (2, box_dv_short_string ("DSAPublicKey"), BN_box (x->pub_key));
                                                                 ^~
bif_crypto.c:1570:61: error: dereferencing pointer to incomplete type ‘X509_NAME {aka struct X509_name_st}’
  for (i = 0; NULL != subj && i < sk_X509_NAME_ENTRY_num(subj->entries); i++)
                                                             ^~
bif_crypto.c:1573:25: error: dereferencing pointer to incomplete type ‘X509_NAME_ENTRY {aka struct X509_name_entry_st}’
      n = OBJ_obj2nid (ne->object);
                         ^~
bif_crypto.c: In function ‘bif_base36dec’:
bif_crypto.c:1819:16: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
   boxint str = bif_string_arg (qst, args, 0, "base36dec");
                ^~~~~~~~~~~~~~
bif_crypto.c:1821:17: warning: passing argument 1 of ‘strtoul’ makes pointer from integer without a cast [-Wint-conversion]
   ret = strtoul(str, NULL, 36);
                 ^~~
In file included from ../../libsrc/odbcsdk/include/iodbcunix.h:79:0,
                 from ../../libsrc/odbcsdk/include/sql.h:87,
                 from odbcinc.h:72,
                 from sqlnode.h:31,
                 from bif_crypto.c:28:
/usr/include/stdlib.h:148:26: note: expected ‘const char * restrict’ but argument is of type ‘boxint {aka long long int}’
 extern unsigned long int strtoul (const char *__restrict __nptr,
                          ^~~~~~~
Makefile:1301: recipe for target 'libwi_la-bif_crypto.lo' failed
make[3]: *** [libwi_la-bif_crypto.lo] Error 1
make[3]: Leaving directory '/home/klimek/virtuoso-opensource/libsrc/Wi'
Makefile:2969: recipe for target 'install' failed
make[2]: *** [install] Error 2
@jakubklimek jakubklimek changed the title Cannot build develop/7 on Debian stretch Cannot build develop/7 on Debian stretch (OpenSSL 1.1.0) Jun 9, 2017
@jakubklimek

This comment has been minimized.

Copy link
Author

@jakubklimek jakubklimek commented Jun 19, 2017

Related to #627

@wouterbeek

This comment has been minimized.

Copy link

@wouterbeek wouterbeek commented Jul 13, 2017

I have this issue as well. I'm on Fedora 26 with OpenSSL 1.1.0f.

@jose1711

This comment has been minimized.

Copy link

@jose1711 jose1711 commented Aug 19, 2017

arch linux is also affected

@idimopoulos

This comment has been minimized.

Copy link

@idimopoulos idimopoulos commented Sep 1, 2017

Newly installed ubuntu 16.04 is also affected.

@roland-c

This comment has been minimized.

Copy link

@roland-c roland-c commented Jan 8, 2018

Same here on Ubuntu 16.04. Is there any resolution on a workaround?

@idimopoulos

This comment has been minimized.

Copy link

@idimopoulos idimopoulos commented Jan 8, 2018

Disclaimer: I don't know if it will work for you and honestly, I don't remember if it happened that way exactly.
For ubuntu I had a workaround but I do not know if it still works. When I installed Ubuntu half a year ago, I checked the openssl package that came with the OS and it was still 1.0.2. It only upgraded to 1.1.0 when I enabled the ppa:ondrej/php repo. I think that if you remove that repo and clean the openssl, it will install the 1.0.2. In other cases, simply specify the version to install but I think it will have conflicts.
In conclusion, I built virtuoso before doing any upgrade in the system and it worked (because it was a new Ubuntu, I could reinstall it)

@roland-c

This comment has been minimized.

Copy link

@roland-c roland-c commented Jan 9, 2018

Thanks man, that worked!
I removed the repo, removed openssl and reinstalled from the original Ubuntu repo. Now VOS compiled without any problem.

@jakubklimek

This comment has been minimized.

Copy link
Author

@jakubklimek jakubklimek commented Apr 4, 2018

@HughWilliams any news on supporting OpenSSL 1.1.0? Due to this issue we have been unable to update Virtuoso for 10 months already (unless running a VM with an older OS release)

@HughWilliams

This comment has been minimized.

Copy link
Collaborator

@HughWilliams HughWilliams commented Apr 6, 2018

@jakubklimek: A fix to support OpenSSL 1.1 is planned for the next Virtuoso Open Source release which is currently being prepared. In the meantime, are you not able to install the OpenSSL 1.0.x dev tools on your current system, as they are only required for the compilation?

@jakubklimek

This comment has been minimized.

Copy link
Author

@jakubklimek jakubklimek commented Apr 23, 2018

@HughWilliams You are right, somehow, I did not realize that a simple sudo apt-get install libssl1.0-dev would fix the issue 🤦‍♂️

@bilalelhoudaigui

This comment has been minimized.

Copy link

@bilalelhoudaigui bilalelhoudaigui commented Aug 9, 2018

I have the same issue, I'm running Fedora 28, I installed openssl-devel but it didn't work.

@TallTed

This comment has been minimized.

Copy link
Collaborator

@TallTed TallTed commented Aug 9, 2018

@bilalelhoudaigui -

Note that installing openssl-devel currently gets you the openssl 1.1 dev tools.

You need the openssl 1.0 dev tools. I believe you will find success if you do this before building Virtuoso —

sudo dnf install compat-openssl10-devel --allowerasing

If you then need to build other things that require openssl 1.1, do this after building Virtuoso —

sudo dnf install openssl-devel --allowerasing

Please let us know if this works for you.

@TallTed

This comment has been minimized.

Copy link
Collaborator

@TallTed TallTed commented Aug 13, 2018

As @bilalelhoudaigui noted in #730, my earlier suggestion resolved their build issue with OpenSSL.

@sven-h

This comment has been minimized.

Copy link

@sven-h sven-h commented Dec 3, 2018

I created a script which builds a custom version of openssl
and uses it for virtuoso installation(script as a gist file).
This also works when you are not root (everything in user/home folder).

@TallTed

This comment has been minimized.

Copy link
Collaborator

@TallTed TallTed commented Jun 6, 2019

For what it's worth, on (closed duplicate) issue #744, @AdrielFreud said --

the error is caused by a memory failure or static allocation, you should try a dynamic allocation using some variants that the OPENSSL library offers.

-- and suggested --

EVP_CIPHER_CTX *ctx;
ctx = EVP_CIPHER_CTX_new();
if(ctx == NULL){EVP_MD_CTX_free(ctx);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.