--On Thursday, March 18, 2004 23:03:16 -0500 Bruce Momjian <[EMAIL PROTECTED]> wrote:

Larry Rosenman wrote:
On Thu, 18 Mar 2004, Larry Rosenman wrote:

> I attempted(!) to compile up CVS Head, and if you
> --enable-thread-safety, you need to include the THREADS stuff to cc:
>
> gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/port'
> cc -O -Kinline initdb.o -L../../../src/interfaces/libpq -lpq
> -L../../../src/port -L/usr/local/lib -Wl,-R/usr/local/pgsql/lib -lz
> -lreadline -ltermcap -lresolv -lgen -lld -lsocket -lnsl -ldl -lm
> -lpgport -o initdb
> Undefined                       first referenced
> symbol                              in file
> pthread_getspecific                 libpq.so
> pthread_key_create                  libpq.so
> pthread_once                        libpq.so
> pthread_setspecific                 libpq.so
> UX:ld: ERROR: Symbol referencing errors. No output written to initdb
> gmake[3]: *** [initdb] Error 1
I bring this up on PGHACKERS because unixware may not be the only
place we have to use the threads flags.

What is the concensus of the community?

I tried removing the libpq link for initdb and got:

        (3) gmake
        gmake -C ../../../src/interfaces/libpq all
        gmake[1]: Entering directory
        `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/interfaces/libpq'
        gmake[1]: Nothing to be done for `all'.
        gmake[1]: Leaving directory
        `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/interfaces/libpq'
        gmake -C ../../../src/port all
        gmake[1]: Entering directory
        `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/port'
        gmake[1]: Nothing to be done for `all'.
        gmake[1]: Leaving directory
        `/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/port'
        gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
        -Wmissing-declarations -O1 -Wall -Wmissing-prototypes
        -Wmissing-declarations -Wpointer-arith -Wcast-align initdb.o
        -L../../../src/port -L/usr/local/lib -L/usr/contrib/lib
        -Wl,-rpath,/usr/local/pgsql/lib -O1 -Wall -Wmissing-prototypes
        -Wmissing-declarations -Wpointer-arith -Wcast-align -lssl -lcrypto -lz
        -lreadline -ltermcap -lgetopt -lcompat -lipc -ldl -lm -lutil  -lpgport
        -o initdb
        initdb.o: In function `get_encoding_id':
        initdb.o(.text+0x739): undefined reference to `pg_char_to_encoding'
        initdb.o(.text+0x74b): undefined reference to `pg_valid_server_encoding'
        initdb.o: In function `trapsig':
        initdb.o(.text+0x2212): undefined reference to `pqsignal'
        initdb.o: In function `main':
        initdb.o(.text+0x2e69): undefined reference to `pqsignal'
        initdb.o(.text+0x2e7b): undefined reference to `pqsignal'
        initdb.o(.text+0x2e8a): undefined reference to `pqsignal'
        initdb.o(.text+0x2e9c): undefined reference to `pqsignal'
        initdb.o(.text+0x2ea8): more undefined references to `pqsignal' follow
        gmake: *** [initdb] Error 1

I thought that once you include libpthread in libpq, that you don't have
to mention it again then you use libpq.  Is your platform different
somehow in this regard?

I seem to remember this problem with libcrypt and libpq.  Is this the
same problem?

I see that initdb is just the first of many /bin programs to be
compiled, so if we have to add the thread lib, we will have to do it for
all the bin programs.  Yikes.  Why wasn't this a problem for 7.4?
7.4 had initdb as a Shell Script.
the 7.4.x libpq didn't have any pthread_* references in it, that I see
on my box.



--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Attachment: pgp00000.pgp
Description: PGP signature



Reply via email to