pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Postgresql under OS X with pkgsrc - Failure during initdb - creating dictionaries



Postgresql (postgresql83-server-8.3.7) can be built and installed from
pkgsrc on OS X Leopard, but dies with a fatal error when initdb is run
to initialize the database, and it seems that the error is "FATAL:
could not access file "$libdir/libdict_snowball": No such file or
directory":

sh-3.2$ /usr/pkg/bin/initdb -D /usr/pkg/pgsql/data
The files belonging to this database system will be owned by user
"pgsql".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/pkg/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 12MB/76800
creating configuration files ... ok
creating template1 database in /usr/pkg/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... FATAL:  could not access file
"$libdir/libdict_snowball": No such file or directory
STATEMENT:  -- Language-specific snowball dictionaries
            -- $PostgreSQL:
            pgsql/src/backend/snowball/snowball_func.sql.in,v 1.2
            2007/09/03 02:30:43 tgl Exp $$
                    SET search_path = pg_catalog;
                    CREATE FUNCTION dsnowball_init(INTERNAL)
                RETURNS INTERNAL AS '$libdir/libdict_snowball',
                'dsnowball_init'
                LANGUAGE C STRICT;
....(snip)


......many  many lines of snowball specific SQL and then finally....
    ALTER TEXT SEARCH CONFIGURATION turkish ADD MAPPING
        FOR asciiword, hword_asciipart, asciihword
                   WITH turkish_stem;
                   ALTER TEXT SEARCH CONFIGURATION turkish ADD MAPPING
               FOR word, hword_part, hword
                   WITH turkish_stem;
                                   child process exited with exit code 1
initdb: removing contents of data directory "/usr/pkg/pgsql/data"

===============
There is no problem when running initdb if postgresql is built from
the distfile. Interestingly enough when built outside of pkgsrc the
shared library has a .so extension:
$ ls /usr/local/postgresql83b7/lib/*snowball*
/usr/local/postgresql83b7/lib/dict_snowball.so

but is a .dylib under pkgsrc:

sh-3.2$ ls -l /Volumes/pkgsrc/pkg/lib/postgresql | grep snowball
-rwxr-xr-x  1 root  wheel   341480 Feb 27 17:06
libdict_snowball.0.0.0.dylib
lrwxr-xr-x  1 root  wheel       28 Feb 27 17:06
libdict_snowball.0.dylib -> libdict_snowball.0.0.0.dylib
lrwxr-xr-x  1 root  wheel       28 Feb 27 17:06 libdict_snowball.dylib
-> libdict_snowball.0.0.0.dylib
-rwxr-xr-x  1 root  wheel      893 Feb 27 17:06 libdict_snowball.la

I tried various symlinks but the problem seems to be related to
pkgsrc; initdb got through the "creating conversions" step, which
apparently relies heavily on shared libraries.

Regards,
Jonathan.


Home | Main Index | Thread Index | Old Index