Skip to Content.
Sympa Menu

freetds - RE: [freetds] sqsh won't run

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] sqsh won't run
  • Date: Fri, 06 May 2005 20:32:40 +0200

On Thu, 2005-05-05 at 02:17, James McGowan wrote:
> James,
>
> Thanks for the massive reply (I get the feeling you've been asked this
> question before.) I set LD_LIBRARY_PATH as you suggested and tried to
> recompile sqsh version 2.1. This time gcc gags as follows:
>
> /opt/sybase/lib/libintl.so: undefined reference to `__ctype_b'
> collect2: ld returned 1 exit status
> make[1]: *** [sqsh] Error 1
> make[1]: Leaving directory `/usr/src/sqsh-2.1.3/src'
> make: *** [build-subdirs] Error 2
>
> Clueless as usual, I wonder if you've seen THAT before. If it is still
> the linker, I don't know where else to tell it to look.

The old Sybase libs do NOT work with more recent glibc versions.

You can either build freetds (presumably that's why you're asking on
this mailing list .. :-), or download ASE 12.5.3 (see
http://www.sybase.com/linuxpromo) to get a recent version of the
OpenClient libs.

Michael


> > -----Original Message-----
> > From: freetds-bounces AT lists.ibiblio.org
> > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James
> > K. Lowden
> > Sent: Wednesday, May 04, 2005 4:17 PM
> > To: FreeTDS Development Group
> > Subject: Re: [freetds] sqsh won't run
> >
> > James McGowan wrote:
> > > I've installed sqsh version .. on a Redhat 9 system with Sybase ASE
> > > 10.0.0 and I get this message when I attempt to execute it:
> > >
> > > /usr/local/bin/sqsh.bin: error while loading shared libraries:
> > > libct.so.0: cannot open shared object file: No such file or
> > directory
> >
> > The problem is that your run-time linker isn't looking where
> > libct.so.0 is to be found. Other libraries might also be
> > affected (but probably not).
> > You can check with:
> >
> > $ ldd $(command -v sqsh)
> > /usr/local/bin/sqsh:
> > -lc.12 => /usr/lib/libc.so.12
> > -lct.3 => /usr/local/lib/libct.so.3
> > -ltds.5 => /usr/local/lib/libtds.so.5
> > -lm.0 => /usr/lib/libm387.so.0
> > -lm.0 => /usr/lib/libm.so.0
> > -lcrypt.0 => /usr/lib/libcrypt.so.0
> > -lreadline.5 => /usr/pkg/lib/libreadline.so.5
> > -lcurses.6 => /usr/lib/libcurses.so.6
> >
> > As you can see, the run-time linker on my system collects
> > shared objects from three places. By default (on my system)
> > it looks only in /usr/lib.
> > Yours should show a "not found" or two.
> >
> > To tell it where to look, you can tell it where such files
> > might generally be found, or where this one may be found for
> > sqsh. I prefer the latter option. To affect your run-time
> > linker generally, consult your man pages for ld.so or perhaps
> > ld.elf_so. LD_LIBRARY_PATH is a popular knob.
> >
> > The latter choice involves changing the RPATH in the sqsh ELF
> > binary. If you're compiling & linking with gcc, you can pass
> > the linker options with '-Wl'. I did it by modifying
> > src/Makefile in the sqsh tree, changing:
> >
> > SYBASE_LIBDIR = -L$(SYBASE_OCOS)/lib
> >
> > to
> >
> > SYBASE_LIBDIR = -Wl,-R/usr/pkg/lib \
> > -Wl,-R/usr/local/lib \
> > -L$(SYBASE_OCOS)/lib
> >
> > >From the root of the sqsh tree, change src/Makefile as above
> > >(substituting
> > your system's path to libct.so.0, of course), then:
> >
> > $ rm src/sqsh; make
> >
> > You should see your '-Wl' arguments pop up there. To check your work:
> >
> > $ readelf -d $(command -v sqsh) | sed -ne1,/RPATH/p
> >
> > Dynamic segment at offset 0x286a4 contains 24 entries:
> > Tag Type Name/Value
> > 0x00000001 (NEEDED) Shared library: [libct.so.3]
> > 0x00000001 (NEEDED) Shared library: [libtds.so.5]
> > 0x00000001 (NEEDED) Shared library: [libm.so.0]
> > 0x00000001 (NEEDED) Shared library: [libcrypt.so.0]
> > 0x00000001 (NEEDED) Shared library: [libreadline.so.5]
> > 0x00000001 (NEEDED) Shared library: [libcurses.so.6]
> > 0x00000001 (NEEDED) Shared library: [libc.so.12]
> > 0x0000000f (RPATH) Library rpath: [/usr/pkg/lib:/usr/local/lib]
> >
> > For more, cf.:
> >
> > $ info -f gcc --index='Wl'
> > $ info -f ld --index='-R FILE'
> >
> > Isn't consistency wonderful?
> >
> > HTH.
> >
> > --jkl
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> >
> >
> > __________________________________________________________
> > Message transport security by GatewayDefender.com
> > 7:16:58 PM ET - 5/4/2005
> >
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
--
Michael Peppler - mpeppler AT peppler.org - http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html






Archive powered by MHonArc 2.6.24.

Top of Page