Re: Tripping up on my first attempt at building PG from source

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: PostgreSQL - General ML <pgsql-general(at)postgresql(dot)org>
Cc: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
Subject: Re: Tripping up on my first attempt at building PG from source
Date: 2008-06-05 09:15:09
Message-ID: 4847AE9D.7000206@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com> writes:
>> Would anyone be able to give any dirction on what I need to do to get
>> passed this error?
>
>> /usr/bin/ld: crt1.o: No such file: No such file or directory
>
> Seems you've got an incomplete installation. On my Fedora machine,
> crt1.o is provided by the glibc-devel RPM ... dunno how Ubuntu
> splits things up.

$ dpkg -S /usr/lib/crt1.o
libc6-dev: /usr/lib/crt1.o

... so you're missing the libc6-dev package. However, you'll find
there's lots else missing too, since you appear to have just installed
gcc but no supporting libraries etc.

You need to install at least the `build-essential' package, which will
pull in all the core headers and libraries. You may also need other
library -dev packages. As Ubuntu packages PostgreSQL, the easiest way to
get everything you need is to tell it to install all the build
dependencies of the postgresql source package:

sudo apt-get build-dep postgresql

When you configure your custom postgresql build make sure to use a
--prefix that points it somewhere sensible. DO NOT configure it with
--prefix=/usr. A good option is to use something like
--prefix=/opt/postgresql83 so the whole app is neatly self contained.

An alternative might be to `apt-get source postgresql' then modify the
package and rebuild it by running 'debian/rules binary' from the package
source dir. However, depending on the changes you're going to make this
might be more hassle than it's worth.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2008-06-05 09:52:26 How can I compare sql create script with running database?
Previous Message Dimitri Fontaine 2008-06-05 09:03:41 Re: Tripping up on my first attempt at building PG from source