gmake Errors: pg_backup_archiver.c: undefined reference to `lo_create'

Started by Emi Luover 19 years ago5 messagesgeneral
Jump to latest
#1Emi Lu
emilu@encs.concordia.ca

Hello,

When I tried to install postgresql 8.1.4, I got the following errors.

Could someone tell me what are missing or wrong please?
==============================================

./configure --prefix='/home/postgresql/' --without-docdir --without-readline
. gmake

pg_backup_archiver.o(.text+0x10f4): In function `StartRestoreBlob':
pg_backup_archiver.c: undefined reference to `lo_create'
collect2: ld returned 1 exit status
gmake[3]: *** [pg_dump] Error 1
gmake[3]: Leaving directory `/home/postgresql-snapshot/src/bin/pg_dump'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/postgresql-snapshot/src/bin'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/postgresql-snapshot/src'
gmake: *** [all] Error 2

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emi Lu (#1)
Re: gmake Errors: pg_backup_archiver.c: undefined reference to `lo_create'

Emi Lu <emilu@encs.concordia.ca> writes:

When I tried to install postgresql 8.1.4, I got the following errors.

pg_backup_archiver.o(.text+0x10f4): In function `StartRestoreBlob':
pg_backup_archiver.c: undefined reference to `lo_create'
collect2: ld returned 1 exit status

It looks to me like ld is trying to link pg_dump against a pre-8.1 copy
of libpq (lo_create is new in libpq as of 8.1). Question is why? You
did not show us the link command, nor mention what platform this is.

regards, tom lane

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emi Lu (#1)
Re: gmake Errors: pg_backup_archiver.c: undefined reference to `lo_create'

Emi Lu <emilu@encs.concordia.ca> writes:

The full results for configuration and gmake are saved in the attached
two files.

That's hardly full results from gmake --- it looks like it re-used a
whole pile of pre-existing .o files. Perhaps what you need is a "make
distclean" and start again.

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emi Lu (#1)
Re: gmake Errors: pg_backup_archiver.c: undefined reference to `lo_create'

Emi Lu <emilu@encs.concordia.ca> writes:

I did make distclean, and I retried "configuration and ", but I still
saw the following errors:

The only other theory I can think of is that the linker is picking up
an old libpq.so from /home/postgresql/lib because of the -rpath switch
... which it should not be doing, but maybe it is anyway. If there's
an 8.0 libpq.so there, try getting rid of it.

regards, tom lane

#5Emi Lu
emilu@encs.concordia.ca
In reply to: Tom Lane (#4)
Re: gmake Errors: pg_backup_archiver.c: undefined reference

I did make distclean, and I retried "configuration and ", but I still
saw the following errors:

The only other theory I can think of is that the linker is picking up
an old libpq.so from /home/postgresql/lib because of the -rpath switch
... which it should not be doing, but maybe it is anyway. If there's
an 8.0 libpq.so there, try getting rid of it.

You are absolutely correct. It is because of the libpg.so.

I used the central gcc before, and -rpath was linked to the 8.0 libpg.so.

Now I specified the local gcc and installed version 8.1.4 successfully
this time.

Thanks a lot for all your kind help!