Thread: VPath Build Errors

VPath Build Errors

From
"David G. Johnston"
Date:
Hey,

I've been building in the git repo just fine but wanted to use vpath builds so I could keep both "maked" v14 and v15 binaries around, ready to be installed.

The attached log is result of (while in the versioned directory, a sibling of the git repo)
`../postgresql/configure`
`make`
`tree`

stdout and stderr output tee'd to a file.

Per the instructions here:


The last handful of lines for make are below:

Thanks!

David J.

cat: ../../src/timezone/objfiles.txt: No such file or directory
cat: jit/objfiles.txt: No such file or directory
gcc -Wall -Wmissing-prototypes [...see file...] -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags  -Wl,-E -lz -lpthread -lrt -ldl -lm -o postgres
gcc: error: replication/backup_manifest.o: No such file or directory
gcc: error: replication/basebackup.o: No such file or directory
gcc: error: replication/basebackup_copy.o: No such file or directory
gcc: error: replication/basebackup_gzip.o: No such file or directory
gcc: error: replication/basebackup_lz4.o: No such file or directory
gcc: error: replication/basebackup_zstd.o: No such file or directory
gcc: error: replication/basebackup_progress.o: No such file or directory
gcc: error: replication/basebackup_server.o: No such file or directory
gcc: error: replication/basebackup_sink.o: No such file or directory
gcc: error: replication/basebackup_target.o: No such file or directory
gcc: error: replication/basebackup_throttle.o: No such file or directory
gcc: error: replication/repl_gram.o: No such file or directory
gcc: error: replication/slot.o: No such file or directory
gcc: error: replication/slotfuncs.o: No such file or directory
gcc: error: replication/syncrep.o: No such file or directory
gcc: error: replication/syncrep_gram.o: No such file or directory
gcc: error: replication/walreceiver.o: No such file or directory
gcc: error: replication/walreceiverfuncs.o: No such file or directory
gcc: error: replication/walsender.o: No such file or directory
gcc: error: utils/fmgrtab.o: No such file or directory
make[2]: *** [Makefile:66: postgres] Error 1
make[2]: Leaving directory '/home/vagrant/pgsql15/src/backend'
make[1]: *** [Makefile:42: all-backend-recurse] Error 2
make[1]: Leaving directory '/home/vagrant/pgsql15/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2

Re: VPath Build Errors

From
Tom Lane
Date:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The attached log is result of (while in the versioned directory, a sibling
> of the git repo)
> `../postgresql/configure`
> `make`
> `tree`

The VPATH buildfarm members haven't been complaining, and I can't
reproduce a failure here, so I'm inclined to suspect pilot error.

One point that's not very clearly documented is that your source
directory needs to be clean; no build products in it, except
possibly those that are included in tarballs.

            regards, tom lane



Re: VPath Build Errors

From
"David G. Johnston"
Date:
On Wed, Apr 13, 2022 at 5:44 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The attached log is result of (while in the versioned directory, a sibling
> of the git repo)
> `../postgresql/configure`
> `make`
> `tree`

The VPATH buildfarm members haven't been complaining, and I can't
reproduce a failure here, so I'm inclined to suspect pilot error.

One point that's not very clearly documented is that your source
directory needs to be clean; no build products in it, except
possibly those that are included in tarballs.


I'll double-check but that would explain it.  I know it was not clean when I tried this.

David J.

Re: VPath Build Errors

From
Julien Rouhaud
Date:
On Wed, Apr 13, 2022 at 05:48:49PM -0700, David G. Johnston wrote:
> On Wed, Apr 13, 2022 at 5:44 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> > "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > > The attached log is result of (while in the versioned directory, a
> > sibling
> > > of the git repo)
> > > `../postgresql/configure`
> > > `make`
> > > `tree`
> >
> > The VPATH buildfarm members haven't been complaining, and I can't
> > reproduce a failure here, so I'm inclined to suspect pilot error.
> >
> > One point that's not very clearly documented is that your source
> > directory needs to be clean; no build products in it, except
> > possibly those that are included in tarballs.
> >
> >
> I'll double-check but that would explain it.  I know it was not clean when
> I tried this.

Note that if you what you want is building multiple major versions at the same
time, the easiest way to do that is probably to use git worktrees [1] and
checkout multiple branches of the same repo at the same times, and then build
each one as you'd normally do.

[1] https://git-scm.com/docs/git-worktree