On Fri, 16 Jan 2026 16:44:37 -0700 Jeffrey Law <[email protected]> wrote:
> On 1/16/2026 1:00 PM, James K. Lowden wrote: > > > > At present libgcobol requires the target to supply libxml2. That > > complicates building cross compilers and mitigates against how > > distributions are normally built. The remedy is to make libgcobol a > > bootstrap library, > > So does libxml2 get linked into target code? Or libxml2 needed to > build the compiler itself? The gcobol compiler does not use libxml2. libgcobol mediates between libxml2 and the compiled COBOL program. By that means, libxml2 is linked into the target code. When libgcobol is built, it is linked to libxml2 because libgcobol provides support for the XML PARSE statement in COBOL. The compiled COBOL program is linked to libgcobol, which is linked to libxml2, which is -- somehow -- provided by the target environment. As of now, libgcobol/configure.ac confirms that libxml2 is installed. The build relies on the host to supply the header files and library. > In the former case, we'd likely need a copy in the tree managed like > we do with other target libraries. If it's the later, then we have a > lot more flexibility. I hope that answers the question. I myself do not today yet understand why things cannot be as they are, which is to me the way libraries are normally handled in any packaging system. The dependency on libxml2 is inserted in libgcobol.so by the linker at build time. When the runtime linker loads libgcobol, it chases down libxml2. ABI compatibility is the responsibility of the package manager and sysadmin. A more elegant herd of turtles has yet to be invented. I am informed the above does not apply to GCC runtime libraries. Matthias was quite emphatic that libgcobol should be a bootstrap library, and the only question was not whether but how. Other than avoiding becoming the maintainer for libxml2, I have no dog in the fight over whether or how. I'm happy to carry out GCC policy, whatever it is, once I understand it. --jkl
