Re: compile+link Fujitsu Linux
- From: Richard <riplin@xxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 11:47:51 -0800 (PST)
On Jan 31, 7:23 pm, Robert <n...@xxxxxx> wrote:
On Wed, 30 Jan 2008 20:46:28 -0800 (PST), Richard <rip...@xxxxxxxxxxxx> wrote:
On Jan 31, 4:38 pm, Robert <n...@xxxxxx> wrote:
when I try to execute I see my first DISPLAY and then it crashes:
BEGIN MYMAIN
cobol-rts:: HALT: JMP0015I-U [PID:0000763D TID:002516C0] CANNOT CALL
PROGRAM 'MY
SUB1'. ./MYMAIN: undefined symbol: MYSUB1 PGM=MYMAIN
Aborted
I am running on Red Hat Enterprise, and Fujitsu support say they will
only support:
* Red Hat Linux 7.2, Locale C
* Red Hat Linux 7.3, Locale C
* Red Hat Linux Advanced Server 2.1, Locale C
I am hoping that someone here has figured out how to compile and line
on less ancient versions of Linux.
Try '-l MYSUB1' (lower case el) on the compilation of MYMAIN. As written, MYMAIN has no
way of knowing the library name.
I think that you fail to understand what 'Dynamic Load' means.
There is no Cobol syntax to specify a library name. You can only specify an entry point
name. When you do a CALL, Unix doesn't search every library in the library path. That
would be hopelessly slow. It searches only the libraries named in the executable's ELF
header.
Libraries normally contain many programs and entry points. They are not one-for-one like
the example here.
Robert, you really should try to understand the problem and its
solution _before_ you show your complete lack of understanding of what
is happening.
I had already said that the code and compiles as given in the first
message _worked_ on my machine and that the only change required was
to the LD_LIBRARY_PATH which is the environment variable used for
_dynamic_ loads.
I had actually compiled and ran these programs to ensure that what I
said was correct and that I was not giving bad or wrong advice. I had
indicated, gently, to you that you were not on the right track.
I have used dynamic loading of Cobol with mainframes, with Micro Focus
since CIS Cobol, on RM, Fujitsu and others since the days of CP/M and
with Unix, DOS, Windows and Linux. I have even done dynamic loading
with C.
You have made several claims above which are FACTUALLY WRONG and show
that you, as I said before, completely fail to understand dynamic
loading, or even that it is possible.
With Fujitsu Cobol the DLOAD directive tells the system that CALLs
might be dynamic. In these cases there is no need for the library
containing the called routine to be known to the ELF binary, there is
no need for a -l, nor for the library to even exist at link (ld) time.
At run time a dynamic call will look for a file called libNAME.so
along the LD_LIBRARY_PATH, where NAME is that in the CALL, and it will
load that and find the required entry point.
As you should be able to tell from the results in charles' 2nd message
your BAD and WRONG advice has meant that his program does not work as
he expected. He statically linked the dynamic library which will cause
the CANCEL to fail to unload it and thus a reload does not find a new
copy but reuses the old.
.
- References:
- compile+link Fujitsu Linux
- From: charles . goodman
- Re: compile+link Fujitsu Linux
- From: Robert
- Re: compile+link Fujitsu Linux
- From: Richard
- Re: compile+link Fujitsu Linux
- From: Robert
- compile+link Fujitsu Linux
- Prev by Date: Re: compile+link Fujitsu Linux
- Next by Date: Re: OT: Racial superiority / Intelligent design was Re: OT:Thanksgiving
- Previous by thread: Re: compile+link Fujitsu Linux
- Next by thread: Re: compile+link Fujitsu Linux
- Index(es):
Relevant Pages
|