[BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
The following bug has been logged online: Bug reference: 1072 Logged by: Thomas Borg Salling Email address: [EMAIL PROTECTED] PostgreSQL version: 7.4 Operating system: Red Hat Linux (2.4.20-20.7) Description:"$libdir/ascii_and_mic": No such file or directory Details: I have downloaded and built Postgres 7.4.1: as user 'tbs': ./configure --prefix=/opt/postgres-7.4.1/ --with-perl --enable-thread-safety make make check as user 'root': make install mkdir /data/postgres chown -R postgres /opt/postgres-7.4.1 chgrp -R postgres /opt/postgres-7.4.1 chown -R postgres /data/postgres chgrp -R postgres /data/postgres as user 'postgres': [EMAIL PROTECTED] postgres]$ /opt/postgres-7.4.1/bin/initdb -D /data/postgres/ The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.iso885915. fixing permissions on existing directory /data/postgres/... ok creating directory /data/postgres//base... ok creating directory /data/postgres//global... ok creating directory /data/postgres//pg_xlog... ok creating directory /data/postgres//pg_clog... ok selecting default max_connections... 100 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /data/postgres//base/1... ok initializing pg_shadow... ok enabling unlimited row size for system tables... ok initializing pg_depend... ok creating system views... ok loading pg_description... ok creating conversions... ERROR: could not access file "$libdir/ascii_and_mic": No such file or directory initdb: failed Why does this fail? What can I do to resolve it? Thanks in advance! /Thomas. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"PostgreSQL Bugs List" <[EMAIL PROTECTED]> writes: > I have downloaded and built Postgres 7.4.1: > as user 'tbs': > ./configure --prefix=/opt/postgres-7.4.1/ --with-perl --enable-thread-safety > make > make check Did the "make check" work? > creating conversions... ERROR: could not access file > "$libdir/ascii_and_mic": No such file or directory What's in /opt/postgres-7.4.1/lib? If you see an ascii_and_mic.so there, what does ldd say about it? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Hi Tom, The make check worked fine (log attached). ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields: [EMAIL PROTECTED] lib]# ldd ascii_and_mic.so libc.so.6 => /lib/i686/libc.so.6 (0x4200) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) the complete contents of /opt/postgres-7.4.1/lib are: [EMAIL PROTECTED] postgres]$ ll /opt/postgres-7.4.1/lib/ total 4984 -rwxr-xr-x1 postgres postgres 5759 Feb 2 18:01 ascii_and_mic.so -rwxr-xr-x1 postgres postgres13012 Feb 2 18:01 cyrillic_and_mic.so -rwxr-xr-x1 postgres postgres 6065 Feb 2 18:01 euc_cn_and_mic.so -rwxr-xr-x1 postgres postgres11803 Feb 2 18:01 euc_jp_and_sjis.so -rwxr-xr-x1 postgres postgres 6065 Feb 2 18:01 euc_kr_and_mic.so -rwxr-xr-x1 postgres postgres10632 Feb 2 18:01 euc_tw_and_big5.so -rwxr-xr-x1 postgres postgres 7978 Feb 2 18:01 latin2_and_win1250.so -rwxr-xr-x1 postgres postgres 7055 Feb 2 18:01 latin_and_mic.so -rw-r--r--1 postgres postgres65352 Feb 2 18:02 libecpg.a -rw-r--r--1 postgres postgres11470 Feb 2 18:02 libecpg_compat.a lrwxrwxrwx1 postgres postgres 21 Feb 2 18:02 libecpg_compat.so -> libecpg_compat.so.1.1 lrwxrwxrwx1 postgres postgres 21 Feb 2 18:02 libecpg_compat.so.1 -> libecpg_compat.so.1.1 -rwxr-xr-x1 postgres postgres18149 Feb 2 18:02 libecpg_compat.so.1.1 lrwxrwxrwx1 postgres postgres 14 Feb 2 18:02 libecpg.so -> libecpg.so.4.1 lrwxrwxrwx1 postgres postgres 14 Feb 2 18:02 libecpg.so.4 -> libecpg.so.4.1 -rwxr-xr-x1 postgres postgres55093 Feb 2 18:02 libecpg.so.4.1 -rw-r--r--1 postgres postgres65710 Feb 2 18:02 libpgtypes.a lrwxrwxrwx1 postgres postgres 17 Feb 2 18:02 libpgtypes.so -> libpgtypes.so.1.1 lrwxrwxrwx1 postgres postgres 17 Feb 2 18:02 libpgtypes.so.1 -> libpgtypes.so.1.1 -rwxr-xr-x1 postgres postgres58224 Feb 2 18:02 libpgtypes.so.1.1 -rw-r--r--1 postgres postgres 123638 Feb 2 18:02 libpq.a lrwxrwxrwx1 postgres postgres 12 Feb 2 18:02 libpq.so -> libpq.so.3.1 lrwxrwxrwx1 postgres postgres 12 Feb 2 18:02 libpq.so.3 -> libpq.so.3.1 -rwxr-xr-x1 postgres postgres 105391 Feb 2 18:02 libpq.so.3.1 -rwxr-xr-x1 postgres postgres 1065390 Feb 2 18:02 plperl.so -rwxr-xr-x1 postgres postgres 107331 Feb 2 18:02 plpgsql.so -rwxr-xr-x1 postgres postgres 5780 Feb 2 18:01 utf8_and_ascii.so -rwxr-xr-x1 postgres postgres 227051 Feb 2 18:01 utf8_and_big5.so -rwxr-xr-x1 postgres postgres14372 Feb 2 18:01 utf8_and_cyrillic.so -rwxr-xr-x1 postgres postgres 125049 Feb 2 18:01 utf8_and_euc_cn.so -rwxr-xr-x1 postgres postgres 218713 Feb 2 18:01 utf8_and_euc_jp.so -rwxr-xr-x1 postgres postgres 137497 Feb 2 18:01 utf8_and_euc_kr.so -rwxr-xr-x1 postgres postgres 338009 Feb 2 18:01 utf8_and_euc_tw.so -rwxr-xr-x1 postgres postgres 1021504 Feb 2 18:01 utf8_and_gb18030.so -rwxr-xr-x1 postgres postgres 354564 Feb 2 18:01 utf8_and_gbk.so -rwxr-xr-x1 postgres postgres 6203 Feb 2 18:01 utf8_and_iso8859_1.so -rwxr-xr-x1 postgres postgres32683 Feb 2 18:01 utf8_and_iso8859.so -rwxr-xr-x1 postgres postgres 280466 Feb 2 18:01 utf8_and_johab.so -rwxr-xr-x1 postgres postgres 129195 Feb 2 18:01 utf8_and_sjis.so -rwxr-xr-x1 postgres postgres 9707 Feb 2 18:01 utf8_and_tcvn.so -rwxr-xr-x1 postgres postgres 280484 Feb 2 18:01 utf8_and_uhc.so -rwxr-xr-x1 postgres postgres 9756 Feb 2 18:01 utf8_and_win1250.so -rwxr-xr-x1 postgres postgres 9788 Feb 2 18:01 utf8_and_win1256.so -rwxr-xr-x1 postgres postgres 9557 Feb 2 18:01 utf8_and_win874.so Best regards, Thomas. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 4:38 PM To: [EMAIL PROTECTED] Cc: PostgreSQL Bugs List Subject: Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory "PostgreSQL Bugs List" <[EMAIL PROTECTED]> writes: > I have downloaded and built Postgres 7.4.1: > as user 'tbs': > ./configure --prefix=/opt/postgres-7.4.1/ --with-perl --enable-thread-safety > make > make check Did the "make check" work? > creating conversions... ERROR: could not access file > "$libdir/ascii_and_mic": No such file or directory What's in /opt/postgres-7.4.1/lib? If you see an ascii_and_mic.so there, what does ldd say about it? regards, tom lane make_check.log Description: Binary data ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> writes: > ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields: > [EMAIL PROTECTED] lib]# ldd ascii_and_mic.so=20 > libc.so.6 =3D> /lib/i686/libc.so.6 (0x4200) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x8000) Hmm, nothing wrong with the library file itself then. So why isn't initdb able to load it? The only thing I can think of is some environment difference between your postgres account and your root account that affects dynamic linking. Better look at LD_LIBRARY_PATH discrepancies, for instance. You might try running ldd as postgres instead of root to see if it gives a different answer. Also you might want to add /opt/postgres-7.4.1/lib/ to your ldconfig search path. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Hi again, Running ldd as postgres yields the same as root: [EMAIL PROTECTED] postgres]$ ldd /opt/postgres-7.4.1/lib/ascii_and_mic.so libc.so.6 => /lib/i686/libc.so.6 (0x4200) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) the problem occurs when initdb tries to run the conversion_create.sql script: # Create pg_conversion and support functions $ECHO_N "creating conversions... "$ECHO_C grep -v '^DROP CONVERSION' $datadir/conversion_create.sql | "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely echo "ok" for some reason - conversion_create.sql the $libdir is not defined. I tried to print $libdir from bin/initdb, but this variable is empty. $datadir, however, is correctly set to /opt/postgres-7.4.1//share. The following envvars are correctly set for user 'postgres': export PATH=/opt/postgres-7.4.1/bin:${PATH} export LD_LIBRARY_PATH=/opt/postgres-7.4.1/lib:${LD_LIBRARY_PATH} export MANPATH=/opt/postgres-7.4.1/man:${MANPATH} export PGHOST=localhost export PGPORT=5432 Hmmm ?! Best regards, Thomas. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Monday, February 02, 2004 6:19 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" <[EMAIL PROTECTED]> writes: > ascii_and_mic.so lives i /opt/postgres-7.4.1/lib, and ldd yields: > [EMAIL PROTECTED] lib]# ldd ascii_and_mic.so=20 > libc.so.6 =3D> /lib/i686/libc.so.6 (0x4200) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x8000) Hmm, nothing wrong with the library file itself then. So why isn't initdb able to load it? The only thing I can think of is some environment difference between your postgres account and your root account that affects dynamic linking. Better look at LD_LIBRARY_PATH discrepancies, for instance. You might try running ldd as postgres instead of root to see if it gives a different answer. Also you might want to add /opt/postgres-7.4.1/lib/ to your ldconfig search path. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> writes: > for some reason - conversion_create.sql the $libdir is not defined. I tried > to print $libdir from bin/initdb, but this variable is empty. $libdir is not an environment variable, it's a notation specially recognized by CREATE FUNCTION. It should expand to the same directory printed by "pg_config --pkglibdir". You might check what that prints. The only other idea that comes to mind is that you changed your mind about the install prefix during the installation and didn't do a full rebuild. The PKGLIBDIR setting is hardwired into dfmgr.o at compile time and maybe it didn't get recompiled. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Hi Tom, I didn't change my mind about prefix. I have tried to do everything by the book. [EMAIL PROTECTED] postgres]$ pg_config --pkglibdir /opt/postgres-7.4.1//lib Really weird. One thing I have thought of is, shouldn't there be an etc directory in /opt/postgres-7.4.1: [EMAIL PROTECTED] postgres]$ ll /opt/postgres-7.4.1/ total 24 drwxr-xr-x2 postgres postgres 4096 Feb 2 18:28 bin drwxr-xr-x3 postgres postgres 4096 Feb 2 18:01 doc drwxr-xr-x5 postgres postgres 4096 Feb 2 18:02 include drwxr-xr-x2 postgres postgres 4096 Feb 2 18:02 lib drwxr-xr-x4 postgres postgres 4096 Feb 2 18:01 man drwxr-xr-x2 postgres postgres 4096 Feb 2 18:27 share ? Thanks for your effort! Rgds /Thomas. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 6:58 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" <[EMAIL PROTECTED]> writes: > for some reason - conversion_create.sql the $libdir is not defined. I tried > to print $libdir from bin/initdb, but this variable is empty. $libdir is not an environment variable, it's a notation specially recognized by CREATE FUNCTION. It should expand to the same directory printed by "pg_config --pkglibdir". You might check what that prints. The only other idea that comes to mind is that you changed your mind about the install prefix during the installation and didn't do a full rebuild. The PKGLIBDIR setting is hardwired into dfmgr.o at compile time and maybe it didn't get recompiled. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] postgres]$ pg_config --pkglibdir > /opt/postgres-7.4.1//lib Hmm. I wonder if the double slash could be causing a problem? I wouldn't think so, but we're running out of ideas. Could you try rebuilding with the trailing slash left off your --prefix setting? > One thing I have thought of is, shouldn't there be an etc directory in > /opt/postgres-7.4.1: Nope. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Hi again :-) I replaced "$libdir" with "/opt/postgres-7.4.1/lib" throughout /opt/postgres-7.4.1/share/conversion_create.sql -- then initdb succeeded! I think this'll work for now :-). Thanks for your time and effort! /Thomas. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Monday, February 02, 2004 7:15 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" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] postgres]$ pg_config --pkglibdir > /opt/postgres-7.4.1//lib Hmm. I wonder if the double slash could be causing a problem? I wouldn't think so, but we're running out of ideas. Could you try rebuilding with the trailing slash left off your --prefix setting? > One thing I have thought of is, shouldn't there be an etc directory in > /opt/postgres-7.4.1: Nope. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> 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
[BUGS] createdb fails
Hi, Running postgresql v7.3 on RH7.3 linux; db creation fails and is reproducible after a fresh image install. Any subsequent rebooting seems to work fine. We start up Postgres, create users and db using a Java (IBM1.4.1) class. The following commands are executed in the following order: /usr/local/pgsql/bin/pg_ctl -w start -D /var/lib/pgsql -l /var/log/pgsqld.log -o –i /usr/local/pgsql/bin/createdb management ß fails here /usr/local/pgsql/bin/createdb test ß fails here Any help on what’s causing this behavior and how to fix is appreciated. -Allen +==+ pgsqld.log: 2004-02-02 17:33:00 [1555] LOG: database system is ready 2004-02-02 17:33:01 [1557] LOG: connection received: host=[local] 2004-02-02 17:33:01 [1557] LOG: connection authorized: user=pgsql database=template1 2004-02-02 17:33:01 [1557] LOG: query: begin; select getdatabaseencoding(); commit 2004-02-02 17:33:01 [1557] LOG: duration: 0.035097 sec 2004-02-02 17:33:01 [1557] LOG: query: SELECT d.datname as "Name", u.usename as "Owner", pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding" FROM pg_catalog.pg_database d LEFT JOIN pg_catalog.pg_user u ON d.datdba = u.usesysid ORDER BY 1; 2004-02-02 17:33:01 [1557] LOG: duration: 0.024846 sec 2004-02-02 17:33:01 [1596] LOG: connection received: host=[local] 2004-02-02 17:33:01 [1596] LOG: connection authorized: user=pgsql database=template1 2004-02-02 17:33:01 [1596] LOG: query: begin; select getdatabaseencoding(); commit 2004-02-02 17:33:01 [1596] LOG: duration: 0.000521 sec 2004-02-02 17:33:01 [1596] LOG: query: SET autocommit TO 'on';CREATE DATABASE "management" 2004-02-02 17:33:01 [1621] LOG: connection received: host=[local] 2004-02-02 17:33:01 [1621] LOG: connection authorized: user=pgsql database=template1 2004-02-02 17:33:01 [1621] LOG: query: begin; select getdatabaseencoding(); commit 2004-02-02 17:33:01 [1621] LOG: duration: 0.000509 sec 2004-02-02 17:33:01 [1621] LOG: query: SET autocommit TO 'on';CREATE USER "management" CREATEDB CREATEUSER 2004-02-02 17:33:01 [1626] LOG: connection received: host=[local] 2004-02-02 17:33:01 [1626] LOG: connection authorized: user=pgsql database=template1 2004-02-02 17:33:01 [1626] LOG: query: begin; select getdatabaseencoding(); commit 2004-02-02 17:33:01 [1626] LOG: duration: 0.000509 sec 2004-02-02 17:33:01 [1626] LOG: query: SET autocommit TO 'on';CREATE DATABASE "test" 2004-02-02 17:33:01 [1626] ERROR: CREATE DATABASE: source database "template1" is being accessed by other users 2004-02-02 17:33:01 [1631] LOG: connection received: host=[local] 2004-02-02 17:33:01 [1631] LOG: connection authorized: user=pgsql database=management **This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you.**
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 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 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> writes: > Does this give you any clues ? That's what I expected, but it doesn't tell me anything new. Could you try strace-ing the backend while you execute the CREATE FUNCTION command? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> 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) = 160 > gettimeofday({1075756990, 462661}, NULL) = 0 > stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No > such file or directory) > stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT (No > such file or directory) > stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or > directory) > write(2, "ERROR: could not access file \"$"..., 81) = 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 [EMAIL PROTECTED]
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Yes; you're right. Sorry. Meanwhile, I also discovered, my RedHat may originally have put a competing postgres onto the system from some RPM. [EMAIL PROTECTED] root]# rpm -q postgresql postgresql-7.2.1-5 So now I've done: [EMAIL PROTECTED] root]# rpm --erase postgresql postgresql-server postgresql-contrib php-pgsql After having done the "rpm --erase" I cleaned the /data/postgres and /opt/postgres-7.4.1 directories; re-created the postgres user, but initdb still had the same fault. So I re-inserted the "absolute path"-hack; 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) = 160 gettimeofday({1075756990, 462661}, NULL) = 0 stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No such file or directory) stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT (No such file or directory) stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or directory) write(2, "ERROR: could not access file \"$"..., 81) = 81 send(8, "E\0\0\0\202SERROR\0C58P01\0Mcould not ac"..., 131, 0) = 131 rt_sigprocmask(SIG_SETMASK, ~[QUIT ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP SYS], NULL, 8) = 0 time(NULL) = 1075756990 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 send(8, "Z\0\0\0\5I", 6, 0) = 6 recv(8, It seems to search in /usr/local/pgsql -- but that directory does not exist (at least not after the rpm --erase). Does this give you a clue ? Rgds /Thomas. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 9:52 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" <[EMAIL PROTECTED]> writes: > Does this give you any clues ? That's what I expected, but it doesn't tell me anything new. Could you try strace-ing the backend while you execute the CREATE FUNCTION command? regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
So, I removed dfmgr.o, and remade it: [EMAIL PROTECTED] fmgr]$ make gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include -D_GNU_SOURCE -DPKGLIBDIR=\"/opt/postgres-7.4.1//lib\" -DDLSUFFIX=\".so\" -c -o dfmgr.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 := /opt/postgres-7.4.1/ ... libdir := ${exec_prefix}/lib pkglibdir = $(libdir) ifeq "$(findstring pgsql, $(pkglibdir))" "" ifeq "$(findstring postgres, $(pkglibdir))" "" override pkglibdir := $(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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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 "Thomas Borg Salling" <[EMAIL PROTECTED]> 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) = 160 > gettimeofday({1075756990, 462661}, NULL) = 0 > stat64("/usr/local/pgsql/lib/ascii_and_mic", 0xbfffca10) = -1 ENOENT (No > such file or directory) > stat64("/usr/local/pgsql/lib/ascii_and_mic.so", 0xbfffca10) = -1 ENOENT (No > such file or directory) > stat64("$libdir/ascii_and_mic", 0xbfffcad0) = -1 ENOENT (No such file or > directory) > write(2, "ERROR: could not access file \"$"..., 81) = 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 [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
"Thomas Borg Salling" <[EMAIL PROTECTED]> writes: > Here is the strace (with my comments in -shes): It looks like you strace'd the postmaster ... I wanted the backend subprocess that's spawned for the particular psql connection. regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [BUGS] BUG #1072: "$libdir/ascii_and_mic": No such file or directory
Hi again, Here is the strace (with my comments in -shes): [EMAIL PROTECTED] postgres]$ strace /opt/postgres-7.4.1/bin/postmaster -D /data/postgres/ -i execve("/opt/postgres-7.4.1/bin/postmaster", ["/opt/postgres-7.4.1/bin/postmaster", "-D", "/data/postgres/", "-i"], [/* 27 vars */]) = 0 uname({sys="Linux", node="hubertus", ...}) = 0 brk(0) = 0x8270984 open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or directory) open("/usr/local/pgsql/lib/mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/pgsql/lib/mmx", 0xbfffdf80) = -1 ENOENT (No such file or directory) open("/usr/local/pgsql/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/pgsql/lib", 0xbfffdf80) = -1 ENOENT (No such file or directory) open("/opt/postgres-7.4.1/lib/mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/opt/postgres-7.4.1/lib/mmx", 0xbfffdf80) = -1 ENOENT (No such file or directory) open("/opt/postgres-7.4.1/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/opt/postgres-7.4.1/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("mmx/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=116236, ...}) = 0 old_mmap(NULL, 116236, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3)= 0 open("/usr/lib/libz.so.1", O_RDONLY)= 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\31\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=59778, ...}) = 0 old_mmap(NULL, 54984, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40031000 mprotect(0x4003d000, 5832, PROT_NONE) = 0 old_mmap(0x4003d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x4003d000 close(3)= 0 open("/opt/postgres-7.4.1/lib/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or directory) open("mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or directory) open("libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/libreadline.so.4", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\243"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=184567, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4003f000 old_mmap(NULL, 153200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004 mprotect(0x40061000, 18032, PROT_NONE) = 0 old_mmap(0x40061000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x21000) = 0x40061000 old_mmap(0x40065000, 1648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40065000 close(3)= 0 open("/opt/postgres-7.4.1/lib/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("mmx/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libtermcap.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\r\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=11832, ...}) = 0 old_mmap(NULL, 14932, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40066000 mprotect(0x40069000, 2644, PROT_NONE) = 0 old_mmap(0x40069000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x40069000 close(3)= 0 open("/opt/postgres-7.4.1/lib/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("mmx/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/libcrypt.so.1", O_RDONLY)= 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\t\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=23575, ...}) = 0 old_mmap(NULL, 182876, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4006a000 mprotect(0x4006f000, 162396, PROT_NONE) = 0 old_mmap(0x4006f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x4006f000 old_mmap(0x4007, 158300, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4007 close(3)= 0 open("/opt/postgres-7.4.1/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) open("mmx/libresolv.so.2", O_RDONLY)= -1 ENOENT (No such file or directory) open("libresolv.so.2", O_RDONLY)= -1 ENOENT (No such file or directory) open("/lib/libresolv.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\'\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=68925, ...}) = 0 old_mmap(NULL, 69408, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40097000 mprotect(0x400a5000, 12064, PROT_NONE) = 0 old_mmap(0x400