PostgreSQL 6.5.1: libpq++ libraries on IRIX 6.5

Поиск
Список
Период
Сортировка
От Yu Cao
Тема PostgreSQL 6.5.1: libpq++ libraries on IRIX 6.5
Дата
Msg-id Pine.SOL.3.96.990903220649.4375B-100000@jedi.kla-tencor.com
обсуждение исходный текст
Ответы Re: [HACKERS] PostgreSQL 6.5.1: libpq++ libraries on IRIX 6.5  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
There is a problem with libpq++.so on IRIX 6.5 (MIPSpro 7.2.1, -n32).
If you compile and link a simple program like the following:

#include "libpq++/pgdatabase.h"

main(int argc, char **argv)
{
  PgDatabase *db = new PgDatabase("dbname=mydb");
  db->Exec("SELECT * FROM TEST");
  db->PrintTuples();
  delete db;
}

and run it, you'll get the following error:

46407:./a.out: rld: Error: unresolvable symbol in
/5xxRoot/ALG/pgsql/lib/libpq++.so.3.0:
__node_allocator_lock__Q2_3std45__default_alloc_template__pt__13_XCbL11XCiL10
46407:./a.out: rld: Error: unresolvable symbol in
/5xxRoot/ALG/pgsql/lib/libpq++.so.3.0:
free_list__Q2_3std45__default_alloc_template__pt__13_XCbL11XCiL10
46407:./a.out: rld: Fatal Error: this executable has unresolvable symbols

I think this has to do with some quirks of the SGI MIPSpro compiler when
creating libraries for C++. For shared library, instead of "ld -shared",
"CC -shared" should be used to enable pre-linking (for template
instantiation). And for static library, "CC -ar" should be used instead
of "ar" (although right now if I use the static library the run-time error
does not occur).

I'm not sure whether using "CC" to create libraries for the pure C
modules would work (my guess is it should and I'll try it). If it does
then it'll be easy to patch the IRIX makefile template. But then the
downside is people will be required to have the C++ compiler even if
they don't care about libpq++.

--Yu Cao





************



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Blazso
Дата:
Сообщение: array manipulations
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: temp table oddness?