Re: UnixWare/CVS Tip/initdb.c needs to use threads flags... - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: UnixWare/CVS Tip/initdb.c needs to use threads flags... |
Date | |
Msg-id | 200403190403.i2J43Gq11704@candle.pha.pa.us Whole thread Raw |
In response to | Re: UnixWare/CVS Tip/initdb.c needs to use threads flags... (Larry Rosenman <ler@lerctr.org>) |
Responses |
Re: UnixWare/CVS Tip/initdb.c needs to use threads
|
List | pgsql-hackers |
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) gmakegmake -C ../../../src/interfaces/libpq allgmake[1]: Enteringdirectory`/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/portallgmake[1]: Entering directory`/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/port'gmake[1]: Nothing tobe 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 initdbinitdb.o: Infunction `get_encoding_id':initdb.o(.text+0x739): undefined reference to `pg_char_to_encoding'initdb.o(.text+0x74b): undefinedreference to `pg_valid_server_encoding'initdb.o: In function `trapsig':initdb.o(.text+0x2212): undefined referenceto `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'followgmake: *** [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? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
pgsql-hackers by date: