HP-UX 11.23/11.31 build failures OS Build_Target CC OpenSSL BUILD TEST ============== =========================== ============================ ====== ================HP-UX 11.23 ia64-hp-hpux11.23 C/aC++ C.11.23.12 0.9.8zb *F1 HP-UX 11.23 ia64-hp-hpux11.23 gcc 4.3.1 0.9.8zb *F2 HP-UX 11.31 ia64-hp-hpux11.31 C/aC++ C.11.31.05 0.9.8zb *F1 HP-UX 11.31 ia64-hp-hpux11.31 gcc 4.6.2 0.9.8zb *F2 *F1 cc Build fails here: cc -O2 -Ae -I. -I. -I/opt/phs/include -I/opt/gnome/include -I/usr/include -I/opt/gtk2.6/include -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -DSSHDIR=\"/usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c cipher-aesctr.c -o cipher-aesctr.o "cipher-aesctr.c", line 30: warning #2260-D: explicit type is missing ("int" assumed) static inline void ^ "cipher-aesctr.c", line 30: error #2065: expected a ";" static inline void ^ At end of source: warning #2012-D: parsing restarts here after previous syntax error 1 error detected in the compilation of "cipher-aesctr. make: *** [cipher-aesctr.o] Error 2 *F2 gcc Build fails here: gcc -O2 -mtune=itanium2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -std=gnu99 -I. -I. -O2 -mtune=itanium2 -pipe -I/opt/phs/include -I/usr/local/include -I/opt/hp-gcc/include -I/opt/gtk2.6/include -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -DSSHDIR=\"/usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -o regress/netcat regress/netcat.c \ nbsd-compat/ -L/opt/phs/lib -L/usr/local/lib -L/opt/hp-gcc/lib -L/usr/lib/hpux32 -L/opt/gtk2.6/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lcrypto -lz -lnsl -lxnet -lsec regress/netcat.c: In function 'socks_connect': regress/netcat.c:1470: warning: 'wlen' may be used uninitialized in this function ld: Unsatisfied symbol "xstrdup" in file openbsd-compat//libopenbsd-compat.a[bsd-misc.o] 1 errors. collect2: ld returned 1 exit status make: *** [regress/netcat] Error 1 -- # include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott at gmail.com> */
On Tue, Feb 24, 2015 at 3:11 PM, Kevin Brott <kevin.brott at gmail.com> wrote:> [...] > "cipher-aesctr.c", line 30: warning #2260-D: explicit type is missing > ("int" assumed) > static inline void >does replacing "inline" with "__inline__" work? Failing that, removing inline entirely? ld: Unsatisfied symbol "xstrdup" in file> openbsd-compat//libopenbsd-compat.a[bsd-misc.o] > 1 errors. >That one looks like a link order problem. Unfortunately, given that it already has "-lssh -lopenbsd-compat -lssh -lopenbsd-compat" we seem to just be digging the hole deeper... -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote:> ld: Unsatisfied symbol "xstrdup" in file > openbsd-compat//libopenbsd-compat.a[bsd-misc.o]How about removing the dependency on xmalloc? eg (untested): diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 65e8003..40efc87 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -31,8 +31,6 @@ #include <time.h> #include <unistd.h> -#include "xmalloc.h" - #ifndef HAVE___PROGNAME char *__progname; #endif @@ -43,13 +41,12 @@ char *__progname; */ char *ssh_get_progname(char *argv0) { + char *p, *q; #ifdef HAVE___PROGNAME extern char *__progname; - return xstrdup(__progname); + p = progname; #else - char *p; - if (argv0 == NULL) return ("unknown"); /* XXX */ p = strrchr(argv0, '/'); @@ -57,9 +54,12 @@ char *ssh_get_progname(char *argv0) p = argv0; else p++; - - return (xstrdup(p)); #endif + if ((q = strdup(p)) == NULL) { + perror("strdup"); + exit(1); + } + return q; } #ifndef HAVE_SETLOGIN -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Wed, 25 Feb 2015, Darren Tucker wrote:> On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote: > > ld: Unsatisfied symbol "xstrdup" in file > > openbsd-compat//libopenbsd-compat.a[bsd-misc.o] > > How about removing the dependency on xmalloc? eg (untested):fine by me
On Wed, Feb 25, 2015 at 09:04:57AM +1100, Darren Tucker wrote:> On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote: > > ld: Unsatisfied symbol "xstrdup" in file > > openbsd-compat//libopenbsd-compat.a[bsd-misc.o] > > How about removing the dependency on xmalloc? eg (untested):Shoulda tested it. Now one that will compile: diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 65e8003..40efc87 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -31,8 +31,6 @@ #include <time.h> #include <unistd.h> -#include "xmalloc.h" - #ifndef HAVE___PROGNAME char *__progname; #endif @@ -43,13 +41,12 @@ char *__progname; */ char *ssh_get_progname(char *argv0) { + char *p, *q; #ifdef HAVE___PROGNAME extern char *__progname; - return xstrdup(__progname); + p = progname; #else - char *p; - if (argv0 == NULL) return ("unknown"); /* XXX */ p = strrchr(argv0, '/'); @@ -57,9 +54,12 @@ char *ssh_get_progname(char *argv0) p = argv0; else p++; - - return (xstrdup(p)); #endif + if ((q = strdup(p)) == NULL) { + perror("strdup"); + exit(1); + } + return q; } #ifndef HAVE_SETLOGIN -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Tue, Feb 24, 2015 at 1:43 PM, Darren Tucker <dtucker at zip.com.au> wrote:> On Tue, Feb 24, 2015 at 3:11 PM, Kevin Brott <kevin.brott at gmail.com> > wrote: > >> [...] >> "cipher-aesctr.c", line 30: warning #2260-D: explicit type is missing >> ("int" assumed) >> static inline void >> > > does replacing "inline" with "__inline__" work? Failing that, removing > inline entirely? >Using __inline__ fails the same way, but removing it entirely moves on past that to this: cc -O2 -Ae -I. -I. -I/opt/phs/include -I/opt/gnome/include -I/usr/include -I/opt/gtk2.6/include -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -DSSHDIR=\"/usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -o regress/netcat regress/netcat.c \ -L. -Lopenbsd-compat/ -L/opt/phs/lib -L/opt/phs/lib/hpux32 -L/opt/gnome/lib -L/usr/lib -L/usr/lib/hpux32 -L/opt/gtk2.6/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lcrypto -lz -lnsl -lxnet -lsec "/usr/include/sys/signal.h", line 465: warning #2047-D: incompatible redefinition of macro "_NSIG" (declared at line 828 of "./defines.h") # define _NSIG 45 ^ "regress/netcat.c", line 1613: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" r = snprintf(buf, sizeof(buf), ^ "regress/netcat.c", line 1617: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" r = snprintf(buf, sizeof(buf), ^ "regress/netcat.c", line 1623: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" r = strlen(buf); ^ "regress/netcat.c", line 1633: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" r = snprintf(buf, sizeof(buf), "%s:%s", ^ "regress/netcat.c", line 1636: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" b64_ntop(buf, strlen(buf), resp, ^ "regress/netcat.c", line 1639: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" r = snprintf(buf, sizeof(buf), "Proxy-Authorization: " ^ "regress/netcat.c", line 1643: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" r = strlen(buf); ^ "regress/netcat.c", line 1653: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" proxy_read_line(proxyfd, buf, sizeof(buf)); ^ "regress/netcat.c", line 1655: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" strncmp(buf, "HTTP/1.0 407 ", 12) == 0) { ^ "regress/netcat.c", line 1662: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" } else if (strncmp(buf, "HTTP/1.0 200 ", 12) != 0 && ^ "regress/netcat.c", line 1663: warning #4212-D: mismatch between character pointer types "unsigned char *" and "const char *" strncmp(buf, "HTTP/1.1 200 ", 12) != 0) ^ "regress/netcat.c", line 1668: warning #4212-D: mismatch between character pointer types "unsigned char *" and "char *" proxy_read_line(proxyfd, buf, sizeof(buf)); ^ ld: Unsatisfied symbol "ntohs" in file netcat.o ld: Unsatisfied symbol "xstrdup" in file openbsd-compat//libopenbsd-compat.a[bsd-misc.o] 2 errors. make: *** [regress/netcat] Error 1 -- # include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott at gmail.com> */
On Tue, 24 Feb 2015, Darren Tucker wrote: | On Tue, Feb 24, 2015 at 3:11 PM, Kevin Brott <kevin.brott at gmail.com> wrote: | | > [...] | > "cipher-aesctr.c", line 30: warning #2260-D: explicit type is missing | > ("int" assumed) | > static inline void | > | | does replacing "inline" with "__inline__" work? Failing that, removing | inline entirely? I just changed __inline__ to inline so we don't want to go that direction. We already use "static inline void" in openbsd-compat/arc4random.c. Puzzling. | ld: Unsatisfied symbol "xstrdup" in file | > openbsd-compat//libopenbsd-compat.a[bsd-misc.o] | > 1 errors. | > | | That one looks like a link order problem. Unfortunately, given that it | already has "-lssh -lopenbsd-compat -lssh -lopenbsd-compat" we seem to just | be digging the hole deeper... Makfile.in has been updated for this. Kevin, add another -lssh after the last -lopenbsd-compat in your Makefile for the netcat rule. -- Tim Rice Multitalents tim at multitalents.net