Re: failing to build preproc.c on solaris with sun studio

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Michael Meskes <meskes(at)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: failing to build preproc.c on solaris with sun studio
Date: 2022-09-15 09:21:54
Message-ID: 20220915092154.GE31833@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 15, 2022 at 04:53:09PM +1200, Thomas Munro wrote:
> Not sure it's OK to put random junk in ccache's directory, and in any
> case we'd certainly want to teach it to trim itself before doing that
> on CI...

> I suppose a version good enough to live in src/tools would need to
> trim the cache, and I don't enjoy writing code that deletes files in
> shell script, so maybe this'd need to be written in Python...

Maybe it'd be maybe better in python (for portability?).

But also, maybe the cache should be a single file with hash content in
it, plus the two cached files. Then, rather than storing and pruning N
files with dynamic names, you'd be overwriting the same two files, and
avoid the need to prune.

As I understand, the utility of this cache is rebuilding when the
grammar hasn't changed; but it doesn't seem important to be able to use
cached output when switching branches (for example).

> bison="bison"

Maybe this should do:
: ${BISON:=bison} # assign default value

(and then change to refer to $BISON everywhere)

> "--version")
> "-d")
> "-o")
> "-"*)

These don't need to be quoted

> echo "could not find .y file in command line arguments: $@"

Could add >&2 to write to stderr

> if [ -z "$SIMPLE_BISON_CACHE_PATH" ] ; then
> SIMPLE_BISON_CACHE_PATH="/tmp/simple-bison-cache"
> fi

Maybe
: ${SIMPLE_BISON_CACHE_PATH:=/tmp/simple-bison-cache} # assign default value

--
Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2022-09-15 10:04:14 Re: SUBTRANS: Minimizing calls to SubTransSetParent()
Previous Message John Naylor 2022-09-15 09:11:48 Re: Cleaning up historical portability baggage