X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DB24B5295E for ; Mon, 25 Apr 2005 19:14:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55790-10 for ; Mon, 25 Apr 2005 22:14:30 +0000 (GMT) Received: from delta.evincetek.com (h-67-102-112-170.snvacaid.covad.net [67.102.112.170]) by svr1.postgresql.org (Postfix) with ESMTP id A9A7A5294E for ; Mon, 25 Apr 2005 19:14:25 -0300 (ADT) Received: from pengu (pengu.evincetek.com [192.168.1.52]) (authenticated bits=0) by delta.evincetek.com (8.12.11/8.12.11) with ESMTP id j3PMMArR025294 for ; Mon, 25 Apr 2005 15:22:25 -0700 Message-ID: <003a01c549e4$1485eea0$3401a8c0@pengu> From: "Metin Ozisik" To: Subject: Build issues: "-static" builds resulting initdb problems Date: Mon, 25 Apr 2005 15:13:45 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0033_01C549A9.5FA18A10" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.146 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_50_60, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200504/399 X-Sequence-Number: 21292 This is a multi-part message in MIME format. ------=_NextPart_000_0033_01C549A9.5FA18A10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Version: 8.0.2 Platforms: Linux, Fedora Core 2, Suse 9.2, Mandrake 10.1 Build time parameter: CFLAGS=3D"-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=3D/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 ------=_NextPart_000_0033_01C549A9.5FA18A10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Version: 8.0.2
 
Platforms: Linux, Fedora Core 2, Suse = 9.2, Mandrake=20 10.1
 
Build time parameter: = CFLAGS=3D"-static"=20 ./configure
 
        = results in a=20 staticly linked binaries. (you are supposed to have static lib versions = of=20 readline, ncurses, etc, etc. of course)
 
However, conversion shared objects = built in=20 src/backend/utils/mb/conversion_procs still retain unresolved symbols, = like:=20 LocalToUtf, UtfToLocal, pg_ascii2mic, pg_mic2ascii (from=20 src/backend/utils/mb/conv.c), as may be observed in:
 
       = for i in=20 utf8*.so; do echo $i.....; nm $i | grep " U "; done
 
 
During initdb time, (I think initdb = calls postgres=20 and postgres attempts to load them.., regardless, both binaries are = static),=20 postgres' attempt to load conversion_procs fails with:
 
    initdb = --pgdata=3D/some/directory=20 -L /some/dir/pgsql/share
    ....
    loading = pg_descriptions...=20 ok
    creating conversions = ... FATAL:=20 could not load library "../ascii_and_misc.so": ../../ascii_and_misc.so:=20 undefined symbol: pg_mic2ascii
    child process exited = with exit=20 code 1
 
 
I think a dynamic version of postgres = would have=20 supplied the unresolved symbols in shared-object load time, hence that = wouldn't=20 be an issue.
 
It seems undefined symbols in = lib/utf8_and_*.so=20 conversion procs (the four symbols listed above, from conv.c) needs to = be=20 resolved in link-time, so a "-static" build can work.
 
Regards,
-metin
 
 
 
------=_NextPart_000_0033_01C549A9.5FA18A10--