Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npGGr-0001VJ-Oe for pgsql-hackers@arkaria.postgresql.org; Thu, 12 May 2022 21:22:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1npGFq-0001EF-B9 for pgsql-hackers@arkaria.postgresql.org; Thu, 12 May 2022 21:21:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npGFq-0001E6-2K for pgsql-hackers@lists.postgresql.org; Thu, 12 May 2022 21:21:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npGFl-0000cG-0m for pgsql-hackers@lists.postgresql.org; Thu, 12 May 2022 21:21:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24CLLhKX534626; Thu, 12 May 2022 17:21:43 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@lists.postgresql.org Subject: Re: typedefs.list glitches In-reply-to: <526703.1652385613@sss.pgh.pa.us> References: <526703.1652385613@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 12 May 2022 16:00:13 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <534591.1652390471.0@sss.pgh.pa.us> Date: Thu, 12 May 2022 17:21:43 -0400 Message-ID: <534625.1652390503@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <534591.1652390471.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable I wrote: > every buildfarm member that's contributing to the typedefs list > builds with OpenSSL. That wouldn't surprise me, except that > my own animal sifaka should be filling that gap. Looking at > its latest attempt[1], it seems to be generating an empty list, > which I guess means that our recipe for extracting typedefs > doesn't work on macOS/arm64. I shall investigate. Found it. Current macOS produces $ objdump -W /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolc= hain/usr/bin/objdump: error: unknown argument '-W' where last year's vintage produced $ objdump -W objdump: Unknown command line argument '-W'. Try: '/Applications/Xcode.ap= p/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump -= -help' objdump: Did you mean '-C'? This confuses run_build.pl into taking the "Linux and sometimes windows" code path instead of the $using_osx one. I think simplest fix is to move the $using_osx branch ahead of the heuristic ones, as attached. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="typedefs.patch"; charset="us-ascii" Content-ID: <534591.1652390471.2@sss.pgh.pa.us> Content-Description: typedefs.patch --- run_build.pl.orig 2022-01-29 10:18:03.000000000 -0500 +++ run_build.pl 2022-05-12 16:59:58.000000000 -0400 @@ -2163,7 +2163,32 @@ sub find_typedefs next if $bin =~ m!bin/(ipcclean|pltcl_)!; next unless -f $bin; next if -l $bin; # ignore symlinks to plain files (e.g. postmaster) - if (@err == 1) # Linux and sometimes windows + if ($using_osx) + { + # no run_log due to redirections. + @dumpout = + `dwarfdump $bin 2>/dev/null | egrep -A2 TAG_typedef 2>/dev/null`; + foreach (@dumpout) + { + ## no critic (RegularExpressions::ProhibitCaptureWithoutTest) + @flds = split; + if (@flds == 3) + { + # old format + next unless ($flds[0] eq "AT_name("); + next unless ($flds[1] =~ m/^"(.*)"$/); + $syms{$1} = 1; + } + elsif (@flds == 2) + { + # new format + next unless ($flds[0] eq "DW_AT_name"); + next unless ($flds[1] =~ m/^\("(.*)"\)$/); + $syms{$1} = 1; + } + } + } + elsif (@err == 1) # Linux and sometimes windows { my $cmd = "$objdump -Wi $bin 2>/dev/null | " . "egrep -A3 DW_TAG_typedef 2>/dev/null"; @@ -2194,31 +2219,6 @@ sub find_typedefs $syms{ $flds[-1] } = 1; } } - elsif ($using_osx) - { - # no run_log due to redirections. - @dumpout = - `dwarfdump $bin 2>/dev/null | egrep -A2 TAG_typedef 2>/dev/null`; - foreach (@dumpout) - { - ## no critic (RegularExpressions::ProhibitCaptureWithoutTest) - @flds = split; - if (@flds == 3) - { - # old format - next unless ($flds[0] eq "AT_name("); - next unless ($flds[1] =~ m/^"(.*)"$/); - $syms{$1} = 1; - } - elsif (@flds == 2) - { - # new format - next unless ($flds[0] eq "DW_AT_name"); - next unless ($flds[1] =~ m/^\("(.*)"\)$/); - $syms{$1} = 1; - } - } - } else { # no run_log due to redirections. ------- =_aaaaaaaaaa0--