Re: pg_bsd_indent compiles bytecode

2020-06-30 Thread Andres Freund
Hi, On 2020-06-29 21:27:48 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> The way that pg_bsd_indent defines its variables isn't standard C, as > >> far as I can tell, which explains the errors I was getting. All the > >> individual files include indent_globs.h, which declares/d

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Tom Lane
Andres Freund writes: > It's easy enough to fix by just adding a ifndef PROGRAM around the piece > adding the depency to the .bc files: > ifeq ($(with_llvm), yes) > ifndef PROGRAM > all: $(addsuffix .bc, $(MODULES)) $(patsubst %.o,%.bc, $(OBJS)) > endif # PROGRAM > endif # with_llvm > but it's n

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Tom Lane
I wrote: > Andres Freund writes: >> The way that pg_bsd_indent defines its variables isn't standard C, as >> far as I can tell, which explains the errors I was getting. All the >> individual files include indent_globs.h, which declares/defines a bunch >> of variables. Since it doesn't use extern,

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Tom Lane
Andres Freund writes: > The way that pg_bsd_indent defines its variables isn't standard C, as > far as I can tell, which explains the errors I was getting. All the > individual files include indent_globs.h, which declares/defines a bunch > of variables. Since it doesn't use extern, they'll all end

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Andres Freund
Hi, On 2020-06-27 18:54:04 -0400, Tom Lane wrote: > Having now checked, there isn't any such problem. No .bc files are > getting built except in src/backend and in other modules that feed > into the backend, such as src/timezone and most of contrib. > I do see .bc files getting built for pg_bsd_

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Andres Freund
Hi, On 2020-06-27 18:43:40 -0400, Tom Lane wrote: > Andres Freund writes: > > I can test that with another program, but for some reason pg_bsd_indent > > fails to build against 13/HEAD, but builds fine against 12. Not sure yet > > what's up: > > Huh. Works here on RHEL8 ... what platform are yo

Re: pg_bsd_indent compiles bytecode

2020-06-29 Thread Michael Paquier
On Sat, Jun 27, 2020 at 06:54:04PM -0400, Tom Lane wrote: > Having now checked, there isn't any such problem. No .bc files are > getting built except in src/backend and in other modules that feed > into the backend, such as src/timezone and most of contrib. > > I do see .bc files getting built fo

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Tom Lane
Andres Freund writes: > On 2020-06-27 17:12:57 -0400, Tom Lane wrote: >> I wouldn't care about this particularly for pg_bsd_indent itself, >> but it suggests that we're probably building .bc files for client-side >> files, which seems like a substantial waste of time. Maybe we need >> different C

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Tom Lane
Andres Freund writes: > I can test that with another program, but for some reason pg_bsd_indent > fails to build against 13/HEAD, but builds fine against 12. Not sure yet > what's up: Huh. Works here on RHEL8 ... what platform are you using? regards, tom lane

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Andres Freund
Hi, On 2020-06-27 17:12:57 -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Jun 23, 2020 at 05:56:10PM -0400, Alvaro Herrera wrote: > >> I just noticed that when you compile pg_bsd_indent with a PG tree that > >> has --enable-jit (or something around that), then it compiles the source >

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Bruce Momjian
On Sat, Jun 27, 2020 at 05:12:57PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Jun 23, 2020 at 05:56:10PM -0400, Alvaro Herrera wrote: > >> I just noticed that when you compile pg_bsd_indent with a PG tree that > >> has --enable-jit (or something around that), then it compiles the s

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Tom Lane
Bruce Momjian writes: > On Tue, Jun 23, 2020 at 05:56:10PM -0400, Alvaro Herrera wrote: >> I just noticed that when you compile pg_bsd_indent with a PG tree that >> has --enable-jit (or something around that), then it compiles the source >> files into bytecode. >> Obviously this is not harmful sin

Re: pg_bsd_indent compiles bytecode

2020-06-27 Thread Bruce Momjian
On Tue, Jun 23, 2020 at 05:56:10PM -0400, Alvaro Herrera wrote: > I just noticed that when you compile pg_bsd_indent with a PG tree that > has --enable-jit (or something around that), then it compiles the source > files into bytecode. > > Obviously this is not harmful since these files don't get i

pg_bsd_indent compiles bytecode

2020-06-23 Thread Alvaro Herrera
I just noticed that when you compile pg_bsd_indent with a PG tree that has --enable-jit (or something around that), then it compiles the source files into bytecode. Obviously this is not harmful since these files don't get installed, but I wonder if our compiles aren't being excessively generous.