Technical article 127098

I get UX:ld: ERROR: library not found: -lnsl_s when compiling my Informix application on OpenServer 6.0.0

OpenServer 6.0.0

Written · Last revised

Problem

I am trying to compile my Informix 4GL application on OpenServer 6.0.0. I have set the path to:

PATH=/osr5/usr/bin:$PATH
export PATH
and I have also edited
$INFORMIXDIR/bin/c4gl
and I changed:
TLILIB="/usr/lib/libnsl_s.a"
to
TLILIB="/osr5/usr/lib/libnsl.so"
but I am getting the error:
UX:ld: ERROR: library not found: -lnsl_s

when I try to compile my application.

Cause

The compile script c4gl is not configured correctly to work on OpenServer 6.0.0.

Solution

Edit the file:
$INFORMIXDIR/bin/c4gl
using your favourite editor and change:

SYSNLIB="-lnsl_s -lprot -lsocket -lx -lcurses -lm -lcrypt_i" to SYSNLIB="-lnsl -lprot -lsocket -lx -lcurses -lm -lcrypt_i"

Save the changes and you will now be able to compile your application.

See also

TA#127096 "UX:ld: ERROR: lib4gl.a(fglesql.o): cannot link OpenServer object into Intel iABI (UDK ABI) target" TA#127097 "UX:ld: ERROR: cannot open file /u/informix/lib/tools/nettlistub.a for reading: No such file or directory" TA#127099 "I get "internal conversion of COFF file to ELF" messages when compiling my Informix 4GL application on OpenServer 6.0.0" TA#127003 "How can I install a legacy OpenServer 5 Informix Database on my OpenServer 6.0.0 system?" TA#127100 "How can I install the INFORMIX-4GL Version 7.20.UE2 on my OpenServer 6.0.0 system?

From the Xinuos technical article database, record 127098. Reproduced with permission. The original is at www.sco.com/ta/127098, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.