You're right -- RPATH isn't used anywhere. RFLAG is used eventually in
include/Makefile.library, which becomes included in nsd/Makefile:
$(LDSO) -o $(LIB) $(OBJS) $(LIBS) $(RFLAG) $(AOLSERVER)/lib
This should be changed to:
$(LDSO) -o $(LIB) $(OBJS) $(LIBS) $(RPATH)
Note that I removed the $(AOLSERVER)/lib as it's part of RPATH. If RPATH is
defined as "", then having $(AOLSERVER)/lib at the end of the LDSO line
will cause an error.
Strangely, the Solaris build has this:
RFLAG = -R
RPATH += -Wl,$(RFLAG),/usr/lib/lwp
Which makes RPATH for Solaris end up looking like:
RPATH = -Wl,-rpath,$(AOLSERVER)/lib -Wl,-R,/usr/lib/lwp
I'm not sure whether this was the intention.
Another side-effect as that $(AOLSERVER)/lib must exist as a directory
before the compile will work, but $(AOLSERVER)/lib isn't created until
after you run make install.
I'll commit the above mentioned changes to CVS later today.
thanks,
/s.
> Scott,
>
> Notice what you included in your original post:
>
> gcc -shared -nostartfiles -o libnspd.so listen.o log.omain.o
> ../nsext/nsextmsg.o -L../tcl8.3.4/unix -ltcl8.3g -lm -ldl -lpthread
> -rpath ../../install/aolserver/lib
>
> Note that it's just got -rpath and not -Wl,-rpath,$(AOLSERVER)/lib
> there. Which means, the build rule is using $(RFLAG) instead
> of $(RPATH).
>
> Leave RFLAG and RPATH as they are, and fix the build rule by
> replacing $(RFLAG) with $(RPATH) where appropriate.
>
> I haven't checked out of CVS lately, so I can't tell you
> specifically "where appropriate" is ... but if you can't
> find it, I'll do a cvs update and look myself.
>
> -- Dossy
>
>
> On 2001.12.19, Scott Goodwin <[EMAIL PROTECTED]> wrote:
> > Problem solved. It didn't quite work with what you sent, but it led me
to
> > this, which did work:
> >
> > RFLAG = -Xlinker -rpath
> > RPATH = $(RFLAG) $(AOLSERVER)/lib
> >
> > Note that -Wl is *supposed* to pass the comma-separated list to the
linker,
> > removing the commas in the process. This doesn't appear to work as
> > advertised:
> >
> > RPATH = -Wl,$(RFLAG),$(AOLSERVER)/lib
> >
> >
> > Now I'm pondering whether to commit the changes to sourceforge; I'm not
> > comfortable that this solution fixes my problem *AND* doesn't break the
> > compile on other systems and platforms.
> >
> > thanks, Pete,
> >
> >
> > /s.
> >
> >
> >
> > > Try changing the definitions to this:
> > >
> > > RFLAG = -Xlinker -rpath
> > > RPATH = -Xlinker -Wl,$(RFLAG),$(AOLSERVER)/lib
> > >
> > > -Xlinker is a gcc switch to pass arguments to the linker. The man
page
> > > says that if the linker argument takes a parameter, then you must use
> > > -Xlinker twice -- once for the argument and once for the parameter.
It
> > > specifically says that quoting the argument and parameter won't work.
> > >
> > > I think AOLserver used to invoke ld directly, in which case the -rpath
> > > would have worked, but on some platforms or versions of gcc,
particularly
> > > with shared libraries, you just don't get the same output from ld as
you
> > > do from gcc, no matter what arguments you throw at it. It's probably
> > > fixable, but it's just so much easier to use gcc for everything.
> > >
> > > Pete.
> > >
> > >
> > >
>
> --
> Dossy Shiobara mail: [EMAIL PROTECTED]
> Panoptic Computer Network web: http://www.panoptic.com/
> "He realized the fastest way to change is to laugh at your own
> folly -- then you can let go and quickly move on." (p. 70)
>
>