Menu

GNUCobol fails to compile

GnuCOBOL
2024-07-13
2024-07-13
  • Michael Milliman

    Please forgive me if this is the wrong forum for this question, I'm not quite sure what forum might be best.

    Before submitting a bug report, and possibly the fix for the bug, I wanted to check to see if 1) this was already a known issue and 2) I might be missing something.

    This issue I'm seeing is during the compilation process for the GNUCobol compiler. The compile fails during the compilation of common.c in the libcob folder. The error reported is the implicit declaration of xmlCleanupParser. I have double checked and I have the libxml2 dependency installed, and all necessary headers exist on my system in the expected place. The function xmlCleanupParser is declared in parser.h in the /usr/include/libxml2/libxml directory, as expected. However, this header is not included in common.c. The xmlversion.h and xmlwriter.h files from libxml2 are included in common.c. My solution to this problem was to add an #include for parser.h to the common.c file, and the compilation succeeded without further issue.

    I suspect that this will need to be reported as a bug, and I can do so with my fix included, but wanted to see if anyone else had a similar observation, and if maybe I was missing something before doing so. Again, please forgive me if this is the wrong place for this particular discussion.

     
    👍
    1
  • Simon Sobisch

    Simon Sobisch - 2024-07-13

    Hi Michael and welcome to GnuCOBOL.

    Asking in the discussion board is definitely a reasonable thing to do. I wasn't sure if the issue at hand came up before in the discussion board, but giving it a quick search, which you possibly did, returned no results.

    The issue itself came up in both the mailing list and the issue tracker though and is solved, please see [bugs:#941] (I've re-attributed the fix after the original commit).

    Your solution to the problem was correct :-)

    Thanks for reaching out in the first place - it would be nice if you can stay around and keep contributing.

     
    👍
    1

    Related

    Bugs: #941

  • Michael Milliman

    Thank you very much for your quick response. I would have been surprised had I been the only one who had experienced this issue. I did look at the patch submitted for the bug you referenced, and the patch is exactly what I did to fix the issue, and I'm looking forward to seeing it come out in the distro. I suspect, had I been working with the nightly commit branch, I would not have seen it at all.

    While, years ago, I actually had a job as a COBOL programmer, the language has changed since then (in fact, it would have been before the '85 standard came out), and I am re-acquainting myself with the language. I'm currently struggling with the screen io portion of GnuCobol and the interface with ncurses. If I have time (big if), I wouldn't mind contributing to the project, especially in this area perhaps to improve that interface. Right now, though I'm still trying to determine whether some of the issues I'm having are actually programmer issues and not interface issues. I see that there has been a ton of discussion on the forums about that interface. But, before I jump into the fray, I want to make sure that I actually know what I'm talking about :)

     

Log in to post a comment.