[Bug 877233] New: C++ code including gcrypt.h fails to be compiled with the mentioned patch
https://bugzilla.novell.com/show_bug.cgi?id=877233 https://bugzilla.novell.com/show_bug.cgi?id=877233#c0 Summary: C++ code including gcrypt.h fails to be compiled with the mentioned patch Classification: openSUSE Product: openSUSE Factory Version: 13.2 Milestone 0 Platform: All OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Development AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: 0xd34df00d@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) Leechcraft/0.6.65-521-gf89a3f6 Safari/534.34 The 0007-User-interface-to-DRBG.patch defines a new struct drbg_gen with a field `unsigned char *outbuf;`. Later, the function gcry_randomize_drbg (also introduced by the patch) tries to assign its parameter `outbuf` of type `void*` to the corresponding field of the drbg_gen structure. While it is a perfectly valid assignment in C, such conversions from void* to T* are explicitly prohibited in C++. Thus, any C++ code including this header (either directly or, say, via libotr's include chain) breaks. Reproducible: Always Steps to Reproduce: 1. Try building the LeechCraft package. Actual Results: [ 775s] [ 51%] Building CXX object plugins/azoth/plugins/otroid/CMakeFiles/leechcraft_azoth_otroid.dir/otroid.cpp.o [ 775s] cd /home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/build/plugins/azoth/plugins/otroid && /usr/bin/c++ -DENABLE_CRYPT -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_WEBKIT_LIB -DQT_XML_LIB -DSTRICT_LICENSING -Dleechcraft_azoth_otroid_EXPORTS -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Doverride= -fvisibility=hidden -std=c++0x -Wall -O2 -g -DNDEBUG -fPIC -isystem /usr/include/QtWebKit -isystem /usr/include/QtGui -isystem /usr/include/QtDBus -isystem /usr/include/QtXml -isystem /usr/include/QtSql -isystem /usr/include/QtNetwork -isystem /usr/include/QtCore -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/src/plugins/azoth -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/build/plugins/azoth -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/src -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/build -I/usr/include/QtCrypto -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/build/plugins/azoth/plugins/otroid -I/home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/build/azoth -o CMakeFiles/leechcraft_azoth_otroid.dir/otroid.cpp.o -c /home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/src/plugins/azoth/plugins/otroid/otroid.cpp [ 775s] In file included from /usr/include/libotr/context_priv.h:24:0, [ 775s] from /usr/include/libotr/context.h:24, [ 775s] from /usr/include/libotr/proto.h:24, [ 775s] from /home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/src/plugins/azoth/plugins/otroid/otroid.h:37, [ 775s] from /home/abuild/rpmbuild/BUILD/leechcraft-0.6.65/src/plugins/azoth/plugins/otroid/otroid.cpp:30: [ 775s] /usr/include/gcrypt.h: In function 'void gcry_randomize_drbg(void*, size_t, gcry_random_level, drbg_string*)': [ 775s] /usr/include/gcrypt.h:1720:16: error: invalid conversion from 'void*' to 'unsigned char*' [-fpermissive] [ 775s] genbuf.outbuf = outbuf; [ 775s] ^ [ 775s] /usr/include/gcrypt.h: In function 'void gcry_randomize_drbg_test(void*, size_t, gcry_random_level, drbg_string*, drbg_test_data*)': [ 775s] /usr/include/gcrypt.h:1734:16: error: invalid conversion from 'void*' to 'unsigned char*' [-fpermissive] [ 775s] genbuf.outbuf = outbuf; [ 775s] ^ Expected Results: Successful build. The package: https://build.opensuse.org/package/show/network/leechcraft The full build log: https://build.opensuse.org/build/network/openSUSE_Factory/x86_64/leechcraft/... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c
zhang jiajun
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c1
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c2
--- Comment #2 from Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c3
--- Comment #3 from Stephan Müller
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c4
--- Comment #4 from Stephan Müller
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c5
--- Comment #5 from Stephan Müller
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c6
Stephan Müller
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c7
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c9
--- Comment #9 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=877233
https://bugzilla.novell.com/show_bug.cgi?id=877233#c10
Vitezslav Cizek
participants (1)
-
bugzilla_noreply@novell.com