Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory - Mailing list pgsql-bugs

From Thomas Borg Salling
Subject Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Date
Msg-id 003501c3e9d7$36c3fc00$0101000a@Umulius
Whole thread Raw
In response to Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
So, I removed dfmgr.o, and remade it:

[tbs@hubertus fmgr]$ make
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../../../src/include -D_GNU_SOURCE
-DPKGLIBDIR=3D\"/opt/postgres-7.4.1//lib\" -DDLSUFFIX=3D\".so\"  -c -o dfmg=
r.o
dfmgr.c
/usr/bin/ld -r -o SUBSYS.o dfmgr.o fmgr.o funcapi.o

The  Makefile.global looks ok (I didn't touch it), excerpts:

...
prefix :=3D /opt/postgres-7.4.1/
...
libdir :=3D ${exec_prefix}/lib
pkglibdir =3D $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
override pkglibdir :=3D $(pkglibdir)/postgresql
endif
endif
...

I did a "make install" following the rebuild of dfmgr.o -- and now things
work!

I am wondering how I came into this situation? Trying to recall my first
steps; I think that I did a ./configure first (it ran to the end) -- and
then I ran ./configure again with the options. Hmm... I will make a complete
new build (from a fresh tarball and directory) and see what happens.

I am not sure this was any help to you? Anyway - thanks for pointing to the
source of my problem!

/Thomas.

-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, February 02, 2004 10:36 PM
To: Thomas Borg Salling
Cc: 'PostgreSQL Bugs List'
Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or
directory=20

"Thomas Borg Salling" <tbs@navicon.dk> writes:
> createdb, and started psql to create function. The result from strace
(when
> running the CREATE FUNCTION) of the backend is:

> "Q\0\0\0\237CREATE OR REPLACE FUNCTION "..., 8192, 0) =3D 160
> gettimeofday({1075756990, 462661}, NULL) =3D 0
> stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) =3D -1 ENOENT (No
> such file or directory)
> stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) =3D -1 ENOENT
(No
> such file or directory)
> stat64("$libdir/ascii_and_mic", 0xbfffcad0) =3D -1 ENOENT (No such file or
> directory)
> write(2, "ERROR:  could not access file \"$"..., 81) =3D 81

> It seems to search in /usr/local/pgsql.

Evidently.  So, somehow src/backend/utils/fmgr/dfmgr.o got compiled with
the wrong value of PKGLIBDIR.  You should look in src/Makefile.global to
check that it has the correct setting for pkglibdir (note difference in
case).  Also try going to src/backend/utils/fmgr, removing dfmgr.o, and
saying "make" to see what -D switch gets passed by the makefile.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

pgsql-bugs by date:

Previous
From: "Thomas Borg Salling"
Date:
Subject: Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Next
From: Tom Lane
Date:
Subject: Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory