Bug ID | 1209438 |
---|---|
Summary | gnu-cobol can not compile Cobol programs because libcob.h can not be found |
Classification | openSUSE |
Product | openSUSE Tumbleweed |
Version | Current |
Hardware | 64bit |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Development |
Assignee | screening-team-bugs@suse.de |
Reporter | ada.lovelace@gmx.de |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
I have learned Mainframe Programming at the university. I am preferring openSUSE instead of z/OS. Therefore, I wanted to test gnu-cobol. You can not compile any "Hello World" program with cobc at the moment. Steps to reproduce: 1) Install gnu-cobol in openSUSE Tumbleweed on any 64Bit architecture (tested on x86 and s390x) 2) Create a helloworld.cobol file with following content: IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. PROCEDURE DIVISION. DISPLAY 'Hello world!'. STOP RUN. 3) Run "cobc -x helloworld.cobol " 4) You will receive following error message: helloworld.cobol:1: error: invalid indicator 'F' at column 7 helloworld.cobol:2: error: invalid indicator 'O' at column 7 helloworld.cobol:3: error: invalid indicator 'U' at column 7 helloworld.cobol:4: error: invalid indicator 'S' at column 7 helloworld.cobol:5: error: invalid indicator 'O' at column 7 helloworld.cobol:6: Fehler: PROGRAM-ID header missing You can see in the code above, that the PROGRAM-ID exist in the second line. Therefore, the compiler can not identify the headers correctly. The compiler can go through the colums, what is correct. But there is a problem with the headers. 5) I have used the Ubuntu tutorial for reformatting with "--free". Perhaps there is a problem with the Cobol format: Run "cobc -x --free helloworld.cobol" 6) You will receive this error message: /tmp/cob41237_0.c:12:10: fatal error: libcob.h: No such file or directory 12 | #include <libcob.h> | ^~~~~~~~~~ This error message gives us the hint, that libcob.h can not be found. I took a look into our spec file for gnu-cobol. libcob.h is listed in the file list within the libcob package (part of gnu-cobol). Tutorials for Non-Cobol-Programmers: Used for the first error example: https://fedoramagazine.org/getting-started-with-cobol-development-on-fedora-linux-33/ Used for the second error example: https://www.thegeekstuff.com/2010/02/cobol-hello-world-example-how-to-write-compile-and-execute-cobol-program-on-linux-os/