Dennis Suratna <dennis.suratna@gmail.com> writes:
> I am attempting to build postgres from source with a custom prefix
> directory and I am faced with the following error:
> /usr/bin/ld: cannot find -lpgcommon_shlib
> collect2: error: ld returned 1 exit status
What platform is that, exactly?
> This is the command that I ran:
> # Under /home/dennis/workspace/postgresql
> mkdir build_dir
> cd build_dir
> ../configure --enable-cassert --enable-debug --prefix
> /home/dennis/workspace/pgsql
> make
Hm ... it's not standard practice for the VPATH build directory to be
inside the source directory, I think --- usually the motivation for
using VPATH at all is to avoid modifying the source tree. Having said
that, I tried such a setup (on a Fedora 30 box) and it built fine for
me. I think there might be something wonky about your platform's
linker, or maybe make is broken? Is src/common/libpgcommon_shlib.a
present in your build tree?
regards, tom lane