Scott Burch
2001-Nov-05 23:03 UTC
FYI dsa_lib.c and dh_lib.c in openssl-0.9.6b and latest snapshot
Hello, I am writing to comment on problems I have seen in the past that are currently still problems with compiling OpenSSH with the Sun Forte Compiler version 6 update 2 and gcc on Solaris 8 (not suprising since the problems are actually in the openssl code). I used the snapshot from 11/4 for this test on a brand new system I built from the July release of Solaris 8. I have the latest linker patches, C, C++ library patches, etc. If you want to see the ouput of showrev, etc I can provide this. People in the past suggested that I apply the latest linker patch in the past to fix the problem, however that is not true. The only way I can compile openssh and have it work is to do the following suggest from people on this list. Others should be able to replicate my problems easily. I am reporting back now, because I finally got a chance to rejump my Ultra10 that I used to do the compile. If nobody else has these problems then something else must be wrong on my machine, but I don't see what. I built the following from source with Sun Forte 6 update 2: zlib 1.1.3 openssl 0.9.6b tcp_wrappers skey libraries prngd0.9.23 (Oh and skey does not work...it fails checking for skey_keyinfo... no config error missing s/key libraries...I was able to compile and install skey without problems as long as I used gnu-make...but openssh snapshot from 11/4 can not find the libraries...so I think something is wrong there as well.) The compilation options I used for various code are documented in the Sun Blueprint "Building and Deploying OpenSSH for the Solaris Operating Environment" The source changes I made are below for openssl (suggested by several here): Please change line 69 in openssl-0.9.6b/crypto/dsa/dsa_lib.c from static DSA_METHOD *default_DSA_method; to static DSA_METHOD *default_DSA_method = NULL; I just found another of these beasts in crypto/dh/dh_lib.c. Change static const DH_METHOD *default_DH_method; to static const DH_METHOD *default_DH_method = NULL; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20011105/20304e18/attachment.html
Michael Tokarev
2001-Nov-06 00:40 UTC
FYI dsa_lib.c and dh_lib.c in openssl-0.9.6b and latest snapshot
> Scott Burch wrote:[]> The source changes I made are below for openssl (suggested by several here): > > Please change line 69 in openssl-0.9.6b/crypto/dsa/dsa_lib.c from > static DSA_METHOD *default_DSA_method; > to > static DSA_METHOD *default_DSA_method = NULL;Hmmm... Such variables should be initialized by a compiler/linker/whatether. Interesting to see if this is in some C specs or not. Gcc with GNU ld will definitely initialize the variable in question to zero (NULL = 0, isn't it?). Note for example numerous flame wars on linux-kernel when Linus rejected a patch that contains initializations like this -- due to resulting executable growth. That is, without initializer, code works just like with it, but an initializer makes resulting executable bigger. I almost shure this is a bug in compiler or linker and NOT in the code, but I don't know specs that says so. Well, those static variables can be initialized explicitly as a work around buggy compiling environment... Regards, Michael.