Skip site navigation (1) Skip section navigation (2)

Undefined symbols in pgsql libraries using Solaris 2.8/Sparc

From: Oyvind Hallsteinsen <oyvindh(at)idb(dot)hist(dot)no>
To: pgsql-ports(at)postgresql(dot)org
Subject: Undefined symbols in pgsql libraries using Solaris 2.8/Sparc
Date: 2001-07-10 11:02:49
Message-ID: 3B4AE0D9.1C0FC876@idb.hist.no (view raw or flat)
Thread:
Lists: pgsql-ports
I've been trying to install PostgreSQL 7.1.2 on machine running Solaris
8 4/01 Sparc using GCC 3.95.3, GNU ld 2.11.2 and GNU make 3.79.1.

I'm having a lot of trouble with undefined symbols. libpq.so says it has
no recollection of the symbol "main", which naturally makes it unable to
do anything. 

plpgsql.so has a lot of undefined symbols, but this is maybe not a
problem? Compilation technology is not my strong side I'm afraid :)



Ok, my story goes as this:

Building pgsql 7.1.2 on the solaris/sparc computer:
% export LD_LIBRARY_PATH=/usr/local/lib;
% ./configure --prefix=/www/local/pgsql
% make
% make install

This worked out fine, I was able to start the daemon, create a database
and log in using psql. Assuming everything was fine, I went on to
compiling php.

I compiled php 4.0.6 with pgsql support, which worked fine.

However, when httpd tries to load libphp4.so it dies with the following
error:
-----------------------------------------
bash-2.05# /www/bin/apachectl start
Syntax error on line 205 of /www/conf/httpd.conf:
Cannot load /www/libexec/libphp4.so into server: ld.so.1:
/www/bin/httpd: fatal: relocation error: file /usr/lib/libpq.so.2:
symbol main: referenced symbol not found
/www/bin/apachectl start: httpd could not be started
-----------------------------------------


A look at libpq.so reveils the following:
-----------------------------------------
bash-2.05# ldd -r /www/local/pgsql/lib/libpq.so.2
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
        symbol not found: main         
(/www/local/pgsql/lib/libpq.so.2)
-----------------------------------------


Even worse:
-----------------------------------------
bash-2.05# ldd -r /www/local/pgsql/lib/plpgsql.so 
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
        symbol not found: main         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: namein               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: textout              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: CurrentMemoryContext         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: textin               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_tuptable         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_lastoid          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: nameout              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: Warn_restart         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: TopMemoryContext             
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_processed        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_getvalue         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SearchSysCache               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_finish           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MakeExprContext              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_copytuple        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: pg_atoi              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_connect          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: pfree        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: xlateSqlType         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: length               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: FunctionCall3        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: get_typlenbyval              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_saveplan         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_exec             
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: get_temp_rel_by_physicalname         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_fnumber          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MemoryContextAlloc           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_push             
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_pop              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: FreeExprContext              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: heap_formtuple               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_gettypeid        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MemoryContextSwitchTo        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: datumCopy            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: fmgr_info            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: DirectFunctionCall1          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_execp            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: ReleaseSysCache              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: ExecEvalExprSwitchContext            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_prepare          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_palloc           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: elog         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: exprType             
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_getbinval        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: repalloc             
(/www/local/pgsql/lib/plpgsql.so)
-----------------------------------------


I also tried compiling PostgreSQL 7.0.3. I now had no trouble with
libpq, and thus was able to load httpd.

PostgreSQL 7.0.3 libpq.so:
-----------------------------------------
bash-2.05# ldd /www/local/pgsql/lib/libpq.so
        libcrypt_i.so.1 =>       /usr/lib/libcrypt_i.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libgen.so.1 =>   /usr/lib/libgen.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
-----------------------------------------


plpgsql.so on the other hand, had other missing symbols in 7.0.3 than it
had in 7.1.2:
-----------------------------------------
bash-2.05# ldd -r /www/local/pgsql/lib/plpgsql.so 
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
        symbol not found: CurrentMemoryContext         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_tuptable         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: fmgr_pl_finfo        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: Warn_restart         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: CurrentTriggerData           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_processed        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_getvalue         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: namein               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: textout              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: int2in               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_finish           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_copytuple        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_connect          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: length               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_saveplan         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: get_temp_rel_by_physicalname         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_fnumber          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MemoryContextAlloc           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_push             
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: newNode              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: textin               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_pop              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: heap_formtuple               
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_gettypeid        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: ExecEvalExpr         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SearchSysCacheTuple          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MemoryContextFree            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: nameout              
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: fmgr_info            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_execp            
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_prepare          
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_palloc           
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: elog         
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: SPI_getbinval        
(/www/local/pgsql/lib/plpgsql.so)
        symbol not found: MemoryContextRealloc         
(/www/local/pgsql/lib/plpgsql.so)
-----------------------------------




Just for fun, i compiled PostgreSQL 7.1.2 on a GNU/Linux machine with
kernel 2.2.19, GCC 2.95.2, GNU ld 2.9.5 and GNU make 3.79. configure,
make and make install went on without any trouble.

libpq.so seemed all right on the Linux box:
-----------------------------------
root(at)hermine /# ldd -r /usr/local/pgsql/lib/libpq.so
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x40013000)
	libresolv.so.2 => /lib/libresolv.so.2 (0x40040000)
	libnsl.so.1 => /lib/libnsl.so.1 (0x40050000)
	libc.so.6 => /lib/libc.so.6 (0x40067000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
-----------------------------------


plpgsql.so on the Linux box did not seem so good:
-----------------------------------
root(at)hermine /# ldd -r /usr/local/pgsql/lib/plpgsql.so 
	libc.so.6 => /lib/libc.so.6 (0x4002a000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
undefined symbol: namein	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: textout	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: CurrentMemoryContext	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: textin	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_tuptable	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_lastoid	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: nameout	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: Warn_restart	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: TopMemoryContext	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_processed	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_getvalue	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SearchSysCache	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_finish	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: MakeExprContext	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_copytuple	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: pg_atoi	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_connect	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: pfree	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: xlateSqlType	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: length	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: FunctionCall3	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: get_typlenbyval	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_saveplan	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_exec	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: get_temp_rel_by_physicalname
(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_fnumber	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: MemoryContextAlloc	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_push	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_pop	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: FreeExprContext	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: heap_formtuple	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_gettypeid	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: MemoryContextSwitchTo
(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: datumCopy	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: fmgr_info	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: DirectFunctionCall1	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_execp	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: ReleaseSysCache	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: ExecEvalExprSwitchContext
(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_prepare	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_palloc	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: elog	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: exprType	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: SPI_getbinval	(/usr/local/pgsql/lib/plpgsql.so)
undefined symbol: repalloc	(/usr/local/pgsql/lib/plpgsql.so)
-----------------------------------

I installed the postgresql binary rpm distribution on a 3rd machine
running redhat 6.2 out-of-the-box. plpgsql.so had the same problems
here.


---
-- √ėyvind Hallsteinsen, HIST IDB --

Responses

pgsql-ports by date

Next:From: Andre SchnabelDate: 2001-07-11 05:54:31
Subject: Re: [PORTS] Compilation on Solaris 2.8
Previous:From: NamrataDate: 2001-07-09 12:44:15
Subject: problem with compilation!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group