Subject: Re: pkgsrc rpm-2.5.4 trouble
To: None <tech-pkg@netbsd.org, lamj@stat.cmu.edu>
From: Gerald C. Simmons <simmons@darykon.cet.com>
List: tech-pkg
Date: 06/18/2001 15:50:16
On Mon, 18 Jun 2001 Johnny C. Lam wrote
> 
> "Gerald C. Simmons" <simmons@darykon.cet.com> writes:
> 
> > realpath.o: warning: getwd() possibly used unsafely, consider using getcwd()
> > /usr/pkgsrc/misc/rpm/work/rpm-2.5.4/misc/libmisc.a(realpath.o): Definition of s
> > ymbol `_realpath' (multiply defined)
> > /usr/lib/libc.a(getcwd.o): Definition of symbol `_realpath' (multiply defined)
> > collect2: ld returned 1 exit status
> > gmake: *** [rpm] Error 1
> > *** Error code 2
> > 
> > Upon investigation, I found that removing realpath from libmisc.a in
> > rpm-2.5.4/misc removed this conflict.
> > 
> > Is this the proper way to resolve this???
> 
> No.  The rpm configure process should be able to detect a realpath
> implementation in your libc and not build its own realpath for
> libmisc.a.  We should be trying to figure out why libc's realpath is
> not being detected properly on your machine.  What OS and version are
> you running?  Can you provide the config.log produced by the configure
> script at a publicly available URL?
> 

Oh ....  You given me a big clue here. Turns out that I had a couple of REALLY old
libraries in /usr/local/lib. This confused the linker in rpm, and it thought I
didn't have ___errno defined anywhere. Well, when I removed the libraries from
/usr/local/lib, popt compiled and linked O.K. Then rpm tripped up on the realpath
issue.

Basically, configure must have examined those bad libraries and made decisions
based on them. I removed the entire work directory and re-built everything, and it
worked like a charm. 

Thanks again!!

Gerry Simmons
simmons@darykon.cet.com