compile failure on xmalloc()

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема compile failure on xmalloc()
Дата
Msg-id 200401250439.i0P4dLw14151@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: compile failure on xmalloc()  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
I am seeing the following compile failure in currrent CVS.  Seems there
is a conflict between readline and psql's use of the xmalloc function
name.

---------------------------------------------------------------------------


gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -O1 -Wall -Wmissing-prototypes
-Wmissing-declarations-Wpointer-arith -Wcast-align command.o common.o help.o input.o stringutils.o mainloop.o copy.o
startup.oprompt.o variables.o large_obj.o print.o describe.o tab-complete.o mbprint.o -L../../../src/interfaces/libpq
-lpq-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 psql
 
/usr/local/lib/libreadline.a(xmalloc.o): In function `xmalloc':
/u/src/lib/readline/readline-2.2.1/xmalloc.c:51: multiple definition of `xmalloc'
common.o(.text+0x5c): first defined here
ld: Warning: size of symbol `xmalloc' changed from 54 to 47 in xmalloc.o


---------------------------------------------------------------------------


It seems it is from these commits:


---------------------------------------------------------------------------

----------------------------
revision 1.82
date: 2004/01/25 03:07:22;  author: neilc;  state: Exp;  lines: +7 -8
More fallout from the recent psql patch: rename xmalloc and friends to
pg_malloc, to avoid linker failures on same platforms.
----------------------------
revision 1.81
date: 2004/01/24 19:38:49;  author: neilc;  state: Exp;  lines: +39 -7
This patch makes some of the memory manipulation performed by psql a
little more sane. Some parts of the code was using a static function
xmalloc() that did safe memory allocation (where "safe" means "bail
out on OOM"), but most of it was just invoking calloc() or malloc()
directly. Now almost everything invokes xmalloc() or xcalloc().


--  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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Getting the results columns before execution
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Regarding development and the submittal of patches