Undefined symbol

From: Boulat Khakimov <boulat(at)inet-interactif(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Undefined symbol
Date: 2001-03-06 23:44:31
Message-ID: 3AA5765F.75350FEA@inet-interactif.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Hi,

Im writing a function in C (encode) for PG that uses blowfish encryption
here is how I compile it.

gcc -I/usr/src/postgresql-7.0.3/src/include
-I/usr/src/postgresql-7.0.3/src/backend -O2 -Wall -Wmissing-prototypes
-Wmissing-declarations -lcrypt
-I/usr/src/postgresql-7.0.3/src/interfaces/libpq
-I/usr/src/postgresql-7.0.3/src/include -fpic
-I/home/boulat/Funio.com/database/libblowfish.a -c -o encode.o
encode.c

it compiles nicely with 0 error or warnings,

then i do
gcc -shared -o encode.so encode.o
rm encode.o

so now im left we a ready to go encode.so , So now I add that function
to DB

testdb=# CREATE FUNCTION encode(text,text)
testdb-# RETURNS text
testdb-# AS '/home/boulat/Funio.com/database/encode.so'
testdb-# LANGUAGE 'C';
CREATE

no problems there either, BUT ...

testdb=# select encode('bob','bob');
ERROR: Load of file /home/boulat/Funio.com/database/encode.so failed:
/home/boulat/Funio.com/database/encode.so: undefined symbol:
BF_cfb64_encrypt

thats the function that I call from inside my c code...
but Why??? It compiled with no errors or warning, and I have all the
right includes in my source code.

Im confused!

Any help would be appreciated.

Regards,
Boulat Khakimov

--
Nothing Like the Sun

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Warren Vanichuk 2001-03-06 23:46:48 vacuum analyze returns "OID IS INVALID. TUPGONE 1" on pg_language
Previous Message Warren Vanichuk 2001-03-06 23:42:40 Re: Inserting values into a SERIAL field

Browse pgsql-sql by date

  From Date Subject
Next Message Mathijs Brands 2001-03-06 23:46:01 Re: Re: [HACKERS] why the DB file size does not reduce when 'delete'the data in DB?
Previous Message David Lynn 2001-03-06 22:24:30 Re: Comparing dates