Bug 2370 - make fails with "rmd160.c", line 35.10: 1506-296 (S) #include file <endian.h> not found. when using --without-openssl on AIX
Summary: make fails with "rmd160.c", line 35.10: 1506-296 (S) #include file <endian.h>...
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 6.8p1
Hardware: Other AIX
: P5 trivial
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_9 V_7_2
  Show dependency treegraph
 
Reported: 2015-03-25 08:23 AEDT by Michael Felt
Modified: 2016-08-02 10:40 AEST (History)
2 users (show)

See Also:


Attachments
trivial patch to not include <endian.h> on AIX (300 bytes, patch)
2015-03-25 08:23 AEDT, Michael Felt
no flags Details | Diff
Wrap endian.h inside ifdef. (314 bytes, patch)
2015-04-15 15:09 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 Michael Felt 2015-03-25 08:23:30 AEDT
Created attachment 2575 [details]
trivial patch to not include <endian.h> on AIX

make fails with "rmd160.c", line 35.10: 1506-296 (S) #include file <endian.h> not found. when using --without-openssl on AIX

I have no clue what is supposed to be in endian.h, but it seems not needed on AIX.

patch:
--- ../snap/opensshRC-6.8/openbsd-compat/rmd160.c       2015-02-27 23:52:49 +0000
+++ ../openssh-6.8p1/openbsd-compat/rmd160.c    2015-03-24 22:16:14 +0000
@@ -32,7 +32,9 @@
 #ifndef WITH_OPENSSL
 
 #include <sys/types.h>
+#ifndef _AIX
 #include <endian.h>
+#endif
 #include <string.h>
 #include <rmd160.h>

p.s. You do not 6.8p1 in the version pull-down.
Comment 1 Darren Tucker 2015-04-15 14:50:54 AEST
That's not the ideal way to do this because it doesn't solve the problem on other platforms that have the same problem, and it doesn't adjust if AIX adds this in future.  Instead, we should add a test to configure.  I'll attach a patch shortly.
Comment 2 Darren Tucker 2015-04-15 15:09:34 AEST
Created attachment 2584 [details]
Wrap endian.h inside ifdef.

In fact configure already looks for endian.h, so we just need to use that.  Could you please confirm this patch still works for you?

Thanks.
Comment 3 Darren Tucker 2015-04-17 10:41:53 AEST
Patch applied and will be in 6.9p1.  Please reopen if there are problems with this change.
Comment 4 Michael Felt 2015-06-07 07:39:03 AEST
Thanks. Will update if I see problems.
Comment 5 Michael Felt 2015-06-07 08:30:00 AEST
After this - all looks good - however, "make tests" does not 'build'

The 'snap' is openssh-SNAP-20150607.tar.gz

root@x064:[/data/prj/openbsd/openssh/snap/openssh]buildaix --without-openssl
xlc is /usr/vacpp/bin/xlc
+ CPPFLAGS="-I/opt/include" CFLAGS="-I/opt/include -I/opt/buildaix/include -O2" ./configure \ 
                --prefix=/opt  \ 
                --sysconfdir=/var/openssh/etc \ 
                --sharedstatedir=/var/openssh/com \ 
                --localstatedir=/var/openssh \ 
                --mandir=/opt/share/man/openssh \ 
                --infodir=/opt/share/info/openssh --without-openssl \ 
                        > .buildaix/configure.out
configure: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: zlib.h: proceeding with the compiler's result
configure: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible
configure: WARNING: Please check and edit blibpath in LDFLAGS in Makefile
+ /opt/bin/make > .buildaix/make.out
"bsd-cray.c", line 817.23: 1506-356 (W) Compilation unit is empty.
"kludge-fd_set.c", line 28.1: 1506-356 (W) Compilation unit is empty.
"glob.c", line 93.9: 1506-236 (W) Macro name TILDE has been redefined.
"glob.c", line 93.9: 1506-358 (I) "TILDE" is defined on line 250 of /usr/include/sys/ioctl.h.
"sha2.c", line 867.32: 1506-1332 (W) A function with return type "void" may not return a value of type "void".
"strnlen.c", line 37.7: 1506-356 (W) Compilation unit is empty.
"/usr/include/syms.h", line 288.9: 1506-236 (W) Macro name T_NULL has been redefined.
"/usr/include/syms.h", line 288.9: 1506-358 (I) "T_NULL" is defined on line 150 of /usr/include/arpa/onameser_compat.h.
ar: Creating an archive file libopenbsd-compat.a.
ar: Creating an archive file libssh.a.
    1500-030: (I) INFORMATION: main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
    1500-030: (I) INFORMATION: process_config_line: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
    1500-030: (I) INFORMATION: main: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
"platform.c", line 195.44: 1506-280 (W) Function argument assignment between types "char*" and "const char*" is not allowed.
    1500-030: (I) INFORMATION: process_server_config_line: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
"monitor.c", line 702.36: 1506-280 (W) Function argument assignment between types "unsigned int*" and "int*" is not allowed.
     470  1500-010: (W) WARNING in monitor_child_postauth: Infinite loop.  Program may not stop.
    1640  1500-010: (W) WARNING in sftp_server_main: Infinite loop.  Program may not stop.
    1408  1500-010: (W) WARNING in main: Infinite loop.  Program may not stop.
+ /opt/bin/make install DESTDIR=/var/aixtools/snap/openssh/1.0.0.0 > .buildaix/install.out
Could not load host key: /var/openssh/etc/ssh_host_rsa_key
Could not load host key: /var/openssh/etc/ssh_host_dsa_key
Could not load host key: /var/openssh/etc/ssh_host_ed25519_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
make: [check-config] Error 1 (ignored)
+ mkinstallp.ksh /var/aixtools/snap/openssh/1.0.0.0 > .buildaix/mkinstallp.out
readline() on closed filehandle RAL at /usr/sbin/makebff.pl line 276.
==============================
aixtools.snap.openssh:aixtools.snap.openssh.man:1.0.0.0::I:T:::::N:man pages::::0::
aixtools.snap.openssh:aixtools.snap.openssh.rte:1.0.0.0::I:T:::::N:1522 0606 2223::::0::
==============================

root@x064:[/data/prj/openbsd/openssh/snap/openssh]make tests
[ -d `pwd`/regress ] || mkdir -p `pwd`/regress
[ -d `pwd`/regress/unittests ] || mkdir -p `pwd`/regress/unittests
[ -d `pwd`/regress/unittests/test_helper ] || \
        mkdir -p `pwd`/regress/unittests/test_helper
[ -d `pwd`/regress/unittests/sshbuf ] || \
        mkdir -p `pwd`/regress/unittests/sshbuf
[ -d `pwd`/regress/unittests/sshkey ] || \
        mkdir -p `pwd`/regress/unittests/sshkey
[ -d `pwd`/regress/unittests/bitmap ] || \
        mkdir -p `pwd`/regress/unittests/bitmap
[ -d `pwd`/regress/unittests/hostkeys ] || \
        mkdir -p `pwd`/regress/unittests/hostkeys
[ -d `pwd`/regress/unittests/kex ] || \
        mkdir -p `pwd`/regress/unittests/kex
[ -f `pwd`/regress/Makefile ] || \
    ln -s `cd . && pwd`/regress/Makefile `pwd`/regress/Makefile
