NetBSD Problem Report #59302
From tls@panix.com Wed Apr 16 13:18:58 2025
Return-Path: <tls@panix.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A73721A9239
for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 Apr 2025 13:18:58 +0000 (UTC)
Message-Id: <4Zd1nV5T9LzfYm@panix5.panix.com>
Date: Wed, 16 Apr 2025 09:18:54 -0400 (EDT)
From: tls@panix.com
Reply-To: tls@panix.com
To: gnats-bugs@NetBSD.org
Subject: NetBSD-10 cross build from Linux blows up in postfix
X-Send-Pr-Version: 3.95
>Number: 59302
>Category: toolchain
>Synopsis: Cannot build system in /home/tls due to dumb Postfix awk file
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: pending-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 16 13:20:00 +0000 2025
>Closed-Date:
>Last-Modified: Fri Apr 18 13:28:50 +0000 2025
>Originator: Thor Lancelot Simon
>Release: NetBSD 10.1-STABLE extracted from tar files at http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-10/202504090250Z/source/sets/
>Organization:
The NetBSD Foundation, Inc.
>Environment:
The host system is an amd64 virtual machine in Google Cloud running Debian Linux
11.11 with a Linux 6.1.128 kernel. The host compiler is GCC 10.2.1; sources
and objects are on a local XFS filesystem.
>Description:
See (excerpted) build log below. Full build log is at https://drive.google.com/file/d/1XrlRGXEjR8RLu8U9ZaN77RUG8TWDl6LG/view?usp=sharing
===> build.sh command: ./build.sh -D /home/tls/NB/destdir -O
/home/tls/NB/objdir -R /home/tls/NB/releasedir -U -u -m alpha tools release
===> build.sh started: Tue Apr 15 23:52:41 UTC 2025
===> NetBSD version: 10.1_STABLE
===> MACHINE: alpha
===> MACHINE_ARCH: alpha
===> Build platform: Linux 6.1.128-ts1-amd64 x86_64
===> HOST_SH: /usr/bin/sh
===> No $TOOLDIR/bin/nbmake, needs building.
===> Bootstrapping nbmake
checking for sh... /usr/bin/sh
checking for gcc... cc
[...]
# create postconf/postconf_user.d
CC=/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/alpha--netbsd-gcc
/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/nbmkdep -f
postconf_user.d.tmp -- -std=gnu99 -Werror --sysroot=/home/tls/NB/destdir
-I. -DNETBSD7 -DUSE_SASL_AUTH -DNO_EAI
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/dns
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/global
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/master
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/util
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/tls
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/milter
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/xsasl -Wno-comment
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_SASLC_SASL
-DDEF_CLIENT_SASL_TYPE=\"saslc\" -DUSE_TLS -DHAS_SQLITE -DHAS_LDAP
-DDEF_HTML_DIR=\"/usr/share/doc/reference/ref8/postfix\"
-DDEF_README_DIR=\"/usr/share/examples/postfix\"
-DDEF_SAMPLE_DIR=\"/usr/share/examples/postfix\"
-DDEF_MANPAGE_DIR=\"/usr/share/man\"
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_user.c
&& mv -f postconf_user.d.tmp postconf_user.d
# create postconf/.depend
rm -f .depend
CC=/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/alpha--netbsd-gcc
/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/nbmkdep -s .o\
.ln\ .d -d -f .depend postconf.d postconf_builtin.d postconf_dbms.d
postconf_edit.d postconf_lookup.d postconf_main.d postconf_master.d
postconf_match.d postconf_misc.d postconf_node.d postconf_other.d
postconf_print.d postconf_service.d postconf_unused.d postconf_user.d
rm -f .gdbinit
echo "set solib-absolute-prefix /home/tls/NB/destdir" > .gdbinit
# compile postconf/postconf.o
/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/alpha--netbsd-gcc
-O2 -fcommon -std=gnu99 -Werror -mieee
--sysroot=/home/tls/NB/destdir -I. -DNETBSD7 -DUSE_SASL_AUTH -DNO_EAI
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/dns
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/global
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/master
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/util
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/tls
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/milter
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/xsasl -Wno-comment
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_SASLC_SASL
-DDEF_CLIENT_SASL_TYPE=\"saslc\" -DUSE_TLS -DHAS_SQLITE -DHAS_LDAP
-DDEF_HTML_DIR=\"/usr/share/doc/reference/ref8/postfix\"
-DDEF_README_DIR=\"/usr/share/examples/postfix\"
-DDEF_SAMPLE_DIR=\"/usr/share/examples/postfix\"
-DDEF_MANPAGE_DIR=\"/usr/share/man\" -c
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf.c -o
postconf.o
# compile postconf/postconf_builtin.o
# compile postconf/postconf_builtin.o
/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/alpha--netbsd-gcc
-O2 -fcommon -std=gnu99 -Werror -mieee
--sysroot=/home/tls/NB/destdir -I. -DNETBSD7 -DUSE_SASL_AUTH -DNO_EAI
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/dns
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/global
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/master
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/util
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/tls
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/milter
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/xsasl -Wno-comment
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_SASLC_SASL
-DDEF_CLIENT_SASL_TYPE=\"saslc\" -DUSE_TLS -DHAS_SQLITE -DHAS_LDAP
-DDEF_HTML_DIR=\"/usr/share/doc/reference/ref8/postfix\"
-DDEF_README_DIR=\"/usr/share/examples/postfix\"
-DDEF_SAMPLE_DIR=\"/usr/share/examples/postfix\"
-DDEF_MANPAGE_DIR=\"/usr/share/man\" -c
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_builtin.c
-o postconf_builtin.o
In file included from
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_builtin.c:98:
./time_table.h:15:45: error: 'var_queue_run_delay' undeclared here (not in a
function)
15 | VAR_QUEUE_RUN_DELAY, DEF_QUEUE_RUN_DELAY, &var_queue_run_delay, 1, 0,
| ^~~~~~~~~~~~~~~~~~~
./time_table.h:107:53: error: 'var_tls_prng_exch_period' undeclared here (not
in a function); did you mean 'var_tls_prng_upd_period'?
107 | VAR_TLS_PRNG_UPD_PERIOD, DEF_TLS_PRNG_UPD_PERIOD,
&var_tls_prng_exch_period, 1, 0,
|
^~~~~~~~~~~~~~~~~~~~~~~~
|
var_tls_prng_upd_period
In file included from
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_builtin.c:103:
./bool_table.h:14:55: error: 'var_smtpd_forbid_bare_lf' undeclared here (not
in a function); did you mean 'var_smtpd_forbid_cmds'?
14 | VAR_SMTPD_FORBID_BARE_LF, DEF_SMTPD_FORBID_BARE_LF,
&var_smtpd_forbid_bare_lf,
|
^~~~~~~~~~~~~~~~~~~~~~~~
|
var_smtpd_forbid_cmds
In file included from
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_builtin.c:113:
./str_table.h:10:65: error: 'var_smtpd_forbid_bare_lf_excl' undeclared here
(not in a function)
10 | VAR_SMTPD_FORBID_BARE_LF_EXCL, DEF_SMTPD_FORBID_BARE_LF_EXCL,
&var_smtpd_forbid_bare_lf_excl, 0, 0,
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./str_table.h:31:41: error: 'var_newalias_path' undeclared here (not in a
function); did you mean 'var_alias_maps'?
31 | VAR_NEWALIAS_PATH, DEF_NEWALIAS_PATH, &var_newalias_path, 1, 0,
| ^~~~~~~~~~~~~~~~~
| var_alias_maps
./str_table.h:35:49: error: 'var_psc_dnlist_action' undeclared here (not in a
function); did you mean 'var_psc_dnsbl_action'?
35 | VAR_PSC_DNLIST_ACTION, DEF_PSC_DNLIST_ACTION, &var_psc_dnlist_action,
1, 0,
| ^~~~~~~~~~~~~~~~~~~~~
| var_psc_dnsbl_action
./str_table.h:49:31: error: 'var_html_dir' undeclared here (not in a
function); did you mean 'var_meta_dir'?
49 | VAR_HTML_DIR, DEF_HTML_DIR, &var_html_dir, 1, 0,
| ^~~~~~~~~~~~
| var_meta_dir
./str_table.h:116:35: error: 'var_readme_dir' undeclared here (not in a
function); did you mean 'var_meta_dir'?
116 | VAR_README_DIR, DEF_README_DIR, &var_readme_dir, 1, 0,
| ^~~~~~~~~~~~~~
| var_meta_dir
./str_table.h:133:39: error: 'var_input_transp' undeclared here (not in a
function); did you mean 'var_smtpd_input_transp'?
133 | VAR_INPUT_TRANSP, DEF_INPUT_TRANSP, &var_input_transp, 0, 0,
| ^~~~~~~~~~~~~~~~
| var_smtpd_input_transp
./str_table.h:154:37: error: 'var_manpage_dir' undeclared here (not in a
function); did you mean 'var_meta_dir'?
154 | VAR_MANPAGE_DIR, DEF_MANPAGE_DIR, &var_manpage_dir, 1, 0,
| ^~~~~~~~~~~~~~~
| var_meta_dir
./str_table.h:194:35: error: 'var_mailq_path' undeclared here (not in a
function); did you mean 'var_mail_name'?
194 | VAR_MAILQ_PATH, DEF_MAILQ_PATH, &var_mailq_path, 1, 0,
| ^~~~~~~~~~~~~~
| var_mail_name
./str_table.h:198:55: error: 'var_local_login_snd_maps' undeclared here (not
in a function); did you mean 'var_local_login_snd__maps'?
198 | VAR_LOCAL_LOGIN_SND_MAPS, DEF_LOCAL_LOGIN_SND_MAPS,
&var_local_login_snd_maps, 0, 0,
|
^~~~~~~~~~~~~~~~~~~~~~~~
|
var_local_login_snd__maps
./str_table.h:201:35: error: 'var_sample_dir' undeclared here (not in a
function); did you mean 'var_meta_dir'?
201 | VAR_SAMPLE_DIR, DEF_SAMPLE_DIR, &var_sample_dir, 1, 0,
| ^~~~~~~~~~~~~~
| var_meta_dir
./str_table.h:255:41: error: 'var_sendmail_path' undeclared here (not in a
function)
255 | VAR_SENDMAIL_PATH, DEF_SENDMAIL_PATH, &var_sendmail_path, 1, 0,
| ^~~~~~~~~~~~~~~~~
./str_table.h:376:61: error: 'var_vrfy_snd_def_xport_maps' undeclared here
(not in a function); did you mean 'var_snd_def_xport_maps'?
376 | VAR_VRFY_SND_DEF_XPORT_MAPS, DEF_VRFY_SND_DEF_XPORT_MAPS,
&var_vrfy_snd_def_xport_maps, 0, 0,
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
var_snd_def_xport_maps
*** Failed target: postconf_builtin.o
*** Failed command:
/home/tls/NB/objdir/tooldir.Linux-6.1.128-ts1-amd64-x86_64/bin/alpha--netbsd-gcc
-O2 -fcommon -std=gnu99 -Werror -mieee --sysroot=/home/tls/NB/destdir -I.
-DNETBSD7 -DUSE_SASL_AUTH -DNO_EAI
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/dns
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/global
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/master
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/util
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/tls
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/milter
-I/home/tls/NB/src/external/ibm-public/postfix/dist/src/xsasl -Wno-comment
-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_SASLC_SASL
-DDEF_CLIENT_SASL_TYPE=\"saslc\" -DUSE_TLS -DHAS_SQLITE -DHAS_LDAP
-DDEF_HTML_DIR=\"/usr/share/doc/reference/ref8/postfix\"
-DDEF_README_DIR=\"/usr/share/examples/postfix\"
-DDEF_SAMPLE_DIR=\"/usr/share/examples/postfix\"
-DDEF_MANPAGE_DIR=\"/usr/share/man\" -c
/home/tls/NB/src/external/ibm-public/postfix/dist/src/postconf/postconf_builtin.c
-o postconf_builtin.o
*** Error code 1
Stop.
nbmake[10]: stopped in
/home/tls/NB/src/external/ibm-public/postfix/sbin/postconf
>How-To-Repeat:
On a Debian 11 system, with default system version of "gcc", try to do a
build.sh -U -u -m alpha tools release, wait a while, and watch the fireworks.
>Fix:
Not known.
>Release-Note:
>Audit-Trail:
From: Thor Lancelot Simon <tls@panix.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/59302: NetBSD-10 cross build from Linux blows up in
postfix
Date: Wed, 16 Apr 2025 12:51:45 -0400
A non-update build log from a single-threaded build is now at
https://drive.google.com/file/d/1dbmjVfvcxO87r-td1AoB2WKMtHHPiuMJ/view?usp=sharing
This build exhibits the same problem, but, this new build log
might make it a little easier to see _how_ the problem arises (in
particular, we may be able to use it to figure out whether, and if so
how, the generated postfix header files are going wrong).
From: Thor Lancelot Simon <tls@panix.com>
To: gnats-bugs@netbsd.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: toolchain/59302: NetBSD-10 cross build from Linux blows up in
postfix
Date: Wed, 16 Apr 2025 12:58:30 -0400
And... it appears several generated header files in the "postconf"
object directory are length 0, which is obviously the proximate cause
of the issue. How they ended up empty, we will have to figure out.
tls@cb5:~/NB/objdir/external/ibm-public/postfix/sbin/postconf$ pwd
/home/tls/NB/objdir/external/ibm-public/postfix/sbin/postconf
tls@cb5:~/NB/objdir/external/ibm-public/postfix/sbin/postconf$ cat time_vars.h
tls@cb5:~/NB/objdir/external/ibm-public/postfix/sbin/postconf$ ls -l
total 216
-rw-rw---- 1 tls tls 8642 Apr 16 15:02 bool_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 bool_vars.h
-rw-rw---- 1 tls tls 7052 Apr 16 15:02 int_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 int_vars.h
-rw-rw---- 1 tls tls 340 Apr 16 15:02 long_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 long_vars.h
-rw-rw---- 1 tls tls 1392 Apr 16 15:02 nbool_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 nbool_vars.h
-rw-rw---- 1 tls tls 757 Apr 16 15:02 nint_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 nint_vars.h
-rw-rw---- 1 tls tls 6651 Apr 16 15:02 postconf_builtin.d
-rw-rw---- 1 tls tls 5970 Apr 16 15:02 postconf.d
-rw-rw---- 1 tls tls 6518 Apr 16 15:02 postconf_dbms.d
-rw-rw---- 1 tls tls 5824 Apr 16 15:02 postconf_edit.d
-rw-rw---- 1 tls tls 0 Apr 16 15:02 postconf-hdrs.stamp
-rw-rw---- 1 tls tls 4013 Apr 16 15:02 postconf_lookup.d
-rw-rw---- 1 tls tls 5670 Apr 16 15:02 postconf_main.d
-rw-rw---- 1 tls tls 5673 Apr 16 15:02 postconf_master.d
-rw-rw---- 1 tls tls 3785 Apr 16 15:02 postconf_match.d
-rw-rw---- 1 tls tls 5357 Apr 16 15:02 postconf_misc.d
-rw-rw---- 1 tls tls 3619 Apr 16 15:02 postconf_node.d
-rw-rw---- 1 tls tls 22480 Apr 16 15:02 postconf.o
-rw-rw---- 1 tls tls 8701 Apr 16 15:02 postconf_other.d
-rw-rw---- 1 tls tls 3639 Apr 16 15:02 postconf_print.d
-rw-rw---- 1 tls tls 5377 Apr 16 15:02 postconf_service.d
-rw-rw---- 1 tls tls 5213 Apr 16 15:02 postconf_unused.d
-rw-rw---- 1 tls tls 5596 Apr 16 15:02 postconf_user.d
-rw-rw---- 1 tls tls 609 Apr 16 15:02 raw_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 raw_vars.h
-rw-rw---- 1 tls tls 175 Apr 16 15:02 str_fn_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 str_fn_vars.h
-rw-rw---- 1 tls tls 32841 Apr 16 15:02 str_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 str_vars.h
-rw-rw---- 1 tls tls 7750 Apr 16 15:02 time_table.h
-rw-rw---- 1 tls tls 0 Apr 16 15:02 time_vars.h
tls@cb5:~/NB/objdir/external/ibm-public/postfix/sbin/postconf$
State-Changed-From-To: open->closed
State-Changed-By: tls@NetBSD.org
State-Changed-When: Wed, 16 Apr 2025 23:59:00 +0000
State-Changed-Why:
Committed fix
From: Thor Lancelot Simon <tls@panix.com>
To: gnats-bugs@netbsd.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: toolchain/59302: NetBSD-10 cross build from Linux blows up in
postfix
Date: Wed, 16 Apr 2025 19:56:58 -0400
As it turns out (thank you mlelstv!) the problem here is triggered not by
building on Linux, but by building in any directory whose full path to
the root contains "tls" or "global", because extract.awk in the postfix
sources skips any file whose path contains these strings. I have worked
around this in the Makefile.
State-Changed-From-To: closed->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 17 Apr 2025 14:49:36 +0000
State-Changed-Why:
pullup-10 #1097 https://releng.netbsd.org/cgi-bin/req-10.cgi?show=1097
needs pullup-9
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: tls@NetBSD.org
State-Changed-When: Fri, 18 Apr 2025 13:28:50 +0000
State-Changed-Why:
pullup-9 #1941 https://releng.netbsd.org/cgi-bin/req-9.cgi?show=1941
pullup-10 #1097 https://releng.netbsd.org/cgi-bin/req-10.cgi?show=1097
>Unformatted:
up with mysteriously undefined stuff in postfix.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.