Build issues: "-static" builds resulting initdb problems

From: "Metin Ozisik" <metin(at)evincetek(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Build issues: "-static" builds resulting initdb problems
Date: 2005-04-25 22:13:45
Message-ID: 003a01c549e4$1485eea0$3401a8c0@pengu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Version: 8.0.2

Platforms: Linux, Fedora Core 2, Suse 9.2, Mandrake 10.1

Build time parameter: CFLAGS="-static" ./configure

results in a staticly linked binaries. (you are supposed to have static lib versions of readline, ncurses, etc, etc. of course)

However, conversion shared objects built in src/backend/utils/mb/conversion_procs still retain unresolved symbols, like: LocalToUtf, UtfToLocal, pg_ascii2mic, pg_mic2ascii (from src/backend/utils/mb/conv.c), as may be observed in:

for i in utf8*.so; do echo $i.....; nm $i | grep " U "; done

During initdb time, (I think initdb calls postgres and postgres attempts to load them.., regardless, both binaries are static), postgres' attempt to load conversion_procs fails with:

initdb --pgdata=/some/directory -L /some/dir/pgsql/share
....
loading pg_descriptions... ok
creating conversions ... FATAL: could not load library "../ascii_and_misc.so": ../../ascii_and_misc.so: undefined symbol: pg_mic2ascii
child process exited with exit code 1

I think a dynamic version of postgres would have supplied the unresolved symbols in shared-object load time, hence that wouldn't be an issue.

It seems undefined symbols in lib/utf8_and_*.so conversion procs (the four symbols listed above, from conv.c) needs to be resolved in link-time, so a "-static" build can work.

Regards,
-metin

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Langille 2005-04-26 02:21:35 people who buy A, also buy C, D, E
Previous Message Veronica L Bounmixay 2005-04-25 21:45:01 Re: Coming from Oracle SQL