pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Metin Ozisik <metin@evincetek.com>
To: pgsql-sql@postgresql.org
Subject: Build issues: "-static" builds resulting initdb problems
Date: Mon, 25 Apr 2005 15:13:45 -0700
Message-ID: <003a01c549e4$1485eea0$3401a8c0@pengu> (raw)

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

view thread (5+ messages)  latest in thread

Message-ID: <003a01c549e4$1485eea0$3401a8c0@pengu>
Permalink:  ../003a01c549e4$1485eea0$3401a8c0@pengu/
Also on:    postgresql.org/message-id/003a01c549e4$1485eea0$3401a8c0@pengu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: metin@evincetek.com
  Subject: Re: Build issues: "-static" builds resulting initdb problems
  In-Reply-To: <003a01c549e4$1485eea0$3401a8c0@pengu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox