Bug 397 - Openssh build failure AIX 4.3.3
Summary: Openssh build failure AIX 4.3.3
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other AIX
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-18 00:09 AEST by susan hall
Modified: 2007-04-29 16:28 AEST (History)
0 users

See Also:


Attachments
Undef HAVE_STRSEP on AIX (566 bytes, patch)
2002-09-20 00:33 AEST, Darren Tucker
no flags Details | Diff
Ensure strsep is defined before checking for function in library (928 bytes, patch)
2002-09-26 22:27 AEST, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description susan hall 2002-09-18 00:09:26 AEST
Attempting to build openssh v.3.4p1 on AIX 4.3.3 maint level 9.  The configure 
command is:  CC=/usr/ibmcxx/bin/xlC_r ./configure --prefix=/usr/local/ssh 
--with-tcp-wrappers

Error 1: duplicate def. utmp_data in /usr/include/utmp.h and utmpx.h.  I 
commented out the def. in the older utmpx.h.  Ran make clean and reconfigured:

Error 2: duplicate def. of TILDE in /usr/include/sys/ioctl.h and 
openssh/openbsd-compat/glob.c.  I commented out the def. in ioctl.h, did make 
clean and continued.

Error 3: 
        /usr/ibmcxx/bin/xlC_r -g -I. -I. -I/usr/local/ssl/include  -
I/usr/local/include -DSSHDIR=\"/usr/local/ssh/etc\"  -
D_PATH_SSH_PROGRAM=\"/usr/local/ssh/bin/ssh\"  -
D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/ssh/libexec/ssh-askpass\"  -
D_PATH_SFTP_SERVER=\"/usr/local/ssh/libexec/sftp-server\"  -
D_PATH_SSH_KEY_SIGN=\"/usr/local/ssh/libexec/ssh-keysign\"  -
D_PATH_SSH_PIDDIR=\"/usr/local/ssh/etc\"  -
D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\"  -
DSSH_RAND_HELPER=\"/usr/local/ssh/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c 
cipher.c
"cipher.c", line 65.56: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 66.55: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 70.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 71.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 72.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 73.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 154.17: 1506-068 (S) Operation between types "char*" and "int" 
is not allowed.
"cipher.c", line 155.16: 1506-068 (S) Operation between types "char*" and "int" 
is not allowed.
"cipher.c", line 706.24: 1506-068 (E) Operation between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 721.24: 1506-068 (E) Operation between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
make: 1254-004 The error code from the last command is 1.


Stop.

