Re: Could not build from source /usr/bin/ld: cannot find -lpgcommon_shlib

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dennis Suratna <dennis(dot)suratna(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Could not build from source /usr/bin/ld: cannot find -lpgcommon_shlib
Date: 2019-11-30 18:31:51
Message-ID: 706.1575138711@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dennis Suratna <dennis(dot)suratna(at)gmail(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Goke Aruna 2019-11-30 19:00:03 Re: Slow response to my query
Previous Message Bzzzz 2019-11-30 17:58:35 Re: Slow response to my query