Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!statler.nntpserver.com!hydra.nntpserver.com!not-for-mail
From: Quilpole <vishnu@magicinterface.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Oracle 10g (release1), AIX, Pro-COBOL, Problems building sample programs
Date: Thu, 02 Feb 2006 14:10:31 -0500
Organization: Magic Interface
Message-ID: <phl4u11vetj5scpi5fmm0cqsu2anokf580@4ax.com>
References: <1694u1dru32fcnfubeh5rdmpkk5o27jcg7@4ax.com> <1138898450.572854@proxy.dienste.wien.at>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 135
NNTP-Posting-Date: 02 Feb 2006 19:06:27 GMT
X-Complaints-To: abuse@nntpserver.com
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:260589

Thanks for the fast response Laurenz!

I think most flavours of unix use the LD_LIBRARY_PATH, but I guess AIX
is a little different, and uses LIBPATH. However, I notice that my
environment has both defined.

I used the ldd command (very useful), as shown in the text below. I'm
able to see the dependencies, but all seems to be well. I did issue
the ldd command for the other libraries mentioned under rts32_t, but
didn't stumble across any missing files. Are there any other
environment variable that are related to finding paths to libraries
under AIX?

The output from my test with ldd is shown below :-

# echo $LIBPATH
/apps/oracle/10g/lib32:/apps/oracle/10g/network/lib32:/usr/lib:/usr/lpp/cobol/lib:/usr/lpp/cobol/coblib:/lib

# cd /usr/lpp/cobol
# ldd bin/rts32_t
bin/rts32_t needs:
         /usr/lpp/cobol/lib/libcobrts_t.2.so
         /usr/lpp/cobol/lib/libcobcrtn.2.so
         /usr/lpp/cobol/lib/libcobmisc_t.2.so
         /usr/lib/libpthreads.a(shr_comm.o)
         /usr/lib/libpthreads.a(shr_xpg5.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/librtl.a(shr.o)
         /usr/lpp/cobol/lib/libcobscreen.2.so
         /unix
         /usr/lib/libcrypt.a(shr.o)

# ldd lib/libcobrts_t.2.so
lib/libcobrts_t.2.so needs:
         /usr/lpp/cobol/lib/libcobscreen.2.so
         /usr/lib/libc.a(shr.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)

# ldd lib/libcobscreen.2.so
lib/libcobscreen.2.so needs:
         /usr/lib/libc.a(shr.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)

# cd /apps/oracle/10g/precomp/demo/procob2         
# pwd
/apps/oracle/10g/precomp/demo/procob2

# ls
demo_procob.mk     sample10.pco       sample2.pco        sample7.pco
demo_procob_32.mk  sample11.pco       sample3.pco        sample8.pco
lobdemo1.pco       sample12.pco       sample4.pco        sample9.pco
sample1.cob        sample13.pco       sample5.pco
sample1.pco        sample14.pco       sample6.pco

# make -f demo_procob.mk sample1
        /bin/make -f
/apps/oracle/10g/precomp/demo/procob2/demo_procob.mk build
COBS=sample1.cob EXE=sample1
        cob -C IBMCOMP -C NESTCALL -x -t -o sample1 sample1.cob
-L/apps/oracle/10g/lib/ /apps/oracle/10g/precomp/lib/cobsqlintf.o
-lclntsh  -lld -lm `cat /apps/oracle/10g/lib/sysliblist`  -lm  -lc_r
-lpthreads
Could not load program /usr/lpp/cobol/bin/rts32_t:
        Dependent module libcobrts_t.2.so could not be loaded.
Could not load module libcobrts_t.2.so.
System error: No such file or directory
cob32: error(s) in compilation: sample1.cob
make: 1254-004 The error code from the last command is 255.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.


Once again, thanks for taking the time to answer so quickly :)

Rich Woodland
Magic Interface.


On 02 Feb 2006 16:40:54 GMT, Laurenz Albe <invite@spam.to.invalid>
wrote:

>Quilpole <vishnu@magicinterface.com> wrote:
>> I have an Oracle 10g (release 1) database running on an IBM p520
>> running AIX 5.3, with the appropriate MicroFocus COBOL compiler
>> installed.
>> 
>> I am trying to compile the first of the sample programs in the
>> .../precomp/demo/procob2 directory.
>> 
>
>[...]
>
>> Could not load program /usr/lpp/cobol/bin/rts32_t:
>>        Dependent module libcobrts_t.2.so could not be loaded.
>> Could not load module libcobrts_t.2.so.
>> System error: No such file or directory
>
>[...]
>
>> When I check for the files mentioned (with the ls command) :-
>> 
>> # ls -l /usr/lpp/cobol/lib/libcobrts_t.2.so
>> -r-xr-xr-x   1 root     system      1141066 Mar 20 2003
>> /usr/lpp/cobol/lib/libcobrts_t.2.so
>> 
>> # ls -l /usr/lpp/cobol/bin/rts32_t
>> -r-xr-xr-x   1 root     system         3870 Mar 20 2003
>> /usr/lpp/cobol/bin/rts32_t
>
>[...]
>
>> I suspect that the problem is probably environmental, as I am able to
>> build the MicroFocus demo programs with no problems. However, The
>> LD_LIBRARY_PATH variable seems to be correct, and I'd thought this was
>> where it should be looking for the "so" file, no?
>
>There is no LD_LIBRARY_PATH in AIX, I guess that you mean LIBPATH.
>
>To see why libcobrts_t.2.so cannot be loaded, try
>
>ldd /usr/lpp/cobol/bin/rts32_t
>
>and
>
>ldd /usr/lpp/cobol/lib/libcobrts_t.2.s
>
>Yours,
>Laurenz Albe