I see a similiar error reported for an Alpha system, but don't have the cflag 
specified in the response to remove (bug #371).  My configuration was reported 
as:

Console output after configure:

OpenSSH has been configured with the following options:
                     User binaries: /usr/local/ssh/bin
                   System binaries: /usr/local/ssh/sbin
               Configuration files: /usr/local/ssh/etc
                   Askpass program: /usr/local/ssh/libexec/ssh-askpass
                      Manual pages: /usr/local/ssh/man/catX
                          PID file: /usr/local/ssh/etc
  Privilege separation chroot path: /var/empty
            sshd default user 
PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ssh/bin
                    Manpage format: cat
                       PAM support: no
                KerberosIV support: no
                 KerberosV support: no
                 Smartcard support: no
                       AFS support: no
                     S/KEY support: no
              TCP Wrappers support: yes
              MD5 password support: no
       IP address in $DISPLAY hack: no
          Use IPv4 by default hack: no
           Translate v4 in v6 hack: no
                  BSD Auth support: no
              Random number source: ssh-rand-helper
     ssh-rand-helper collects from: Command hashing (timeout 200)

              Host: powerpc-ibm-aix4.3.3.0
          Compiler: /usr/ibmcxx/bin/xlC_r
    Compiler flags: -g
Preprocessor flags: -I/usr/local/ssl/include  -I/usr/local/include
      Linker flags: -L/usr/local/ssl/lib  -L/usr/local/lib -
blibpath:/usr/lib:/lib:/usr/local/lib
         Libraries: -lwrap  -lz  -lcrypto

WARNING: you are using the builtin random number collection
service. Please read WARNING.RNG and request that your OS
vendor includes kernel-based random number collection in
future versions of your OS.
Comment 1 Darren Tucker 2002-09-18 00:55:00 AEST
Not sure about error 1, but error 2 has been fixed in -current (see bug #265). 
As for error 3, the last time I built using the native compiler, I used "CC=xlc" 
which worked; if possible try that.
Comment 2 Ben Lindstrom 2002-09-18 01:04:31 AEST
Can you retest with the current CVS or a snapshot from 
http://www.openssh.com/portable.html.  I believe all build issues for AIX 
should have been resolved.

If it does, please close this out.
Comment 3 susan hall 2002-09-18 03:45:23 AEST
I pulled down the latest tarball from portable/snapshot, datestamped 0906.  Got 
the following errors:

        /usr/ibmcxx/bin/xlc -g -I. -I. -I/usr/local/ssl/include  
-I/usr/local/include -DSSHDIR=\"/usr/local/ssh/etc\"  
-D_PATH_SSH_PROGRAM=\"/usr/local/ssh/bin/ssh\"  
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/ssh/libexec/ssh-askpass\"  
-D_PATH_SFTP_SERVER=\"/usr/local/ssh/libexec/sftp-server\"  
-D_PATH_SSH_KEY_SIGN=\"/usr/local/ssh/libexec/ssh-keysign\"  
-D_PATH_SSH_PIDDIR=\"/usr/local/ssh/etc\"  
-D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\"  
-DSSH_RAND_HELPER=\"/usr/local/ssh/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c 
channels.c
"channels.c", line 915.22: 1506-280 (E) Function argument assignment between 
types "const char*" and "unsigned char*" is not allowed.
"channels.c", line 920.27: 1506-280 (E) Function argument assignment between 
types "const char*" and "unsigned char*" is not allowed.
"channels.c", line 924.14: 1506-068 (E) Operation between types "unsigned char*" 
and "char*" is not allowed.
"channels.c", line 925.26: 1506-280 (E) Function argument assignment between 
types "const char*" and "unsigned char*" is not allowed.
        /usr/ibmcxx/bin/xlc -g -I. -I. -I/usr/local/ssl/include  
-I/usr/local/include -DSSHDIR=\"/usr/local/ssh/etc\"  
-D_PATH_SSH_PROGRAM=\"/usr/local/ssh/bin/ssh\"  
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/ssh/libexec/ssh-askpass\"  
-D_PATH_SFTP_SERVER=\"/usr/local/ssh/libexec/sftp-server\"  
-D_PATH_SSH_KEY_SIGN=\"/usr/local/ssh/libexec/ssh-keysign\"  
-D_PATH_SSH_PIDDIR=\"/usr/local/ssh/etc\"  
-D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\"  
-DSSH_RAND_HELPER=\"/usr/local/ssh/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c 
cipher.c
"cipher.c", line 65.56: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 66.55: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 70.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 71.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 72.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 73.57: 1506-196 (E) Initialization between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 154.17: 1506-068 (S) Operation between types "char*" and "int" 
is not allowed.
"cipher.c", line 155.16: 1506-068 (S) Operation between types "char*" and "int" 
is not allowed.
"cipher.c", line 706.24: 1506-068 (E) Operation between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
"cipher.c", line 721.24: 1506-068 (E) Operation between types "const struct 
evp_cipher_st*(*)(void)" and "struct evp_cipher_st*(*)(void)" is not allowed.
make: 1254-004 The error code from the last command is 1.


Stop.
Comment 4 Darren Tucker 2002-09-18 22:44:02 AEST
I think I've figured out error 3. Short answer: comment out "#define 
HAVE_STRSEP 1" from config.h and re-run "make".

Long answer: the error that stops the build is:

"cipher.c", line 154.17: 1506-068 (S) Operation between types "char*" and "int" 
is not allowed.

This is caused by "p = strsep(&cp, CIPHER_SEP)" where p is a char *. Strsep 
should return a char *, but in /usr/include/string.h, the prototype is inside a 
"#ifdef _LINUX_SOURCE_COMPAT".

Configure finds strsep (in libc, probably) and defines HAVE_STRSEP, but since 
the prototype is #ifdef'ed out, it defaults to returning int, hence the type 
conflict.

Not sure about a long-term fix.  Would it be bad form to add the following to 
openbsd-compat/strsep.h?

#ifdef _AIX
# undef HAVE_STRSEP
#endif
Comment 5 susan hall 2002-09-19 22:22:22 AEST
I tried the suggested fix to comment out the HAVE_STRSEP 1 from config.h.  One 
more glitch was an illegal comment at the end of line 18 in hostfile.h, then the 
code made successfully.  This was done with the snapshot of 0906.
Comment 6 susan hall 2002-09-19 22:23:30 AEST
I beg your pardon, the last glitch was an illegal "comma" at the end of line 18.
Comment 7 Darren Tucker 2002-09-20 00:31:55 AEST
I don't think this bug should be closed just yet, -cvs still doesn't build on 
AIX with the native compiler.

Error #1 occurs when CC=xlC_r (the thread-safe C++ compiler) and doesn't happen 
when CC=xlc, so I think we can ignore it.

Error #2 is already fixed in -cvs, as is the hostfile.h thing.

That leaves #3, which is fixed by the following patch. It's probably not the 
best way, but it works.
Comment 8 Darren Tucker 2002-09-20 00:33:45 AEST
Created attachment 147 [details]
Undef HAVE_STRSEP on AIX
Comment 9 Darren Tucker 2002-09-26 22:27:15 AEST
Created attachment 151 [details]
Ensure strsep is defined before checking for function in library
Comment 10 Darren Tucker 2002-10-19 18:38:00 AEST
Ben committed the attachment id=151, should be fixed now in -current (but not, 
unfortunately in 3.5p1).
Comment 11 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED
Comment 12 maui 2007-04-29 16:25:32 AEST
Created attachment 1267
Comment 13 maui 2007-04-29 16:26:08 AEST
Created attachment 1268
Comment 14 maui 2007-04-29 16:26:40 AEST
Created attachment 1269
Comment 15 maui 2007-04-29 16:27:10 AEST
Created attachment 1270
Comment 16 maui 2007-04-29 16:28:01 AEST
Created attachment 1271