vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| i'm trying to compile some app between microfocus cobol (4.0sp2), sybase SDK 15.0 on HP-UX 11i v2. i have a few problems with libraries. i have set LD_LIBRARY_PATH and SHLIB_PATH with all the paths (microfocus & sybase one + /usr/lib), in /etc/profile and in $COBDIR/etc/cob*.cfg (Ldefaultpath) $ cob -x -o app1 app1.cbl -lsybcobct -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld ld: (Warning) Ignoring +allowunsats. The option is currently not supported in a 32-bit PA link. ld: Can't find library: "sybcobct" bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybcobct -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld ld: Can't find library: "sybcobct" bash-3.00$ ls /opt/sybase/OCS-15_0/lib/libsybcobct* /opt/sybase/OCS-15_0/lib/libsybcobct.a /opt/sybase/OCS-15_0/lib/libsybcobct_r.a bash-3.00$ pwd /opt/sybase/OCS-15_0/sample/esqlcob bash-3.00$ SYBPLATFORM=hpux make cob -x example1.cbl -L/opt/sybase/OCS-15_0/lib -lsybcobct -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld -o example1 ld: (Warning) Ignoring +allowunsats. The option is currently not supported in a 32-bit PA link. ld: Can't find library: "BSD" *** Error exit code 1 Stop. bash-3.00$ ls /usr/lib/libBSD* /usr/lib/libBSD.a bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld ld: Can't find library: "sybct" bash-3.00$ ls /opt/sybase/OCS-15_0/lib/libsybct* /opt/sybase/OCS-15_0/lib/libsybct.a /opt/sybase/OCS-15_0/lib/libsybct.sl /opt/sybase/OCS-15_0/lib/libsybct64.a /opt/sybase/OCS-15_0/lib/libsybct64.sl /opt/sybase/OCS-15_0/lib/libsybct_r.a /opt/sybase/OCS-15_0/lib/libsybct_r.sl /opt/sybase/OCS-15_0/lib/libsybct_r64.a /opt/sybase/OCS-15_0/lib/libsybct_r64.sl bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lcl -lm -lBSD -ldld ld: Can't open /opt/langtools/lib/crt0.o ld: No such file or directory bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybunic -lcl -lm -lBSD -ldld -L /opt/sybase/OCS-15_0/lib ld: Can't find library: "sybunic" someone has ideas about this ? app works on hpux 11.00, and older setup. thanks a lot Bye |
| |||
| julien Touche <julien.touche@touche.fr.st> wrote: > i'm trying to compile some app between microfocus cobol (4.0sp2), sybase > SDK 15.0 on HP-UX 11i v2. > i have a few problems with libraries. i have set LD_LIBRARY_PATH and > SHLIB_PATH with all the paths (microfocus & sybase one + /usr/lib), in > /etc/profile and in $COBDIR/etc/cob*.cfg (Ldefaultpath) IIRC LD_LIBRARY_PATH and SHLIB_PATH are runtime things, not link. > $ cob -x -o app1 app1.cbl -lsybcobct -lsybct -lsybtcl -lsybcs -lsybcomn > -lsybintl -lsybunic -lcl -lm -lBSD -ldld > ld: (Warning) Ignoring +allowunsats. The option is currently not > supported in a 32-bit PA link. > ld: Can't find library: "sybcobct" > bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybcobct -lsybct > -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld > ld: Can't find library: "sybcobct" > bash-3.00$ ls /opt/sybase/OCS-15_0/lib/libsybcobct* > /opt/sybase/OCS-15_0/lib/libsybcobct.a > /opt/sybase/OCS-15_0/lib/libsybcobct_r.a Looks like you need a -L option, (before the -l's I suspect) that tells the linker it should also look in /opt/sybase/OCS-10_0/lib .. That, or perhaps the type of library that libsybcobct.a happens to be does not match the type of the compile (PA vs IA, 32 bit vs 64 bit). Given the messages, I am guessing you are doing a 32-bit PA compile (this is a PA system yes?) What does the file command say for /opt/sybase/OCS-15_0/lib/libsybcobct.a ? > bash-3.00$ pwd > /opt/sybase/OCS-15_0/sample/esqlcob > bash-3.00$ SYBPLATFORM=hpux make > cob -x example1.cbl -L/opt/sybase/OCS-15_0/lib -lsybcobct -lsybct > -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld -o > example1 > ld: (Warning) Ignoring +allowunsats. The option is currently not > supported in a 32-bit PA link. > ld: Can't find library: "BSD" > *** Error exit code 1 > Stop. > bash-3.00$ ls /usr/lib/libBSD* > /usr/lib/libBSD.a Same question there. > bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybct -lsybtcl -lsybcs > -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld > ld: Can't find library: "sybct" > bash-3.00$ ls /opt/sybase/OCS-15_0/lib/libsybct* > /opt/sybase/OCS-15_0/lib/libsybct.a > /opt/sybase/OCS-15_0/lib/libsybct.sl > /opt/sybase/OCS-15_0/lib/libsybct64.a > /opt/sybase/OCS-15_0/lib/libsybct64.sl > /opt/sybase/OCS-15_0/lib/libsybct_r.a > /opt/sybase/OCS-15_0/lib/libsybct_r.sl > /opt/sybase/OCS-15_0/lib/libsybct_r64.a > /opt/sybase/OCS-15_0/lib/libsybct_r64.sl > bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lcl -lm -lBSD -ldld > ld: Can't open /opt/langtools/lib/crt0.o > ld: No such file or directory > bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lsybunic -lcl -lm -lBSD > -ldld -L /opt/sybase/OCS-15_0/lib > ld: Can't find library: "sybunic" I wonder if the -L has to come before the -l's... or at least before the -l's depending upon it. just guesses from a networking guy, rick jones -- portable adj, code that compiles under more than one compiler these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
| |||
| Rick Jones wrote on 01/09/2006 23:02: > Looks like you need a -L option, (before the -l's I suspect) that > tells the linker it should also look in /opt/sybase/OCS-10_0/lib yes it was part of the problem > . That, or perhaps the type of library that libsybcobct.a happens to > be does not match the type of the compile (PA vs IA, 32 bit vs 64 > bit). Given the messages, I am guessing you are doing a 32-bit PA > compile (this is a PA system yes?) What does the file command say for > /opt/sybase/OCS-15_0/lib/libsybcobct.a ? # file /opt/sybase/OCS-15_0/lib/libsybcobct.a /opt/sybase/OCS-15_0/lib/libsybcobct.a: archive file -PA-RISC1.1 relocatable library # file /usr/lib/libBSD.a /usr/lib/libBSD.a: archive file -PA-RISC1.1 relocatable library # COBMODE=32 cob -x -o app1 app1.cbl -L /opt/sybase/OCS-15_0/lib -lsybunic -lcl -lm -lBSD -ldld ld: Can't open /opt/langtools/lib/crt0.o ld: No such file or directory # COBMODE=32 cob -x -o app1 app1.cbl -L /opt/sybase/OCS-15_0/lib -L /usr/lib -lsybunic -lcl -lm -lBSD -ldld ld: Can't open /opt/langtools/lib/crt0.o ld: No such file or directory # locate crt0.o| head -3 /usr/ccs/lib/crt0.o /usr/ccs/lib/pa20_64/crt0.o /usr/lib/crt0.o # /usr/local/bin/grep -rin "/opt/langtools/lib" /opt/microfocus/* |grep -v "Binary file" /opt/microfocus/cobol/lib/liblist:7:*:1:s:set LPATH=/usr/lib:/opt/langtools/lib:${LPATH:-} /opt/microfocus/cobol/lib/liblist:26:x:*:s!p!P:/opt/langtools/lib/crt0.o /opt/microfocus/cobol/lib/liblist:27:x:*:sp!P:/opt/langtools/lib/mcrt0.o /opt/microfocus/cobol/lib/liblist:28:x:*:sP!p:/opt/langtools/lib/gcrt0.o /opt/microfocus/cobol/lib/liblist:68:x:*:sg:/opt/langtools/lib/end.o => changed in liblist & liblist64 for crt0.o sybase example # cd /opt/sybase/OCS-15_0/sample/esqlcob # SYBPLATFORM=hpux make cob -x example1.cbl -L/opt/sybase/OCS-15_0/lib -L/usr/lib -lsybcobct -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD -ldld -o example1 ld: Mismatched ABI (not an ELF file) for -lsybcobct Fatal error. *** Error exit code 1 Stop. # SYBPLATFORM=hpux COBMODE=32 make => OK # COBMODE=32 cob -x -o app1 app1.cbl -L /opt/sybase/OCS-15_0/lib -L /usr/lib -lsybunic -lcl -lm -lBSD -ldld ld: Unsatisfied symbols: CTBINIT (first referenced in app1.o) (code) CTBCONALLOC (first referenced in app1.o) (code) CSBCTXDROP (first referenced in app1.o) (code) [...] => seems code problem, or library access i try another app # make app2 [precompilation ok] COBMODE=32 `env SYBPLATFORM=hpux sh sybopts.sh compile` -o app2 app2.cbl -L /opt/sybase/OCS-15_0/lib -L /usr/lib `env SYBPLATFORM=hpux sh sybopts.sh cobct ct comlibs` `env SYBPLATFORM=hpux sh sybopts.sh syslibs` Make: Cannot load rmapp2.int. Stop. *** Error exit code 1 someone knows what are rm*.int file for cobol ? thanks |
| |||
| julien Touche <julien.touche@touche.fr.st> writes: > bash-3.00$ COBMODE=32 cob -x -o app1 app1.cbl -lcl -lm -lBSD -ldld > ld: Can't open /opt/langtools/lib/crt0.o > ld: No such file or directory the crt0.o at this path comes with the compiler (cc/aCC) bundle. there is one at /usr/ccs/lib/crt0.o which you can use instead, but i dont know how to specify the alternate crt0.o to the cob compiler. |
| |||
| julien Touche <julien.touche@touche.fr.st> wrote: > sybase example > # cd /opt/sybase/OCS-15_0/sample/esqlcob > # SYBPLATFORM=hpux make > cob -x example1.cbl -L/opt/sybase/OCS-15_0/lib -L/usr/lib -lsybcobct > -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD > -ldld -o example1 > ld: Mismatched ABI (not an ELF file) for -lsybcobct > Fatal error. > *** Error exit code 1 ELF - on PA-RISC ELF is used only for 64-bit objects, so that suggests an attempt is being made to mix 32 and 64 bit objects in the same binary which won't fly. rick jones -- The computing industry isn't as much a game of "Follow The Leader" as it is one of "Ring Around the Rosy" or perhaps "Duck Duck Goose." - Rick Jones these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
| ||||
| julien Touche <julien.touche@touche.fr.st> writes: > Rick Jones wrote on 01/09/2006 23:02: > > Looks like you need a -L option, (before the -l's I suspect) that > > tells the linker it should also look in /opt/sybase/OCS-10_0/lib > > yes it was part of the problem > you should not specify system library paths (/usr/lib for 32-bit and /usr/lib/pa20_64 for 64-bit) either with "-L" or in LPATH. > # file /opt/sybase/OCS-15_0/lib/libsybcobct.a > /opt/sybase/OCS-15_0/lib/libsybcobct.a: archive file -PA-RISC1.1 > relocatable library > sybase example > # cd /opt/sybase/OCS-15_0/sample/esqlcob > # SYBPLATFORM=hpux make > cob -x example1.cbl -L/opt/sybase/OCS-15_0/lib -L/usr/lib -lsybcobct > -lsybct -lsybtcl -lsybcs -lsybcomn -lsybintl -lsybunic -lcl -lm -lBSD > -ldld -o example1 note that you have user COBMODE=32 in other compilations and not this one. you have specified paths of 32-bit libraries and perhaps the default mode is 64-bit, hence the problem. |