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

murmur does not build against openssl-1.1.0e #3053

Closed
Athemis opened this issue Apr 27, 2017 · 9 comments
Closed

murmur does not build against openssl-1.1.0e #3053

Athemis opened this issue Apr 27, 2017 · 9 comments
Labels
build Everything related to compiling/building the code help wanted Good community contribution opportunities linux priority/P2 - Important
Milestone

Comments

@Athemis
Copy link

Athemis commented Apr 27, 2017

Attempt to compile 5489564 on ArchLinux after they switched to openssl-1.1.0 on stable repositories:

# qmake-qt5 main.pro CONFIG+="no-client no-ice"
# make release
g++ -c -include release/murmurd -pipe -fvisibility=hidden -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../mumble_proto -isystem ../mumble_proto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu++1z -pthread -Wall -W -D_REENTRANT -fPIC -DRESTRICT=__restrict__ -DMUMBLE_VERSION_STRING=1.3.0 -DMURMUR -DUSE_DBUS -DUSE_BONJOUR -DUSE_QSSLDIFFIEHELLMANPARAMETERS -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../src -I. -I../mumble_proto -I../../3rdparty/arc4random-src -I../../3rdparty/qqbonjour-src -isystem /usr/include/avahi-compat-libdns_sd -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/Cert.o Cert.cpp
g++ -c -include release/murmurd -pipe -fvisibility=hidden -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../mumble_proto -isystem ../mumble_proto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu++1z -pthread -Wall -W -D_REENTRANT -fPIC -DRESTRICT=__restrict__ -DMUMBLE_VERSION_STRING=1.3.0 -DMURMUR -DUSE_DBUS -DUSE_BONJOUR -DUSE_QSSLDIFFIEHELLMANPARAMETERS -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../src -I. -I../mumble_proto -I../../3rdparty/arc4random-src -I../../3rdparty/qqbonjour-src -isystem /usr/include/avahi-compat-libdns_sd -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/Meta.o Meta.cpp
g++ -c -include release/murmurd -pipe -fvisibility=hidden -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../mumble_proto -isystem ../mumble_proto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu++1z -pthread -Wall -W -D_REENTRANT -fPIC -DRESTRICT=__restrict__ -DMUMBLE_VERSION_STRING=1.3.0 -DMURMUR -DUSE_DBUS -DUSE_BONJOUR -DUSE_QSSLDIFFIEHELLMANPARAMETERS -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../src -I. -I../mumble_proto -I../../3rdparty/arc4random-src -I../../3rdparty/qqbonjour-src -isystem /usr/include/avahi-compat-libdns_sd -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/RPC.o RPC.cpp
g++ -c -include release/murmurd -pipe -fvisibility=hidden -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../mumble_proto -isystem ../mumble_proto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu++1z -pthread -Wall -W -D_REENTRANT -fPIC -DRESTRICT=__restrict__ -DMUMBLE_VERSION_STRING=1.3.0 -DMURMUR -DUSE_DBUS -DUSE_BONJOUR -DUSE_QSSLDIFFIEHELLMANPARAMETERS -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../src -I. -I../mumble_proto -I../../3rdparty/arc4random-src -I../../3rdparty/qqbonjour-src -isystem /usr/include/avahi-compat-libdns_sd -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/PBKDF2.o PBKDF2.cpp
Cert.cpp: In member function 'void Server::initializeCert()':
Cert.cpp:199:15: warning: 'RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)' is deprecated [-Wdeprecated-declarations]
    RSA *rsa = RSA_generate_key(2048,RSA_F4,NULL,NULL);
               ^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/rsa.h:13:0,
                 from /usr/include/openssl/x509.h:31,
                 from /usr/include/openssl/pem.h:17,
                 from murmur_pch.h:110:
/usr/include/openssl/rsa.h:193:1: note: declared here
 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
 ^
Cert.cpp:199:53: warning: 'RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)' is deprecated [-Wdeprecated-declarations]
    RSA *rsa = RSA_generate_key(2048,RSA_F4,NULL,NULL);
                                                     ^
In file included from /usr/include/openssl/rsa.h:13:0,
                 from /usr/include/openssl/x509.h:31,
                 from /usr/include/openssl/pem.h:17,
                 from murmur_pch.h:110:
/usr/include/openssl/rsa.h:193:1: note: declared here
 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
 ^
Cert.cpp:254:12: error: aggregate 'BN_GENCB cb' has incomplete type and cannot be defined
   BN_GENCB cb;
            ^~
Cert.cpp:255:33: error: invalid application of 'sizeof' to incomplete type 'BN_GENCB {aka bn_gencb_st}'
   memset(&cb, 0, sizeof(BN_GENCB));
                                 ^
