postgres a relocation error

Michal Fric mike na p4.mepnet.cz
Úterý Únor 22 09:49:35 CET 2000


On 21-Feb-2000 Karel Zak - Zakkr wrote:
>> 
>> [mike na hercules src]$ ./configure
>                       ^^^^^^^^^^^^^^ ??? tim bych si jist nebyl, ze 
> tam bude i sablona.
> 
Napsal jsem to tak jenom pro zjednoduseni. Omlovam se ze jsem uvedl
zavadejici informaci :-). Normalne postupuji nasledujicim zpusobem. (delal jsem
to uz asi 50x a zkousel vsechno mozne proto to slovicko normalne).
Jinak dekuji za snahu, kdyby vas k tomu neco napadlo (cokoliv nebranim se
cteni manu a atd.) budu velmi vdecny.

[mike na hercules compile]$ tar xf postgresql-6.5.3.tar
[mike na hercules compile]$ cd postgresql-6.5.3/src/
[mike na hercules src]$ export LD_RUN_PATH=/usr/local/pgsql/lib
To je popsano ve FAQ.solaris

The default installation procedure puts the shared libraries
into "/usr/local/pgsql/lib", but the dynamic loader won't
find them there at runtime unless you use some hack like
symlinking the libraries in /usr/lib or setting LD_LIBRARY_PATH
for every user that will use the DB system.

We recommend that you store the path of the directory containing
the libraries in the environment variable LD_RUN_PATH *before*
starting the build. This will cause the linker to store this
path in the binaries.

[mike na hercules src]$ export PATH=/usr/local/bin:$PATH
Pro jistotu, GNU make a atd. jsou nainstalovany prave v tomto adresari.

[mike na hercules src]$ ./configure --prefix=/usr/local/pgsql \
                                --enable-hba \
                                --enable-locale \
                                 --with-odbc --with-odbcinst=/etc/odbc \
                                --with-tcl --with-perl \
                                --with-template=solaris_sparc_gcc \
                                --with-x > log.config  2>&1 & 

[mike na hercules src]$ tail -f log.config  - pockam na skonceni

Podle INSTALL se ted ma nainstalovat dokumentace, tak jako root:
[root na hercules doc]# export PATH=/usr/local/bin:$PATH
[root na hercules doc]# mkdir /usr/local/pgsql
[root na hercules doc]# make install

Dale pokracuje make postgresu.

[mike na hercules src]$ make all > log.make 2>&1 &
[mike na hercules src]$ tail -f log.make - pockam na skonceni

Vse se zda OK posledni radka make je
All of PostgreSQL is successfully made. Ready to install. 
Pak jako root
[root na hercules src]# make install
Dale se prihlasim jako postgres pro jistotu jeste nastavim LD_LIBRARY_PATH
[postgres na hercules postgres]$ export LD_LIBRARY_PATH=/usr/local/pgsql/lib 
Pak nastavim PGDATA, PGLIB a nainicializuji DB.
[postgres na hercules postgres]$ initdb
Spustim postgres
[postgres na hercules postgres]$nohup postmaster -i > pgserver.log 2>&1 &

No kdyz se snazim vytvorit funkci tak jak jsem jiz popsal, skoncim s chybou
postgres=> select add_one(*);
ERROR:  Load of file /usr/local/pgsql/lib/plpgsql.so failed: ld.so.1:
/usr/local/pgsql/bin/postmaster: fatal: relocation error: file
/usr/local/pgsql/lib/plpgsql.so: symbol CurrentMemoryContext: referenced symbol
not found
postgres=> \q
Nevim jak dal.

+------------------------------------------------------
|Michal Fric
|MC Praha 4
|E-Mail: Michal Fric <mike na p4.mepnet.cz>
|Tel.: 61192180
|Date: 22-Feb-2000
+------------------------------------------------------


Další informace o konferenci Databases