This is a discussion on Oracle 10g (release1), AIX, Pro-COBOL, Problems building sample programs within the Oracle Database forums, part of the Database Server Software category; --> I have an Oracle 10g (release 1) database running on an IBM p520 running AIX 5.3, with the appropriate ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. The command I use (and the output I get) is as follows :- # 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. 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 The output of an "env" command is as follows :- _=/usr/bin/env LANG=en_US LOGIN=oracle LINK_CNTRL=L_PTHREADS_D7 PATH=:/acs/banner/general/exe:/acs/banner/admin:/usr/bin:/etc:/usr/sbin:/usr/ucb :/home/oracle/bin:/usr/bin/X11:/sbin:.:/usr/vacpp/bin:/usr/vac/bin:/usr/lpp/cobo l/bin:drivers:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14_64 /jre/bin:/usr/java14_64/bin:/usr/java14/bin:/usr/java14/jre/bin:/usr/java131/bin :/usr/java131/jre/bin:/usr/local/bin:.:/apps/oracle/10g/bin:/acs/banner/links SRCE_LINK= ORACLE_BASE=/apps/oracle BANNER_HOME=/acs/banner LC__FASTMSG=true ORACLE_LPPROG=lpr ORACLE_PATH=.:/home/oracle:/acs/banner/links:/acs/banner/admin: COBSUFX= BANNER_ROOT=/acs COBPATH=/home/oracle:/acs/banner/links:/acs/banner/general/exe LOGNAME=oracle MAIL=/usr/spool/mail/oracle HOSTNAME=p520_two COBDIR=/usr/lpp/cobol LOCPATH=/usr/lib/nls/loc ORACLE_SID=TRNG2 PS1=($HOSTNAME:$PWD)# USER=oracle AUTHSTATE=compat CLOBDATA_HOME=/u01/oradata/trng2 SHELL=/bin/ksh ODMDIR=/etc/objrepos HOME=/home/oracle TERM=ansi MAILMSG=[YOU HAVE NEW MAIL] ORACLE_HOME=/apps/oracle/10g COBPREF= PWD=/apps/oracle/10g/precomp/demo/procob2 TZ=EST5EDT ENV=/etc/environment ORACLE_LPARGS=-Plp DATAFILE_HOME=/u01/oradata/trng2 A__z=! LOGNAME LIBPATH=/apps/oracle/10g/lib32:/apps/oracle/10g/network/lib32:/usr/lib:/usr/lpp/cobol/lib:/usr/lpp/cobol/coblib:/lib LD_LIBRARY_PATH=/apps/oracle/10g/lib32:/apps/oracle/10g/network/lib32:/usr/lib:/usr/lpp/cobol/lib:/usr/lpp/cobol/coblib NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat 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? Thanks in advance for any insights anybody might be able to offer. I'm a newbie in the Pro-COBOL world Rich Woodland Magic Interface, Ltd. |
| |||
| 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 |
| |||
| 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 |
| |||
| Quilpole <vishnu@magicinterface.com> wrote: > 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) [...] > 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 Being totally ignorant of Cobol (fortunately) or this compiler in particular, I don't know how 'cob' tries to load 'rts32_t'. But I guess it just executes it, right? There is one more thing that could be the problem: Does any of the executables in question (cob, rts32_t, whatever else may be called in the makefile that calls cob) have the SETUID flag set? I ask because if a SETUID program is executed on AIX by a user OTHER THAN THE OWNER of the executable, the LIBPATH will be ignored (for security reasons). If that is your problem, your options are the following: - Link rts32_t with a linker path that points to the shared library (you need to have the source of rts32_t for that). - Create a symbolic link to /usr/lpp/cobol/lib/libcobrts_t.2.so in /usr/lib. It is ugly, but should work. Yours, Laurenz Albe |
| ||||
| Once again, thank you for your input! The Cobol compiler was indeed installed using the root account, rather than some less-privileged account. Once installed with such an account, everything starts to make sense!! Thanks again! Rich Woodland. Magic Interface. On 03 Feb 2006 09:02:27 GMT, Laurenz Albe <invite@spam.to.invalid> wrote: >Quilpole <vishnu@magicinterface.com> wrote: >> 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) > >[...] > >> 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 > >Being totally ignorant of Cobol (fortunately) or this compiler in >particular, I don't know how 'cob' tries to load 'rts32_t'. > >But I guess it just executes it, right? > >There is one more thing that could be the problem: > >Does any of the executables in question (cob, rts32_t, whatever else may >be called in the makefile that calls cob) have the SETUID flag set? > >I ask because if a SETUID program is executed on AIX by a user OTHER THAN >THE OWNER of the executable, the LIBPATH will be ignored (for security >reasons). > >If that is your problem, your options are the following: > >- Link rts32_t with a linker path that points to the shared library > (you need to have the source of rts32_t for that). > >- Create a symbolic link to /usr/lpp/cobol/lib/libcobrts_t.2.so > in /usr/lib. It is ugly, but should work. > >Yours, >Laurenz Albe |