g++ -c -include release/murmurd -pipe -fvisibility=hidden -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I../mumble_proto -isystem ../mumble_proto -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu++1z -pthread -Wall -W -D_REENTRANT -fPIC -DRESTRICT=__restrict__ -DMUMBLE_VERSION_STRING=1.3.0 -DMURMUR -DUSE_DBUS -DUSE_BONJOUR -DUSE_QSSLDIFFIEHELLMANPARAMETERS -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../../src -I. -I../mumble_proto -I../../3rdparty/arc4random-src -I../../3rdparty/qqbonjour-src -isystem /usr/include/avahi-compat-libdns_sd -isystem /usr/include/qt -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtSql -isystem /usr/include/qt/QtXml -isystem /usr/include/qt/QtDBus -isystem /usr/include/qt/QtCore -Irelease -I/usr/lib/qt/mkspecs/linux-g++ -o release/UnixMurmur.o UnixMurmur.cpp
make[2]: *** [Makefile.Release:1051: release/Cert.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/alex/git/mumble/src/murmur'
make[1]: *** [Makefile:40: release] Error 2
make[1]: Leaving directory '/home/alex/git/mumble/src/murmur'
make: *** [Makefile:818: sub-src-murmur-release_ordered] Error 2
@mkrautz mkrautz self-assigned this Apr 27, 2017
@mkrautz mkrautz added this to the 1.3.0 milestone Apr 27, 2017
@mkrautz
Copy link
Contributor

mkrautz commented Apr 27, 2017

TODO:

Migrate src/murmur/Cert.cpp to use RSA_generate_key_ex.
Avoid use of BN_GENCB on the stack. (Use BN_GENCB_new/BN_GENCB_free)

@mkrautz mkrautz removed their assignment Apr 27, 2017
@mkrautz mkrautz added the help wanted Good community contribution opportunities label Apr 27, 2017
@mkrautz
Copy link
Contributor

mkrautz commented May 1, 2017

PR for BN_GENCB_new/BN_GENCB_free at #3062

@davidebeatrici davidebeatrici added build Everything related to compiling/building the code linux labels May 1, 2017
@Athernar
Copy link

Athernar commented May 12, 2017

Is there any progress on this issue? Some of the prior commits have obviated the warnings and one of the errors, but trying to compile murmur-git from Arch's AUR still results in a single similar error:

Cert.cpp: In function ‘BN_GENCB* mumble_BN_GENCB_new()’: Cert.cpp:239:60: error: invalid application of ‘sizeof’ to incomplete type ‘BN_GENCB {aka bn_gencb_st}’ return reinterpret_cast<BN_GENCB *>(malloc(sizeof(BN_GENCB)));

@Athemis
Copy link
Author

Athemis commented May 12, 2017

Yep, but it's Arch's fault this time. They switched back to build qt5-base against openssl-1.0 instead of openssl-1.1. That's completely messing things up.

@mkrautz
Copy link
Contributor

mkrautz commented May 14, 2017

Is there any progress on this issue? Some of the prior commits have obviated the warnings and one of the errors, but trying to compile murmur-git from Arch's AUR still results in a single similar error:

Cert.cpp: In function ‘BN_GENCB* mumble_BN_GENCB_new()’: Cert.cpp:239:60: error: invalid application of ‘sizeof’ to incomplete type ‘BN_GENCB {aka bn_gencb_st}’ return reinterpret_cast<BN_GENCB *>(malloc(sizeof(BN_GENCB)));

This would be my mistake. I neglected to include <openssl/opensslv.h> in order for OPENSSL_VERSION to be defined. That is, my version checks were not working.

mkrautz added a commit to mkrautz/mumble that referenced this issue May 14, 2017
This commits includes <openssl/opensslv.h> in murmur_pch.h.

This fixes an issue noticed in mumble-voip#3053 where
our recently introduced OPENSSL_VERSION preprocessor checks were
not effective because OPENSSL_VERSION is not even defined.

This commit fixes that problem.
@mkrautz
Copy link
Contributor

mkrautz commented May 14, 2017

I created a PR for this: #3093

@Athernar
Copy link

I just attempted to compile with the latest changes and it yields the same result, as far as stock Arch is concerned.

@mkrautz
Copy link
Contributor

mkrautz commented May 15, 2017

Whoops, it's OPENSSL_VERSION_NUMBER, not OPENSSL_VERSION... My bad. Fix coming up.

@Athernar
Copy link

Murmur now compiles correctly, can't test beyond that right now for the reasons Athemis mentioned above.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Everything related to compiling/building the code help wanted Good community contribution opportunities linux priority/P2 - Important
Projects
None yet
Development

No branches or pull requests

4 participants