[Bug 1209438] New: gnu-cobol can not compile Cobol programs because libcob.h can not be found
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 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-... Used for the second error example: https://www.thegeekstuff.com/2010/02/cobol-hello-world-example-how-to-write-... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 Sarah Kriesch <ada.lovelace@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ihno@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 Sarah Kriesch <ada.lovelace@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |azouhr@opensuse.org -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 http://bugzilla.opensuse.org/show_bug.cgi?id=1209438#c1 --- Comment #1 from Sarah Kriesch <ada.lovelace@gmx.de> --- Created attachment 865630 --> http://bugzilla.opensuse.org/attachment.cgi?id=865630&action=edit helloworld cobol program I add the example Cobol program for reproducing. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 http://bugzilla.opensuse.org/show_bug.cgi?id=1209438#c2 --- Comment #2 from Sarah Kriesch <ada.lovelace@gmx.de> --- I have fixed the "invalid indicator" issue. You need additional line numbers without the "--free". Therefore you have to use that with only -x: 000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. HELLO-WORLD. 000300 PROCEDURE DIVISION. 000400 DISPLAY 'Hello world!'. 000500 STOP RUN. But you will receive the same error message then: /tmp/cob3910_0.c:11:10: schwerwiegender Fehler: libcob.h: Datei oder Verzeichnis nicht gefunden 11 | #include <libcob.h> | ^~~~~~~~~~ Kompilierung beendet. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 http://bugzilla.opensuse.org/show_bug.cgi?id=1209438#c3 Sarah Kriesch <ada.lovelace@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #3 from Sarah Kriesch <ada.lovelace@gmx.de> --- The problem is, that libcob-devel is not installed together with gnu-cobol. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 Sarah Kriesch <ada.lovelace@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |ada.lovelace@gmx.de -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1209438 Sarah Kriesch <ada.lovelace@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|--- |Community User -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com