Date: Sun, 17 Oct 2021 15:06:28 -0700 From: Mark Millard via freebsd-toolchain <freebsd-toolchain@freebsd.org> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-ports@freebsd.org Cc: Bryan Drewery <bdrewery@FreeBSD.org> Subject: Re: poudriere-devel-3.3.99.20211015 fails to build in my aarch64&armv7 environments (built on amd64 just fine) Message-ID: <9591B62A-C72F-4981-8154-1011A1EC1C25@yahoo.com> In-Reply-To: <8CEAB104-2BBA-4466-ADEA-6393CCDBBD74@yahoo.com> References: <1CB8D29B-9753-4090-B5FF-1CDA4905DAA3.ref@yahoo.com> <1CB8D29B-9753-4090-B5FF-1CDA4905DAA3@yahoo.com> <6C559A82-1557-45CD-A920-BE4494B82597@yahoo.com> <8CEAB104-2BBA-4466-ADEA-6393CCDBBD74@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-Oct-17, at 11:19, Mark Millard <marklmi@yahoo.com> wrote: > On 2021-Oct-16, at 23:41, Mark Millard <marklmi at yahoo.com> wrote: >=20 > On 2021-Oct-16, at 19:20, Mark Millard via freebsd-toolchain = <freebsd-toolchain@freebsd.org> wrote: >>=20 >>=20 >>> [00:00:45] [06] [00:00:18] Saving ports-mgmt/poudriere-devel | = poudriere-devel-3.3.99.20211015 wrkdir >>> [00:00:49] [06] [00:00:22] Saved ports-mgmt/poudriere-devel | = poudriere-devel-3.3.99.20211015 wrkdir to: = /usr/local/poudriere/data/wrkdirs/13_0R-CA72-default/default/poudriere-dev= el-3.3.99.20211015.tbz >>>=20 >>> Log: >>>=20 >>> . . . >>> --- src/libexec/poudriere/pwait/sh-pwait.o --- >>> cc -DHAVE_CONFIG_H -I. -I./src -mcpu=3Dcortex-a72 -Wall -pipe -O2 = -Wno-extra -DSHELL -std=3Dgnu99 -DVTABSIZE=3D1000 -DNO_HISTORY = -Wno-unused-const-variable -include ./external/sh_compat/compat.h -I./s >>> rc -I./external/sh -I./src/poudriere-sh -I./src/poudriere-sh -O2 = -pipe -mcpu=3Dcortex-a72 -g -fstack-protector-strong = -fno-strict-aliasing -MT src/libexec/poudriere/pwait/sh-pwait.o -MD -MP = -MF src/l >>> ibexec/poudriere/pwait/.deps/sh-pwait.Tpo -c -o = src/libexec/poudriere/pwait/sh-pwait.o `test -f = 'src/libexec/poudriere/pwait/pwait.c' || echo = './'`src/libexec/poudriere/pwait/pwait.c >>> . . . >>> --- src/libexec/poudriere/pwait/sh-pwait.o --- >>> src/libexec/poudriere/pwait/pwait.c:62:2: error: passing 'void *' to = parameter of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(EX_USAGE); >>> ^~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:40:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' >>> #define NULL ((void *)0) >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:104:49: note: passing argument to = parameter here >>> void verrorwithstatus(int, const char *, va_list) __printf0like(2, = 0) __dead2; >>> ^ >>> src/libexec/poudriere/pwait/pwait.c:205:5: error: passing 'void *' = to parameter of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(EX_OK); >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:41:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' >>> #define NULL ((void *)0) >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:104:49: note: passing argument to = parameter here >>> void verrorwithstatus(int, const char *, va_list) __printf0like(2, = 0) __dead2; >>> ^ >>> src/libexec/poudriere/pwait/pwait.c:275:5: error: passing 'void *' = to parameter of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(124); >>> ^~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:42:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' >>> #define NULL ((void *)0) >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:104:49: note: passing argument to = parameter here >>> void verrorwithstatus(int, const char *, va_list) __printf0like(2, = 0) __dead2; >>> ^ >>> src/libexec/poudriere/pwait/pwait.c:303:5: error: passing 'void *' = to parameter of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(EX_OK); >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:43:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' >>> #define NULL ((void *)0) >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:104:49: note: passing argument to = parameter here >>> void verrorwithstatus(int, const char *, va_list) __printf0like(2, = 0) __dead2; >>> ^ >>> src/libexec/poudriere/pwait/pwait.c:319:2: error: passing 'void *' = to parameter of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(EX_OK); >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:44:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> . . . >>>=20 >>>=20 >>> --- src/poudriere-sh/sh-mkdir.o --- >>> cc -DHAVE_CONFIG_H -I. -I./src -mcpu=3Dcortex-a72 -Wall -pipe -O2 = -Wno-extra -DSHELL -std=3Dgnu99 -DVTABSIZE=3D1000 -DNO_HISTORY = -Wno-unused-const-variable -include ./external/sh_compat/compat.h = -I./src -I./external/sh -I./src/poudriere-sh -I./src/poudriere-sh -O2 = -pipe -mcpu=3Dcortex-a72 -g -fstack-protector-strong = -fno-strict-aliasing -MT src/poudriere-sh/sh-mkdir.o -MD -MP -MF = src/poudriere-sh/.deps/sh-mkdir.Tpo -c -o src/poudriere-sh/sh-mkdir.o = `test -f 'src/poudriere-sh/mkdir.c' || echo = './'`src/poudriere-sh/mkdir.c >>> . . . >>> --- src/poudriere-sh/sh-mkdir.o --- >>> src/poudriere-sh/mkdir.c:139:2: error: passing 'void *' to parameter = of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit(exitval); >>> ^~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:46:1: note: expanded from here >>> exit_1 >>> ^ >>> ./src/poudriere-sh/helpers.h:110:58: note: expanded from macro = 'exit_1' >>> #define exit_1(_, status) verrorwithstatus(status, NULL, NULL) >>> ^~~~ >>> /usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL' >>> #define NULL ((void *)0) >>> ^~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:104:49: note: passing argument to = parameter here >>> void verrorwithstatus(int, const char *, va_list) __printf0like(2, = 0) __dead2; >>> ^ >>> src/poudriere-sh/mkdir.c:226:2: error: passing 'void *' to parameter = of incompatible type 'va_list' (aka '__builtin_va_list') >>> exit (EX_USAGE); >>> ^~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:106:20: note: expanded from macro = 'exit' >>> #define exit(...) exit_(_, ##__VA_ARGS__) >>> ^~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:107:21: note: expanded from macro = 'exit_' >>> #define exit_(...) exit_X(__VA_ARGS__, _1, = _0)(__VA_ARGS__) >>> = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> ./src/poudriere-sh/helpers.h:108:32: note: expanded from macro = 'exit_X' >>> #define exit_X(_0, _1, X, ...) exit ## X >>> ^ >>> <scratch space>:47:1: note: expanded from here >>> exit_1 >>> . . . >>>=20 >>> I'll not list the rest. >>=20 >> I'll note that https://developer.arm.com/documentation/ihi0055/d/ = reports >> that va_list is based on: >>=20 >> struct __va_list { >> void *__stack; >> void *__gr_top; >> void *__vr_top; >> int __gr_offs; >> int __vr_offs; >> } >>=20 >> so NULL is not type compatible for aarch64. >>=20 >> My guess is an empty va_list needs to be created and used >> instead of NULL, following the normal va_list protocol. This >> should avoid presumptions about aspects that the language >> standard does not specify. >>=20 >=20 >=20 > My armv7 contexts fail similarly. >=20 > https://developer.arm.com/documentation/ihi0042/latest >=20 > indicates that the va_list typedef is for: >=20 > struct __va_list {void *__ap;} >=20 > So, again, NULL it not type compatible. >=20 [Bryan has seen a variation of this material via comments on github.] poudriere-devel was later updated to avoid the type compatibility. But the update does not follow the va_list protocol in that it does initialization of a va_list via =3D{} to supposedly form an empty va_list. The =3D{} is not guaranteed by the language (C99+, say) to assign the same va_list content as va_start would for an empty match to a routine's ... in its parameter list. It looks to be that va_start is the only langauge-definition supported form of initialization of a va_list (and that va_end is required to close out such an initialized va_list). So the likes of: git: 14e5e1370ddb - main - ports-mgmt/poudriere-devel: Update to = 3.3.0-1020-g59a87677c Bryan Drewery and: git: 4116dc2f1f63 - main - ports-mgmt/poudriere-devel: Update to = 3.3.0-1022-g964cf327f Bryan Drewery=20 may not prove sufficient in general, although it may well "work" for amd64 where NULL happened to be compatible with va_list as far as types go. I do not claim a known operational failure elsewhere, just going outside what the langauge guarantees for source code to be guaranteed work for a correct language implementation. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9591B62A-C72F-4981-8154-1011A1EC1C25>