[Thread Prev][Thread Next][Index]

Ferret How To: Solaris 2.4 "rindex" symbol not found




***** Ferret how-to: Solving Solaris 2.4's "rindex" symbol not found error

> > On Nov 28,  4:21pm, VEEFKIND J.P. 254/1J10/4-3 wrote:
> > > Subject: problems with ferret 4.90 for solaris
> > > Hi,
> > >
> > > I have a problem with the new ferret version (4.90) for solaris. When
> > > I try to run the application the following error occurs:
> > >
> > >  f41sn1% ferret
> > >         NOAA/PMEL TMAP
> > >         Program FERRET (GUI)
> > >         Version 4.90 - 11/19/97
> > >         28-Nov-97 16:13
> > >
> > > ld.so.1: ferret: fatal: relocation error: symbol not found: rindex:
> > > referenced in ferret
> > > Killed

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

Hi Pepijn,

As it turns out, this problem is isolated to the solaris 2.4 operating
system.   An excellent solution was given by Thierry Ludjet. (Thanks
Thierry!)

The solution, which I will include below, is also a part of the Ferret
FAQ (http://dread.pmel.noaa.gov/home/ferret/FAQ).  If there are any
questions, let me know.

Kevin

--------  BEGIN SOLUTION --------

Date: Tue, 16 Dec 1997 13:28:45 +0100
From: Thierry Ludjet 

Here is my own solution:

cat <<\EOF >rindex.c
#include 
char *rindex(const char *s, const char c)
{
    return strrchr(s, c);
}
EOF

gcc -fpcc-struct-return -fpic -c rindex.c
ld -o libindex.so.1 -G -z text -h libindex.so rindex.o

cp libindex.so.1 /usr/local/libindex.so.1
chmod 644 /usr/local/libindex.so.1
ln -s /usr/local/libindex.so.1 /usr/local/libindex.so
export LD_PRELOAD=/usr/local/libindex.so #(ksh syntax)

------ END SOLUTION -----------

--------
Kevin O'Brien				
206-526-6751			NOAA/PMEL/TMAP/JISAO
206-526-6744 (fax)		http://tmap.pmel.noaa.gov





[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement