On Mon, Feb 23, 2015 at 04:17:37PM -0800, Kevin Brott wrote:> Hrm - must have been a timing issue or my user error. In any case, just > pulled the latest commits ... > > *AIX 6.1/7.1 now fails here:* > *...* > xlc_r -O2 -qarch=ppc -qalloca -I/usr/include > -I/opt/freeware/include -I. -I. -O2 -qarch=ppc -qalloca -I/usr/include > -I/opt/freeware/include -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 packet.c -o packet.o > "/usr/include/openssl/objects.h", line 1009.31: 1506-275 (S) Unexpected > text free_func encountered. > make: 1254-004 The error code from the last command is 1.I also ran into this on old GCCs. It seems to be related to include orders although I don't understand why. On a hunch I tried this which seems to fix it for me, but again I don't understand why... Does it also help for you? diff --git a/packet.c b/packet.c index b1219c8..b15f02f 100644 --- a/packet.c +++ b/packet.c @@ -51,6 +51,8 @@ #include <netinet/ip.h> #include <arpa/inet.h> +#include <openssl/objects.h> + #include <errno.h> #include <stdarg.h> #include <stdio.h> -- 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.
Yup - that cleared that hurdle ... now it dies here on AIX: xlc_r -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include -I. -I. -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include -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/usr/lib -L/usr/ccs/lib -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lcrypto -lz -lpthread "./regress/netcat.c", line 47.10: 1506-296 (S) #include file <err.h> not found. "./regress/netcat.c", line 1334.10: 1506-296 (S) #include file <err.h> not found. make: 1254-004 The error code from the last command is 1. Is this looking for openssl's err.h or something else? if the former, shouldn't this be <openssl/err.h>, if the latter - not on this OS. On Mon, Feb 23, 2015 at 4:28 PM, Darren Tucker <dtucker at zip.com.au> wrote:> On Mon, Feb 23, 2015 at 04:17:37PM -0800, Kevin Brott wrote: > > Hrm - must have been a timing issue or my user error. In any case, just > > pulled the latest commits ... > > > > *AIX 6.1/7.1 now fails here:* > > *...* > > xlc_r -O2 -qarch=ppc -qalloca -I/usr/include > > -I/opt/freeware/include -I. -I. -O2 -qarch=ppc -qalloca -I/usr/include > > -I/opt/freeware/include -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 packet.c -o packet.o > > "/usr/include/openssl/objects.h", line 1009.31: 1506-275 (S) Unexpected > > text free_func encountered. > > make: 1254-004 The error code from the last command is 1. > > I also ran into this on old GCCs. It seems to be related to include > orders although I don't understand why. On a hunch I tried this which > seems to fix it for me, but again I don't understand why... > > Does it also help for you? > > diff --git a/packet.c b/packet.c > index b1219c8..b15f02f 100644 > --- a/packet.c > +++ b/packet.c > @@ -51,6 +51,8 @@ > #include <netinet/ip.h> > #include <arpa/inet.h> > > +#include <openssl/objects.h> > + > #include <errno.h> > #include <stdarg.h> > #include <stdio.h> > > -- > 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. >-- # include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott at gmail.com> */
On Mon, 23 Feb 2015, Kevin Brott wrote:> > Yup - that cleared that hurdle ... now it dies here on AIX: > > xlc_r -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include > -I. -I. -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include > -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/usr/lib -L/usr/ccs/lib -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat > -lssh -lopenbsd-compat -lcrypto -lz -lpthread > "./regress/netcat.c", line 47.10: 1506-296 (S) #include file <err.h> not > found. > "./regress/netcat.c", line 1334.10: 1506-296 (S) #include file <err.h> not > found. > make: 1254-004 The error code from the last command is 1. > > Is this looking for openssl's err.h or something else? if the former, > shouldn't this be <openssl/err.h>, if the latter - not on this OS.This should fix it: diff --git a/regress/netcat.c b/regress/netcat.c index 84efe11..4b8c51c 100644 --- a/regress/netcat.c +++ b/regress/netcat.c @@ -44,7 +44,6 @@ #include <netinet/ip.h> #include <arpa/telnet.h> -#include <err.h> #include <errno.h> #include <netdb.h> #include <poll.h> @@ -122,6 +121,47 @@ void usage(int); ssize_t drainbuf(int, unsigned char *, size_t *); ssize_t fillbuf(int, unsigned char *, size_t *); +static void err(int, const char *, ...) __attribute__((format(printf, 2, 3))); +static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3))); +static void warn(const char *, ...) __attribute__((format(printf, 1, 2))); + +static void +err(int r, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + fprintf(stderr, "%s: ", strerror(errno)); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); + exit(r); +} + +static void +errx(int r, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); + exit(r); +} + +static void +warn(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + fprintf(stderr, "%s: ", strerror(errno)); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); +} + int main(int argc, char *argv[]) {