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 002c01c3e9cd$0c509140$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>)
Responses Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory
List pgsql-bugs
Hi Tom,

I am running a Red Hat 9.0 on a Dell server.

On the datafiles I created using the "absolute path"-hack to replace
$libdir, I started postmaster. I configured postgresql.conf to accept tcp
connections. I then ran

[postgres@hubertus postgres]$ /opt/postgres-7.4.1/bin/createdb testdb

CREATE DATABASE

Which work ok. Finally, I started psql (as user postgres), and tried your
suggested statement:

[postgres@hubertus postgres]$ /opt/postgres-7.4.1/bin/psql -d testdb

Welcome to psql 7.4.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

testdb=3D# CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING,
CSTRING,INTEGER)
testdb-# RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE
'c' STRICT;
ERROR:  could not access file "$libdir/ascii_and_mic": No such file or
directory
ERROR:  could not access file "$libdir/ascii_and_mic": No such file or
directory
testdb=3D#

And you are right -- the problem is back.=20

I assume that $libdir is evaluating to either a wrong or an empty string. I
am not sure, but I tend to believe the latter.

Does this give you any clues ?

Regards,
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 7:44 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:
> I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout
> /opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded!

Well, that proves the shared library wasn't broken, but it leaves us
no wiser about what the problem really was.  I'd like to keep after it.

I tried configuring with a trailing "/" on a Red Hat 8.0 box here, and
it seemed to work just fine.  You did not specify what Red Hat release
you were using, but I suspect that idea is a dead end.

You could investigate further without having to reinitdb, just try the
CREATE FUNCTION command in psql:

CREATE OR REPLACE FUNCTION dummy (INTEGER, INTEGER, CSTRING,
CSTRING,INTEGER)
RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE 'c' STRICT;

I expect this will fail as before.  Could you strace the attached
backend process while it's trying to do this command?

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

pgsql-bugs by date:

Previous
From: "Hamedany, Allen"
Date:
Subject: createdb fails
Next
From: Tom Lane
Date:
Subject: Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory