Re: [HACKERS] psql Week 4.142857 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] psql Week 4.142857
Date
Msg-id Pine.LNX.4.10.9910281841220.17464-100000@peter-e.yi.org
Whole thread Raw
In response to Re: [HACKERS] psql Week 4.142857  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] psql Week 4.142857
Re: [HACKERS] psql Week 4.142857
List pgsql-hackers
On Oct 28, Bruce Momjian mentioned:

> > gcc -o psql -L../../interfaces/libpq command.o common.o help.o input.o
> > stringutils.o mainloop.o copy.o startup.o prompt.o variables.o large_obj.o
> > print.o describe.o  -lpq -L/usr/sup/gnu/lib -lgen -lcrypt -lnsl -lsocket
> > -ldl -lm -lreadline -ltermcap -lcurses 
> > ld: fatal: symbol `xmalloc' is multiply defined:
> >         (file common.o and file /usr/sup/gnu/lib/libreadline.a(xmalloc.o));
> > ld: fatal: File processing errors. No output written to psql
> > make: *** [psql] Error 1
> > 
> > This happens on a (particular) Solaris box but not on a (particular) Linux
> > box. Beats the heck out of me. ;(
> 
> I can't find xmalloc in the source, and can't figure out how it could be
> _defined_ in common.o.  Strange.

Oh, I defined it in that file, it's used in psql. Unfortunately, it seems
to be used internally in readline as well. In now figured out that this
causes problems only with static linking, but not dynamic. I'm no expert
on linking, does anyone have an idea or do I have to make up a different
name?

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] psql Week 4.142857
Next
From: "Oliver Elphick"
Date:
Subject: Bug#48582: psql spends hours computing results it already knows (fwd)