superset icon indicating copy to clipboard operation
superset copied to clipboard

Building openssl fails while installing superset on Ubuntu 16.04

Open sachinoze opened this issue 8 years ago • 11 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [x] I have reproduced the issue with at least the latest released version of superset
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.24.0 (same issue is reproduced for version 0.23.0, 0.20.0 and 0.19.0) versions of utilities is as follows python 2.7.12 setuptools (39.0.1) pip (10.0.1) virtualenv (15.2.0) build-essential (12.1ubuntu2). libffi-dev (3.2.1-4). libsasl2-dev (2.1.26.dfsg1-14build1). libldap2-dev (2.4.42+dfsg-2ubuntu3.2). python-dev (2.7.12-1~16.04). python-pip (8.1.1-2ubuntu0.4). libssl-dev (1.1.0h-2+ubuntu16.04.1+deb.sury.org+2).

Expected results

superset is installed

Actual results

fails while installing cryptography (1.9)

building '_openssl' extension creating build/temp.linux-x86_64-2.7/build creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o build/temp.linux-x86_64-2.7/_openssl.c:911:6: error: conflicting types for ‘BIO_callback_ctrl’ long BIO_callback_ctrl( ^ In file included from /usr/include/openssl/asn1.h:16:0, from build/temp.linux-x86_64-2.7/_openssl.c:530: /usr/include/openssl/bio.h:551:6: note: previous declaration of ‘BIO_callback_ctrl’ was here long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);

Steps to reproduce

Followed steps mentioned in the installation guide https://superset.incubator.apache.org/installation.html

nohup.txt

sachinoze avatar Apr 24 '18 07:04 sachinoze

I am encountering the same problem. Any solution?

diethardsteiner avatar May 02 '18 10:05 diethardsteiner

Could you please provide the output of "dpkg -l openssl* libssl*" ?

xrmx avatar May 02 '18 10:05 xrmx

Here we go:

$ dpkg -l openssl* libssl*
dpkg-query: no packages found matching openssl*
dpkg-query: no packages found matching libssl*

Ok, let's try this:

$ dnf list openssl* libssl*
Installed Packages
openssl.x86_64                            1:1.1.0h-1.fc27                      @updates
openssl-devel.x86_64                      1:1.1.0h-1.fc27                      @updates
openssl-libs.x86_64                       1:1.1.0h-1.fc27                      @updates

Please let me know if you need any other info. I am running this on Fedora 27.

diethardsteiner avatar May 02 '18 10:05 diethardsteiner

Resolved this issue. Cryptography module compiled when libssl-dev version was changed from 1.1.0h-2+ubuntu16.04.1+deb.sury.org+2 to "1.0.2g-1ubuntu4.12"(official version for 16.04.04)

Installing official version libssl-dev for Fedora 27 might help

sachinoze avatar May 04 '18 06:05 sachinoze

@diethardsteiner On Fedora 27 you need to install compat-openssl10-devel.

hit0ri avatar May 10 '18 13:05 hit0ri

@hit0ri Thanks a lot! This resolved the issue.

diethardsteiner avatar May 10 '18 20:05 diethardsteiner

Trying to build the docker image of superset on ubuntu 16.04(xenial) and came across the same error. Any suggestions regarding how to resolve it?

 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.6m -c build/temp.linux-x86_64-3.6/_openssl.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_openssl.o
  build/temp.linux-x86_64-3.6/_openssl.c:911:6: error: conflicting types for ‘BIO_callback_ctrl’
   long BIO_callback_ctrl(
        ^~~~~~~~~~~~~~~~~
  In file included from /usr/include/openssl/asn1.h:16:0,
                   from build/temp.linux-x86_64-3.6/_openssl.c:530:
  /usr/include/openssl/bio.h:551:6: note: previous declaration of ‘BIO_callback_ctrl’ was here
   long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
        ^~~~~~~~~~~~~~~~~
  build/temp.linux-x86_64-3.6/_openssl.c: In function ‘_cffi_d_ASN1_STRING_data’:
  build/temp.linux-x86_64-3.6/_openssl.c:14529:3: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
     return ASN1_STRING_data(x0);
     ^~~~~~
  In file included from /usr/include/openssl/e_os2.h:13:0,
                   from build/temp.linux-x86_64-3.6/_openssl.c:507:
  /usr/include/openssl/asn1.h:553:1: note: declared here
   DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
   ^
  build/temp.linux-x86_64-3.6/_openssl.c: In function ‘_cffi_f_ASN1_STRING_data’:
  build/temp.linux-x86_64-3.6/_openssl.c:14552:3: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
     { result = ASN1_STRING_data(x0); }
     ^
....

The DockerFile, requirements file and full trace of error are attached below DockerFile.txt full_error_trace.txt requirements.txt

mjain1994 avatar Dec 04 '18 03:12 mjain1994

Hi,

I have the same problem.

pc-tradelab avatar Dec 04 '18 09:12 pc-tradelab

In my case I am not using docker. It was resolved by doing the following (copied from my previous post)

Resolved this issue. Cryptography module compiled when libssl-dev version was changed from 1.1.0h-2+ubuntu16.04.1+deb.sury.org+2 to "1.0.2g-1ubuntu4.12"(official version for 16.04.04)

Sorry dont know of a solution for docker configuration.

sachinoze avatar Dec 04 '18 11:12 sachinoze

In the requirements.txt, I changed the version of cryptography from 1.9 to 2.4.2 and it worked.

mjain1994 avatar Dec 04 '18 17:12 mjain1994

Hello, thanks @mjain1994 , It works when i update the cryptography version.

pc-tradelab avatar Dec 05 '18 09:12 pc-tradelab