Unix Technical Forum

Tripping up on my first attempt at building PG from source

This is a discussion on Tripping up on my first attempt at building PG from source within the Pgsql General forums, part of the PostgreSQL category; --> I just bought a new Ubuntu Laptop so that I could tryout and hopefully offer support for a few ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-05-2008, 06:39 PM
Richard Broersma
 
Posts: n/a
Default Tripping up on my first attempt at building PG from source

I just bought a new Ubuntu Laptop so that I could tryout and hopefully
offer support for a few of my favorite pgfoundry projects.

Would anyone be able to give any dirction on what I need to do to get
passed this error?

***********************************
My first attempt with building from source ended with the following:
***********************************

# ./configure
....
checking for gcc... gcc
checking for C compiler default output file name... configure: error:
C compiler cannot create executables
See `config.log' for more details.

*************************************************
Viewing the config.log shows the following error:
*************************************************
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
configure:2218: $? = 0
configure:2220: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2223: $? = 1
configure:2246: checking for C compiler default output file name
configure:2249: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2252: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "PostgreSQL"
| #define PACKAGE_TARNAME "postgresql"
| #define PACKAGE_VERSION "8.3.1"
| #define PACKAGE_STRING "PostgreSQL 8.3.1"
| #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
| #define PG_VERSION "8.3.1"
| #define DEF_PGPORT 5432
| #define DEF_PGPORT_STR "5432"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2291: error: C compiler cannot create executables
See `config.log' for more details.


--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-05-2008, 06:39 PM
Joshua D. Drake
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG fromsource



On Wed, 2008-06-04 at 22:54 -0700, Richard Broersma wrote:
> I just bought a new Ubuntu Laptop so that I could tryout and hopefully
> offer support for a few of my favorite pgfoundry projects.
>
> Would anyone be able to give any dirction on what I need to do to get
> passed this error?


You don't have any build tools install. Try:

apt-get install binutils gcc autoconf flex

Sincerely,

Joshua D. Drake



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 06:39 PM
Tom Lane
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG from source

"Richard Broersma" <richard.broersma@gmail.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.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-05-2008, 06:40 PM
Richard Broersma
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG from source

On Wed, Jun 4, 2008 at 11:20 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
> You don't have any build tools install. Try:
>
> apt-get install binutils gcc autoconf flex


Thanks gentlemen, I will give these ideas a try.


--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-05-2008, 06:40 PM
Dimitri Fontaine
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG from source

Le jeudi 05 juin 2008, Joshua D. Drake a écritÂ*:
> You don't have any build tools install. Try:
> apt-get install binutils gcc autoconf flex


Or even better:
apt-get build-dep postgresql-8.3

--
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIR6vvlBXRlnbh1bkRAmclAKCFFnR03ybE71piZkGnMg pCy3CYUQCcDMlM
RaRZP5geWQ7YJTTentYygoE=
=Sirv
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-05-2008, 06:40 PM
Craig Ringer
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG fromsource

Tom Lane wrote:
> "Richard Broersma" <richard.broersma@gmail.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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-05-2008, 06:40 PM
Richard Broersma
 
Posts: n/a
Default Re: Tripping up on my first attempt at building PG from source

On Thu, Jun 5, 2008 at 2:15 AM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> sudo apt-get build-dep postgresql


Thanks, this works perfectly now!

--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:54 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com