Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory

From: "Thomas Borg Salling" <tbs(at)navicon(dot)dk>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'PostgreSQL Bugs List'" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Date: 2004-02-02 20:42:17
Message-ID: 002c01c3e9cd$0c509140$0101000a@Umulius
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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(at)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=# 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=#

And you are right -- the problem is back.

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(at)postgresql(dot)org
[mailto:pgsql-bugs-owner(at)postgresql(dot)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

"Thomas Borg Salling" <tbs(at)navicon(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-02-02 20:51:31 Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Previous Message Tom Lane 2004-02-02 18:44:15 Re: BUG #1072: "$libdir/ascii_and_mic": No such file or directory