Menu

#718 GnuCOBOL 3.1.2 - Two problems that I found

unclassified
closed
nobody
None
5 - default
2021-09-28
2021-05-15
No

1ST PROBLEM

In Ubuntu 20.04 LTS under a structure like this:

/home/sysadmin/GnuCOBOL/app (program files *.cob)
/home/sysadmin/GnuCOBOL/bin (binary files and *.so)
/home/sysadmin/GnuCOBOL/cpy (copy files *.cpy)
/home/sysadmin/GnuCOBOL/fil (files *.idx and *.dat)
/home/sysadmin/GnuCOBOL/tmp (temporary files)

Compiler GnuCOBOL 2.2 a "COPY" sentence I can reference it with relative path:

INPUT-OUTPUT SECTION.
FILE-CONTROL.
COPY "../cpy/select_customers".

DATA DIVISION.
FILE SECTION.
COPY "../cpy/fd_customers".

However compiler GnuCOBOL 3.1.2 a "COPY" sentence I must reference it with full path:

INPUT-OUTPUT SECTION.
FILE-CONTROL.
COPY "/home/sysadmin/GnuCOBOL/cpy/select_customers".

DATA DIVISION.
FILE SECTION.
COPY "/home/sysadmin/GnuCOBOL/cpy/fd_customers".

2ND PROBLEM

Compilation instruction cobc -free ../app/customers.cob works fine.

However compilation instruction cobc -x -free ../app/customers.cob shows this error:

/usr/bin/ld: /lib/x86_64-linux-gnu/libtinfo.so.6: error al añadir símbolos: DSO missing from command line
collect2: error: ld returned 1 exit status

Please help.

Discussion

  • Vincent (Bryan) Coen

    For all versions of GC when using copy books set
    COBCPY= to your path i.e.,
    COBCPY=/home/sysadmin/GnuCOBOL/cpy

    Then you only need COPY fd_customers

    It is recommended that you use the extension of .cpy for all copy books if nothing else to show clearly that they are copy book sets.

    Trying to compile a copy book as a program will result in errors although that error response is surprising.

    Bye the bye there are other environment vars you can use so look at the programmers guide but here are mine :

    COBCPY=/home/vince/cobolsrc/ACAS/copybooks
    COB_LIBRARY_PATH=/home/vince/bin
    ; These for screen sections
    COB_SCREEN_ESC=YES
    COB_SCREEN_EXCEPTIONS=YES
    ; these for debugging with trace
    COB_SET_TRACE=YES
    COB_TRACE_FILE=/home/vince/trace.log
    

    There are others not used in this environ set.

     

    Last edit: Simon Sobisch 2021-05-15
  • Vincent (Bryan) Coen

    Forgot to mention this report of a possible BUG should be documented in the Bug reporting area as it is not a feature request !

    However I am seing it as a bug but it appears as a Feature request @Simon ?

    Bug at SF may be ?

     

    Last edit: Vincent (Bryan) Coen 2021-05-15
  • Vincent (Bryan) Coen

    • Group: unclassified --> GC 3.1
     
  • Simon Sobisch

    Simon Sobisch - 2021-05-15

    Ticket moved from /p/gnucobol/feature-requests/401/

     
  • Simon Sobisch

    Simon Sobisch - 2021-05-15
    • status: open --> pending
     
  • Simon Sobisch

    Simon Sobisch - 2021-05-15

    For the first issue: I think 2.2 and 3.1 should behave quite identical and support relative paths. But: those relative paths are all to the include directories (see cobc --info for the current default from the environment) plus -I parameters.
    It could be that 2.2 auto-includes -I . but 3+ doesn't (I'd have to check to be sure), you may want to try -I . and check if your relative reference in the COOY statement works as it did before.
    In general it is highly suggested to never use an explicit full path in the source itself, but specify it via -I and/or the environment variables.
    In general I think "issue 1" is neither a bug, nor a feature request, more a "help request" solved by those points.

    Second 2 looks like a bug, please do

    LC_MESSAGES=en cobc -free -v ../app/customers.cob
    LC_MESSAGES=en cobc -free -vx ../app/customers.cob
    

    and we'd have a better clue what this is about.

     
  • Simon Sobisch

    Simon Sobisch - 2021-05-21

    @alphastation: please drop an update as requested, otherwise we can't go on with this issue. Thanks"

     
  • Simon Sobisch

    Simon Sobisch - 2021-09-17

    @alphastation: Any update here?

     
  • Simon Sobisch

    Simon Sobisch - 2021-09-28
    • status: pending --> closed
    • Group: GC 3.1 --> unclassified
     
  • Simon Sobisch

    Simon Sobisch - 2021-09-28

    Closed because missing response, I'm fine to reopen that as soon as we know more about that.

     

Log in to post a comment.

Auth0 Logo