Thread: FATAL error could not find function "alt_to_mic" in file cyrillic_and_mic.so

FATAL error could not find function "alt_to_mic" in file cyrillic_and_mic.so

From
"Jayaraman, Rajaram (STSD)"
Date:

Hi

 

I have compiled PostgreSQL version 8.4.1 on HPUX 11iV3 (HPUX 11.31) on a ia64 hp server BL870c. When I try to start the database it creates the data directory and while initializing it gets till creating conversions and then throws a FATAL error “could not find function "alt_to_mic" in file "/opt/psb/db/pgsql/lib/cyrillic_and_mic.so" “.

 

Can someone please help me in solving this problem.

 

The messages while starting the database

 

The files belonging to this database system will be owned by user "db".

This user must also own the server process.

 

The database cluster will be initialized with locale C.

The default database encoding has accordingly been set to SQL_ASCII.

The default text search configuration will be set to "english".

 

fixing permissions on existing directory /var/opt/psb/db/pgsql ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 32MB

creating configuration files ... ok

creating template1 database in /var/opt/psb/db/pgsql/base/1 ... ok

initializing pg_authid ... ok

initializing dependencies ... ok

creating system views ... ok

loading system objects' descriptions ... ok

creating conversions ... FATAL:  could not find function "alt_to_mic" in file "/opt/psb/db/pgsql/lib/cyrillic_and_mic.so"

STATEMENT:  CREATE OR REPLACE FUNCTION alt_to_mic (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$libdir/cyrillic_and_mic', 'alt_to_mic' LANGUAGE 'c' STRICT;

 

child process exited with exit code 1

initdb: removing contents of data directory "/var/opt/psb/db/pgsql"

 

Regards

 

Rajaram J

We all make mistakes, but it's our responses to said mistakes that separate true leaders from the rest of the pack.

Jayaraman, Rajaram (STSD) wrote:

> I have compiled PostgreSQL version 8.4.1 on HPUX 11iV3 (HPUX 11.31) on a
> ia64 hp server BL870c. When I try to start the database it creates the
> data directory and while initializing it gets till creating conversions
> and then throws a FATAL error “could not find function "alt_to_mic" in
> file "/opt/psb/db/pgsql/lib/cyrillic_and_mic.so" “.

Is there any chance you had a prior version of PostgreSQL installed in
/opt/psb/db/pgsql/ ?

If so, try building PostgreSQL with a new prefix (say
/opt/psb/db/pgsql84/ ).

> *creating conversions ... FATAL:  could not find function "alt_to_mic"
> in file "/opt/psb/db/pgsql/lib/cyrillic_and_mic.so"*

You might also want to examine cyrillic_and_mic.so by listing its
symbols. HP-UX uses the "nm" command for this, so:

nm /opt/psb/db/pgsql/lib/cyrillic_and_mic.so

might be informative.

--
Craig Ringer

Please reply to the list, not just to me. My reply follows inline.

Jayaraman, Rajaram (STSD) wrote:

> I replaced the file conversion_create.sql and the db got created.

Yes, but you never found out why it happened in the first place. I
strongly suspect your install is busted, probably due to an incomplete
install over an older version. You haven't given enough information to
be sure of that, but you clearly have an old version kicking around
somewhere that's interfering with your new one, and the most common
reason is installing on the same prefix (incompletely, or without
cleaning the old install out first).

Try installing your new version to a new, clean prefix and see if you
still have problems.

> When I try to connect to the DB and perform insert/update/delete/select operations from the command line all seems to
beworking fine, but when I try to use my application to connect to the DB I get the following message in the log file
andthe connection aborts. 
>
> LOG:  getsockname() failed: Invalid argument
> LOG:  incomplete startup packet

Is your app using the same version of libpq as `psql' ? Use whatever
linker trace tool exists on HPUX (or search for "ldd hpux" which will
probably tell you).

Are you connecting with the same host argument in both cases? In
particular, might you be connecting over a unix socket (the default)
with `psql', and tcp/ip with your application? That might be a clue.

Does the system have IPv6 enabled?

--
Craig Ringer