undefined reference to `is_absolute_path'

Started by Joe Conwayabout 23 years ago3 messageshackers
Jump to latest
#1Joe Conway
mail@joeconway.com

For the past few days I'm seeing this when building php on machines
where I build Postgres from cvs:

gcc -o conftest -g -O2 -L/usr/lib -Wl,-rpath,/usr/local/pgsql/lib
-L/usr/local/pgsql/lib conftest.c -lcrypt -lmm -lpspell -lpq -lmhash
-lmcrypt -lltdl -lldap -llber -lcrypt -lpam -lgmp -lfreetype -lpng -lz
-ljpeg -lz -ldb-4.0 -lgdbm -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm
-ldl -lnsl -lcurl -lssl -lcrypto -ldl -lxml2 -lz -lm -lcrypt 1>&5
/usr/local/pgsql/lib/libpq.so: undefined reference to `is_absolute_path'
collect2: ld returned 1 exit status

It looks like is_absolute_path is function in a new file src/port/path.c.

I also see:
ar crs libpq.a fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o
fe-lobj.o pqexpbuffer.o dllist.o pqsignal.o fe-secure.o wchar.o
encnames.o ip.o md5.o
ranlib libpq.a

Doesn't path.o need to be linked in similar to the other backend files?

Joe

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joe Conway (#1)
Re: undefined reference to `is_absolute_path'

Joe Conway <mail@joeconway.com> writes:

Doesn't path.o need to be linked in similar to the other backend files?

Yeah. I poked Bruce about that last week, but he hasn't fixed it yet
(he was out of town last week, and might still be...). I don't have
time to deal with it now, but will apply a patch if you provide one.

regards, tom lane

#3Joe Conway
mail@joeconway.com
In reply to: Tom Lane (#2)
Re: undefined reference to `is_absolute_path'

Tom Lane wrote:

Yeah. I poked Bruce about that last week, but he hasn't fixed it yet
(he was out of town last week, and might still be...). I don't have
time to deal with it now, but will apply a patch if you provide one.

Not sure if there is a better fix, but this seemed to do it for me.

Joe

Attachments:

is_absolute_path-fix.patchtext/plain; name=is_absolute_path-fix.patchDownload+7-4