patchGnuCOBOL (formerly OpenCOBOL) - Patches: patch #9168, Rasied Call sr #109186 under Cobol...


You are not allowed to post comments on this tracker with your current authentication level.

patch #9168: Rasied Call sr #109186 under Cobol for GCC group in error

Submitted by:  Paul Mitchell <pmitch1865>
Submitted on:  Mon 21 Nov 2016 01:59:16 PM UTC  
Category:  None Priority:  7 - High
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Wed 30 Nov 2016 04:19:46 PM UTC, comment #2: 


I am desperate for some assistance on this issue.

Has anybody had a chance to review it?


Paul Mitchell <pmitch1865>
Mon 21 Nov 2016 02:04:06 PM UTC, comment #1: 

This is the call content.

We need to be able to use an archive library due to access sub modules due its flexibility of control. However when trying to link a .a file we get the error.

libcob: cannot find module 'TEST_SUB'

We have compiled many binary object files and placed them into an archive library.
We have also compiled an executable module and as part of that compilation have attempted to link the previously mentioned archive library.
However on execution the executable module is not able to find a required binary object file located in the archive library.
It would appear that the archive library library is not in fact linked to the executable.
Could you provide guidance on how this is achieved within GNU Cobol.
Example would be
executable = TESTPROG
ar library = testlib.a
bin object = testobj.o
TESTPROG needs to call testobj.o and therefore testlib.a needs to be linked to TESTPROG.

In order to further assist with this i have created a test scenario.
This issue appears to be that no matter what i do to link a dynamically loadable module held within an archive library will allow that module to be dynamically located.
I always end up with the following error.
libcob: cannot find module
i have uploaded two files, TEST_CALL.cob (executable module) and TEST_SUB.cob (loadable module).
If you follow the process below to compile and run under a Linux environment you should receive the same result. If however you extract the file from the library and and link directly to the file it will work.
cobc -foptional-file -freserved=COMMAND-LINE -std=mf -m TEST_SUB.cob
ar -qv /stage/pmtest/libpmtst.a ./
export LD_LIBRARY_PATH=/stage/pmtest
export COB_LIBRARY_PATH=/stage/pmtest
rm ./
cobc -v -x -foptional-file -std=mf -freserved=COMMAND-LINE -o TEST_CALL TEST_CALL.cob -L /stage/pmtest -lpmtst
env |grep pmtest
libcob: cannot find module 'TEST_SUB'

Paul Mitchell <pmitch1865>
Mon 21 Nov 2016 01:59:16 PM UTC, original submission:  

Rasied Call sr #109186 under Cobol for GCC group in error.

I should have created in this group.

Are you able to review this call under the about group and reassign to this group or do i need to raise this call as a new call under this group?

Paul Mitchell <pmitch1865>


Attached Files
file #39038:  TEST_CALL.cob added by pmitch1865 (546B - application/octet-stream)
file #39039:  TEST_SUB.cob added by pmitch1865 (408B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pmitch1865 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-21 pmitch1865 Attached File- => Added TEST_CALL.cob, #39038
        Attached File- => Added TEST_SUB.cob, #39039

    Back to the top

    Powered by Savane 3.5