Обсуждение: gmake Errors: pg_backup_archiver.c: undefined reference to `lo_create'
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
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
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
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
>> 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!