confirmed on multiple boxes ... works with gcc-2.x, just not gcc-3.x gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -lssh -lopenbsd-compat -lutil -lz -lnsl -lcrypto ./libssh.a(rsa.o)(.text+0x2fd): In function `rsa_generate_additional_parameters': : undefined reference to `BN_mod' ./libssh.a(rsa.o)(.text+0x341): In function `rsa_generate_additional_parameters': : undefined reference to `BN_mod' collect2: ld returned 1 exit status make: *** [ssh] Error 1
heres the trouble ... in openssl-0.9.6 we have in include/openssl/bn.h: int BN_mod(BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); but in openssl-0.9.7 we have it as a macro ... #define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) so the final libcrypto files dont have BN_mod defined ... the fix may be to turn this back into a func, but just a pass through ... hacking openssl-0.9.7 if you would ... this *might* be better because who is to say this is the only package that breaks ...
*** Bug 13657 has been marked as a duplicate of this bug. ***
http://bugzilla.mindrot.org/show_bug.cgi?id=462 discusses this problem. It seems there could be an old definition for BN_mod hanging around in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/openssl/bn.h. qpkg shows that that file belongs to sys-devel/gcc. So I re-emerged gcc (sys-devel/gcc-3.2.2), which replaced that bn.h with a new one, and then emerging openssh worked.
I can confirm that removing the stray header in the gcc-lib dir resolves this.
*** Bug 16455 has been marked as a duplicate of this bug. ***
This seems to be resolved, could this be closed please?
i thought i had ;)
*** Bug 27379 has been marked as a duplicate of this bug. ***
*** Bug 29066 has been marked as a duplicate of this bug. ***
*** Bug 29144 has been marked as a duplicate of this bug. ***
*** Bug 29323 has been marked as a duplicate of this bug. ***
*** Bug 29335 has been marked as a duplicate of this bug. ***
*** Bug 29334 has been marked as a duplicate of this bug. ***
*** Bug 29502 has been marked as a duplicate of this bug. ***
*** Bug 30831 has been marked as a duplicate of this bug. ***
>>> Original instance of package unmerged safely. /usr/portage/dev-libs/openssl/openssl-0.9.7j.ebuild: line 167: gcc-config: command not found >>> Regenerating /etc/ld.so.cache... >>> dev-libs/openssl-0.9.7j merged. >>> Auto-cleaning packages... Looks like this "fix" is now having issues
completely unrelated