net-libs/libssh-0.6.4 fails to build with USE="gcrypt". Problem absent with USE="-gcrypt". [ 25%] Building C object src/CMakeFiles/ssh_shared.dir/dh.c.o cd /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4-abi_x86_64.amd64/src && /usr/bin/x86_64-pc-linux-gnu-gcc -DLIBSSH_EXPORTS -DNDEBUG -march=core2 -O2 -fno-ident -frecord-gcc-switches -pipe -Wall -Wpointer-sign -std=gnu99 -pedantic -pedantic-errors -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fPIC -fstack-protector -D_LARGEFILE64_SOURCE -fPIC -I/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4-abi_x86_64.amd64/src -I/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src -I/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/include -I/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4-abi_x86_64.amd64 -fvisibility=hidden -o CMakeFiles/ssh_shared.dir/dh.c.o -c /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src/dh.c /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src/dh.c: In function ‘make_string_bn_inplace’: /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src/dh.c:413:4: error: #error "unsupported" #error "unsupported" ^ /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src/dh.c:411:16: warning: unused variable ‘len’ [-Wunused-variable] unsigned int len = ssh_string_len(string); ^ /var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4/src/dh.c:410:55: warning: unused parameter ‘bnout’ [-Wunused-parameter] void make_string_bn_inplace(ssh_string string, bignum bnout) { ^ src/CMakeFiles/ssh_shared.dir/build.make:284: recipe for target 'src/CMakeFiles/ssh_shared.dir/dh.c.o' failed make[2]: *** [src/CMakeFiles/ssh_shared.dir/dh.c.o] Error 1 make[2]: Leaving directory '/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4-abi_x86_64.amd64' CMakeFiles/Makefile2:185: recipe for target 'src/CMakeFiles/ssh_shared.dir/all' failed make[1]: *** [src/CMakeFiles/ssh_shared.dir/all] Error 2 make[1]: Leaving directory '/var/tmp/portage/net-libs/libssh-0.6.4/work/libssh-0.6.4-abi_x86_64.amd64' Makefile:137: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: net-libs/libssh-0.6.4::gentoo failed (compile phase): * emake failed The following change introduced this problem: --- libssh-0.6.3/src/dh.c +++ libssh-0.6.4/src/dh.c @@ -407,6 +407,15 @@ return bn; } +void make_string_bn_inplace(ssh_string string, bignum bnout) { + unsigned int len = ssh_string_len(string); +#ifdef HAVE_LIBGCRYPT + #error "unsupported" +#elif defined HAVE_LIBCRYPTO + bignum_bin2bn(string->data, len, bnout); +#endif +} + ssh_string dh_get_e(ssh_session session) { return make_bignum_string(session->next_crypto->e); }
#ifdef HAVE_LIBGCRYPT #error "unsupported" Right.
Upstream moved the functions around and forgot to remove the old one, it seems.
No, it's worse. They didn't test the HAVE_LIBGCRYPT path at all before release. Should we maybe put "=net-libs/libssh-0.6.4 gcrypt" in package.use.mask?
(In reply to Jeroen Roovers from comment #3) > No, it's worse. They didn't test the HAVE_LIBGCRYPT path at all before > release. Neither that nor the DEBUG_CRYPTO path.
Hi, I committed a patch to fix this problem: http://git.libssh.org/projects/libssh.git/commit/?h=v0-6&id=3880a8ed80a4b1e2c052bd62f328bba2f869d5ae On the good side this show that we don't have as many configurations as we should in the automated testing, I'll see how we can fix that. Aris
+ 30 Dec 2014; Lars Wendler <polynomial-c@gentoo.org> libssh-0.6.4.ebuild: + Fixed compilation with libgcrypt (bug #533424). + Thank you Aris :)