Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-03 Thread mona attariyan
Thanks a lot for the details. Hopefully, I'll be able to pull it off. --Mona --- On Fri, 7/1/11, Craig Ringer wrote: From: Craig Ringer Subject: Re: [GENERAL] statically compiling postgres and problem with initdb To: "Tom Lane" Cc: "mona attariyan" , pgsql-general@po

Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread Craig Ringer
On 1/07/2011 11:48 PM, Tom Lane wrote: It might be easier to rip out the functionality that expects loadable libraries to work. I think you could probably get through initdb if you just disabled creation of encoding-conversion functions and text search dictionaries (try #ifdef'ing out the relev

Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread Tom Lane
Craig Ringer writes: > On 1/07/2011 5:11 PM, mona attariyan wrote: >> I'm using Postgres to evaluate a research tool and the tool doesn't work >> with dynamic libraries. That's why I need to compile it statically. > For your purposes, you'll have to modify PostgreSQL to support being > built sta

Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread Craig Ringer
On 1/07/2011 5:11 PM, mona attariyan wrote: > CFLAGS="-O0 -I/[PATH]/glibc-2.5.1-custom/prefix/include -static Yeah, it's not as simple as that, because Pg expects to be dynamically linked and to be able to dlopen() libraries and dlsym() resolve function pointers from them at runtime. > creat

Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread mona attariyan
_to_mic (INTEGER, INTEGER, CSTRING, INTERNAL, INTEGER) RETURNS VOID AS '$libdir/ascii_and_mic', 'ascii_to_mic' LANGUAGE C STRICT; Thanks--Mona --- On Fri, 7/1/11, Craig Ringer wrote: From: Craig Ringer Subject: Re: [GENERAL] statically compiling postgres and problem with init

Re: [GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread Craig Ringer
On 1/07/2011 3:28 PM, mona attariyan wrote: Hi, I statically compiled my postgres and I got the following message when I ran initdb: How did you compile Pg statically? Please show your configure command line, any environment variables you set, etc. You've also left out a huge amount of info

[GENERAL] statically compiling postgres and problem with initdb

2011-07-01 Thread mona attariyan
Hi,I statically compiled my postgres and I got the following message when I ran initdb: creating conversions ... FATAL:  could not load library "/usr/local/pgsql/lib/ascii_and_mic.so": /usr/local/pgsql/lib/ascii_and_mic.so: undefined symbol: pg_ascii2micSTATEMENT:  CREATE OR REPLACE FUNCTION as