Bug 685 - cipher.c error when building against OpenSSL 0.9.7b on RedHat 7.3
Summary: cipher.c error when building against OpenSSL 0.9.7b on RedHat 7.3
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 3.7.1p1
Hardware: ix86 Linux
: P2 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-19 11:32 AEST by Dean Mills
Modified: 2007-05-11 07:58 AEST (History)
0 users

See Also:


Attachments
Quickie patch to report OpenSSL header version. (599 bytes, patch)
2003-09-22 10:57 AEST, Jason McCormick
no flags Details | Diff
Mac os (deleted)
2007-05-09 06:33 AEST, Myrtle H. Darnell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Mills 2003-09-19 11:32:48 AEST
I'm getting the following error when trying to compile 3.7.1p1 source on a 
RedHat 7.3 box with OpenSSL 0.9.7b. On the same machine with OpenSSL 0.9.6h 
installed, it compiles fine...

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-privsep-user=sshd

...

OpenSSH has been configured with the following options:
                     User binaries: /usr/bin
                   System binaries: /usr/sbin
               Configuration files: /etc/ssh
                   Askpass program: /usr/libexec/ssh-askpass
                      Manual pages: /usr/man/manX
                          PID file: /var/run
  Privilege separation chroot path: /var/empty
            sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
                    Manpage format: doc
                       DNS support: no
                       PAM support: no
                 KerberosV support: no
                 Smartcard support: no
                     S/KEY support: no
              TCP Wrappers support: no
              MD5 password support: no
       IP address in $DISPLAY hack: no
           Translate v4 in v6 hack: yes
                  BSD Auth support: no
              Random number source: OpenSSL internal ONLY

              Host: i686-pc-linux-gnu
          Compiler: gcc
    Compiler flags: -g -O2 -Wall -Wpointer-arith -Wno-uninitialized
Preprocessor flags:
      Linker flags:
         Libraries:   -lutil -lz -lnsl  -lcrypto -lcrypt

make

...

gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.  -
DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -
D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/libexec/ssh-askpass\" -
D_PATH_SFTP_SERVER=\"/usr/libexec/sftp-server\" -
D_PATH_SSH_KEY_SIGN=\"/usr/libexec/ssh-keysign\" -
D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -
DSSH_RAND_HELPER=\"/usr/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c cipher.c
cipher.c:68: warning: initialization from incompatible pointer type
cipher.c:69: warning: initialization from incompatible pointer type
cipher.c:73: warning: initialization from incompatible pointer type
cipher.c:74: warning: initialization from incompatible pointer type
cipher.c:75: warning: initialization from incompatible pointer type
cipher.c:76: warning: initialization from incompatible pointer type
cipher.c:84: error: `EVP_aes_128_cbc' undeclared here (not in a function)
cipher.c:84: error: initializer element is not constant
cipher.c:84: error: (near initialization for `ciphers[8].evptype')
cipher.c:84: error: initializer element is not constant
cipher.c:84: error: (near initialization for `ciphers[8]')
cipher.c:85: error: `EVP_aes_192_cbc' undeclared here (not in a function)
cipher.c:85: error: initializer element is not constant
cipher.c:85: error: (near initialization for `ciphers[9].evptype')
cipher.c:85: error: initializer element is not constant
cipher.c:85: error: (near initialization for `ciphers[9]')
cipher.c:86: error: `EVP_aes_256_cbc' undeclared here (not in a function)
cipher.c:86: error: initializer element is not constant
cipher.c:86: error: (near initialization for `ciphers[10].evptype')
cipher.c:86: error: initializer element is not constant
cipher.c:86: error: (near initialization for `ciphers[10]')
cipher.c:88: error: `EVP_aes_256_cbc' undeclared here (not in a function)
cipher.c:88: error: initializer element is not constant
cipher.c:88: error: (near initialization for `ciphers[11].evptype')
cipher.c:88: error: initializer element is not constant
cipher.c:88: error: (near initialization for `ciphers[11]')
cipher.c:90: error: initializer element is not constant
cipher.c:90: error: (near initialization for `ciphers[12]')
cipher.c:91: error: initializer element is not constant
cipher.c:91: error: (near initialization for `ciphers[13]')
cipher.c:92: error: initializer element is not constant
cipher.c:92: error: (near initialization for `ciphers[14]')
cipher.c:94: error: initializer element is not constant
cipher.c:94: error: (near initialization for `ciphers[15]')
cipher.c: In function `cipher_get_keycontext':
cipher.c:403: warning: comparison of distinct pointer types lacks a cast
cipher.c:407: error: structure has no member named `cipher_data'
cipher.c: In function `cipher_set_keycontext':
cipher.c:418: warning: comparison of distinct pointer types lacks a cast
cipher.c:420: error: structure has no member named `cipher_data'
make: *** [cipher.o] Error 1
Comment 1 Darren Tucker 2003-09-19 11:54:14 AEST
Please check configure's output to see which OpenSSL version it's finding.  I
think you're picking up an OpenSSL version from the system headers, in which
case you need to use:
$ ./configure --with-ssl-dir=/usr/local/ssl
(or wherever your OpenSSL is installed).

Maybe the "OpenSSH has been configured with the following options" output should
include OpenSSL version?
Comment 2 Jason McCormick 2003-09-22 10:57:27 AEST
Created attachment 442 [details]
Quickie patch to report OpenSSL header version.

Adds the following line to the 'configure' out put:

	    OpenSSL Header Version: 9060af (OpenSSL 0.9.6j 10 Apr 2003)
Comment 3 Jason McCormick 2003-09-22 11:00:35 AEST
Try patching your OpenSSH source tree with the patch on this bug.  It'll report
the OpenSSL version that autoconf is finding during configuration.  See if what
autoconf is finding matches what you think it should be finding.
Comment 4 Dean Mills 2003-09-22 12:22:58 AEST
The configure script's output prior to the patch output the OpenSSL lib and 
header versions, and since it reported 0.9.7b I thought nothing of it, but 
prior to applying the patch I found the older libs and headers located in 
the /usr (/lib & /include) directory. Upon replacing them with the 0.9.7b ones 
OpenSSH compiles fine, so I have not had a chance or a need for the patch, but 
it seems as though the configure script reports one version of libs/headers but 
uses another, even when using the --with-ssl-dir=/usr/local/ssl directive. I 
consider this resolved, and 90% my machine's problem, but it seems strange that 
the two different versions were never reported by the configure script at all, 
although and it sounds like the patch might address this issue.
Comment 5 Darren Tucker 2003-09-22 13:14:05 AEST
There was a bug with some versions of gcc where "-I" header search paths got
appended not prepended to the search list.  Details escape me at the moment but
it's probably in gcc's bugzilla somewhere.
Comment 6 Jason McCormick 2003-09-22 21:00:16 AEST
Is the patch here appropriate for inclusion in configure.ac to print the OpenSSL
version in summary report?
Comment 7 Darren Tucker 2004-02-05 19:42:36 AEDT
I don't think the OpenSSL library version belongs there, and the summary is
already longer than a screenful...
Comment 8 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED
Comment 9 Myrtle H. Darnell 2007-05-09 06:33:07 AEST
Created attachment 1274 [details]
Mac os
Comment 10 Darren Tucker 2007-05-11 07:58:26 AEST
The content of attachment 1274 [details] has been deleted by
    Darren Tucker <dtucker@zip.com.au>
who provided the following reason:

Spam

The token used to delete this attachment was generated at 2007-05-11 07:58:10.