(cd openbsd-compat && make)
make[1]: Entering directory `/data/prj/openbsd/openssh/snap/openssh/openbsd-compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/data/prj/openbsd/openssh/snap/openssh/openbsd-compat'
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -o regress/modpipe regress/modpipe.c \
-L. -Lopenbsd-compat/  -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lz  -lcrypt
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -o regress/setuid-allowed regress/setuid-allowed.c \
-L. -Lopenbsd-compat/  -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lz  -lcrypt
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -o regress/netcat regress/netcat.c \
-L. -Lopenbsd-compat/  -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lz  -lcrypt
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/tests.c -o regress/unittests/sshbuf/tests.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf.c -o regress/unittests/sshbuf/test_sshbuf.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_getput_basic.c -o regress/unittests/sshbuf/test_sshbuf_getput_basic.o
    1500-030: (I) INFORMATION: sshbuf_getput_basic_tests: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_getput_crypto.c -o regress/unittests/sshbuf/test_sshbuf_getput_crypto.o
    1500-030: (I) INFORMATION: sshbuf_getput_crypto_tests: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_misc.c -o regress/unittests/sshbuf/test_sshbuf_misc.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_fuzz.c -o regress/unittests/sshbuf/test_sshbuf_fuzz.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c -o regress/unittests/sshbuf/test_sshbuf_getput_fuzz.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/sshbuf/test_sshbuf_fixed.c -o regress/unittests/sshbuf/test_sshbuf_fixed.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/test_helper/test_helper.c -o regress/unittests/test_helper/test_helper.o
xlc -I/opt/include -I/opt/buildaix/include -O2  -I. -I. -I/opt/include -DSSHDIR=\"/var/openssh/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/opt/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/opt/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/openssh/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c regress/unittests/test_helper/fuzz.c -o regress/unittests/test_helper/fuzz.o
ar rv regress/unittests/test_helper/libtest_helper.a regress/unittests/test_helper/test_helper.o regress/unittests/test_helper/fuzz.o
ar: Creating an archive file regress/unittests/test_helper/libtest_helper.a.
a - regress/unittests/test_helper/test_helper.o
a - regress/unittests/test_helper/fuzz.o
ranlib regress/unittests/test_helper/libtest_helper.a
xlc -o regress/unittests/sshbuf/test_sshbuf -L. -Lopenbsd-compat/  -blibpath:/usr/lib:/lib regress/unittests/sshbuf/tests.o regress/unittests/sshbuf/test_sshbuf.o regress/unittests/sshbuf/test_sshbuf_getput_basic.o regress/unittests/sshbuf/test_sshbuf_getput_crypto.o regress/unittests/sshbuf/test_sshbuf_misc.o regress/unittests/sshbuf/test_sshbuf_fuzz.o regress/unittests/sshbuf/test_sshbuf_getput_fuzz.o regress/unittests/sshbuf/test_sshbuf_fixed.o \
    regress/unittests/test_helper/libtest_helper.a \
    -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lz  -lcrypt
ld: 0711-317 ERROR: Undefined symbol: .BN_hex2bn
ld: 0711-317 ERROR: Undefined symbol: .BN_num_bits
ld: 0711-317 ERROR: Undefined symbol: .BN_bn2bin
ld: 0711-317 ERROR: Undefined symbol: .BN_bin2bn
ld: 0711-317 ERROR: Undefined symbol: .BN_free
ld: 0711-317 ERROR: Undefined symbol: .BN_new
ld: 0711-317 ERROR: Undefined symbol: .BN_clear_free
ld: 0711-317 ERROR: Undefined symbol: .BN_cmp
ld: 0711-317 ERROR: Undefined symbol: .BN_bn2hex
ld: 0711-317 ERROR: Undefined symbol: .ERR_get_error
ld: 0711-317 ERROR: Undefined symbol: .ERR_error_string
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: *** [regress/unittests/sshbuf/test_sshbuf] Error 8
root@x064:[/data/prj/openbsd/openssh/snap/openssh]
Comment 6 Damien Miller 2015-08-12 11:00:43 AEST
Move unfinished bugs from 6.9 (how did I miss these?) to 7.1
Comment 7 Damien Miller 2016-02-26 14:29:56 AEDT
The endian.h fix is committed. The regress tests aren't working for --without-openssl builds at the moment, that's a separate and known problem.
Comment 8 Damien Miller 2016-08-02 10:40:44 AEST
Close all resolved bugs after 7.3p1 release