From framsing at gmail.com Wed Nov 8 21:16:13 2023 From: framsing at gmail.com (Fred Ramsing) Date: Thu Nov 9 07:12:09 2023 Subject: [xsd-users] cli unknown option '-I' when compiling xsd-4.0.0 Message-ID: I am trying to compile xsd-4.0.0. It compiles fine on my local machine, but for some unknown reason on a remote server I get the following error: unknown option '-I' The previous build step is: cli --hxx-suffix .hxx --ixx-suffix .ixx --cxx-suffix .cxx -I /xsd/xsd ... I am using cli-1.1.0 and really cannot upgrade to cli-1.2.0 because that requires yet another build requirement to compile on the remote server: either bpkg or build2 Is there a workaround for this with cli-1.1.0/xsd-4.0.0? Off Topic: cli obviously nice features for handling cli options, but each of these dependencies requires yet another requirement that I have to download, package for our build system, compile on remote server, publish to package repository, when all I want to do is to run the xsd executable as part of my project using cmake. TIA, Fred. From boris at codesynthesis.com Thu Nov 9 07:38:12 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Nov 9 07:28:56 2023 Subject: [xsd-users] cli unknown option '-I' when compiling xsd-4.0.0 In-Reply-To: References: Message-ID: Fred Ramsing writes: > I am trying to compile xsd-4.0.0. FYI, the latest version is 4.2.0 and it includes binary packages for quite a few platforms: https://codesynthesis.com/products/xsd/download.xhtml > It compiles fine on my local machine, but for some unknown reason on > a remote server I get the following error: unknown option '-I' > The previous build step is: > cli --hxx-suffix .hxx --ixx-suffix .ixx --cxx-suffix .cxx -I > /xsd/xsd ... My hunch is that you have a rogue `cli` executable in PATH. Try: which cli cli --version > Is there a workaround for this with cli-1.1.0/xsd-4.0.0? If you must continue with XSD 4.0.0, you can use the xsd+dep package which includes all the dependencies as well as the pre-generated CLI code. For details, see: https://codesynthesis.com/projects/xsd/extras/build-unix.xhtml > Off Topic: cli obviously nice features for handling cli options, but each > of these dependencies requires yet another requirement that I have to > download, package for our build system, compile on remote server, publish > to package repository, when all I want to do is to run the xsd executable > as part of my project using cmake. The easiest way is to just use the binary package (.deb, .rpm, etc). With the latest version we now ship pre-generated CLI source code, though getting CLI with the build2 package manager wouldn't have added much. So, my recommendation is to switch to 4.2.0 and use one of the provided binary packages. If that's not an option and you must build XSD from source, then bite the bullet and get build2. It's not that hard and there are detailed instructions: https://codesynthesis.com/products/xsd/doc/install-build2.xhtml Also, you may be able to build your own binary package for XSD automatically: https://build2.org/bpkg/doc/bpkg-pkg-bindist.xhtml From boris at codesynthesis.com Thu Nov 9 07:38:12 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Nov 9 07:28:56 2023 Subject: [xsd-users] cli unknown option '-I' when compiling xsd-4.0.0 In-Reply-To: References: Message-ID: Fred Ramsing writes: > I am trying to compile xsd-4.0.0. FYI, the latest version is 4.2.0 and it includes binary packages for quite a few platforms: https://codesynthesis.com/products/xsd/download.xhtml > It compiles fine on my local machine, but for some unknown reason on > a remote server I get the following error: unknown option '-I' > The previous build step is: > cli --hxx-suffix .hxx --ixx-suffix .ixx --cxx-suffix .cxx -I > /xsd/xsd ... My hunch is that you have a rogue `cli` executable in PATH. Try: which cli cli --version > Is there a workaround for this with cli-1.1.0/xsd-4.0.0? If you must continue with XSD 4.0.0, you can use the xsd+dep package which includes all the dependencies as well as the pre-generated CLI code. For details, see: https://codesynthesis.com/projects/xsd/extras/build-unix.xhtml > Off Topic: cli obviously nice features for handling cli options, but each > of these dependencies requires yet another requirement that I have to > download, package for our build system, compile on remote server, publish > to package repository, when all I want to do is to run the xsd executable > as part of my project using cmake. The easiest way is to just use the binary package (.deb, .rpm, etc). With the latest version we now ship pre-generated CLI source code, though getting CLI with the build2 package manager wouldn't have added much. So, my recommendation is to switch to 4.2.0 and use one of the provided binary packages. If that's not an option and you must build XSD from source, then bite the bullet and get build2. It's not that hard and there are detailed instructions: https://codesynthesis.com/products/xsd/doc/install-build2.xhtml Also, you may be able to build your own binary package for XSD automatically: https://build2.org/bpkg/doc/bpkg-pkg-bindist.xhtml From hwgrace18 at gmail.com Mon Nov 20 06:48:18 2023 From: hwgrace18 at gmail.com (Harry Grace) Date: Mon Nov 20 08:39:50 2023 Subject: [xsd-users] Issue with XSD 4.2.0 - DOMDocument explicit namespacing Message-ID: Hi, Back in 2014 ( https://www.codesynthesis.com/pipermail/xsd-users/2014-September/004403.html, https://www.codesynthesis.com/pipermail/xsd-users/2014-October/004448.html), you addressed some ambiguous namespaces with msmxl in some of the xsd headers when developing on Windows. There seems to be some more using namespaces xercesc in the xml/dom txx files which are causing conflicts when developing on Windows. Two in parsing-source.txx, lines: 219 XSD_DOM_AUTO_PTR doc; 362 XSD_DOM_AUTO_PTR doc; One in serialization-source.txx, line: 274 XSD_DOM_AUTO_PTR doc ( As noted in the older threads, some explicit xercesc:: namespacing would resolve this issue. Thanks, Harry From boris at codesynthesis.com Tue Nov 21 08:40:56 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Nov 21 08:31:35 2023 Subject: [xsd-users] Issue with XSD 4.2.0 - DOMDocument explicit namespacing In-Reply-To: References: Message-ID: Harry Grace writes: > There seems to be some more using namespaces xercesc in the xml/dom txx > files which are causing conflicts when developing on Windows. > > Two in parsing-source.txx, lines: > 219 XSD_DOM_AUTO_PTR doc; > 362 XSD_DOM_AUTO_PTR doc; > > One in serialization-source.txx, line: > 274 XSD_DOM_AUTO_PTR doc ( > > As noted in the older threads, some explicit xercesc:: namespacing would > resolve this issue. Thanks for the report. I've fixed it a bit differently so if you could try the patch and confirm it works for you, that would be great: https://git.codesynthesis.com/cgit/xsd/xsd/commit/?id=a821131cf17a43f55082a660cf323fa72c0aab40 Also, for my understanding, with which C++ compiler and version are you seeing these errors? From hwgrace18 at gmail.com Tue Nov 21 16:38:08 2023 From: hwgrace18 at gmail.com (Harry Grace) Date: Tue Nov 21 16:29:08 2023 Subject: [xsd-users] Issue with XSD 4.2.0 - DOMDocument explicit namespacing In-Reply-To: References: Message-ID: > Thanks for the report. I've fixed it a bit differently so if you could > try the patch and confirm it works for you, that would be great: Hi Boris, Yes, the patch works and I no longer experience the errors I was originally receiving, thank you for the prompt response. Will this patch be pushed out as an official release as perhaps a 4.2.1? Also, does this require me rebuilding everything including the XSD binary, or just using the new libxsd runtime library folder with the updated files in it? > Also, for my understanding, with which C++ compiler and version are > you seeing these errors? I was using Visual Studio 2017 15.3, with MSVC 14.11, which I believe uses toolset v141, and compiler version 19.11. I would experience the errors when using precompiled headers within Visual Studio's project settings /Yc /Yu. On Tue, Nov 21, 2023 at 1:40?PM Boris Kolpackov wrote: > Harry Grace writes: > > > There seems to be some more using namespaces xercesc in the xml/dom txx > > files which are causing conflicts when developing on Windows. > > > > Two in parsing-source.txx, lines: > > 219 XSD_DOM_AUTO_PTR doc; > > 362 XSD_DOM_AUTO_PTR doc; > > > > One in serialization-source.txx, line: > > 274 XSD_DOM_AUTO_PTR doc ( > > > > As noted in the older threads, some explicit xercesc:: namespacing would > > resolve this issue. > > Thanks for the report. I've fixed it a bit differently so if you could > try the patch and confirm it works for you, that would be great: > > > https://git.codesynthesis.com/cgit/xsd/xsd/commit/?id=a821131cf17a43f55082a660cf323fa72c0aab40 > > Also, for my understanding, with which C++ compiler and version are > you seeing these errors? > From boris at codesynthesis.com Sun Nov 26 05:09:33 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Nov 26 05:00:11 2023 Subject: [xsd-users] Issue with XSD 4.2.0 - DOMDocument explicit namespacing In-Reply-To: References: Message-ID: Harry Grace writes: > Will this patch be pushed out as an official release as perhaps a 4.2.1? It will be included in the next release but it's too of a niche issue to warrant a release on its own. > Also, does this require me rebuilding everything including the XSD binary, > or just using the new libxsd runtime library folder with the updated files > in it? While the patch only affects libxsd, the generated code checks that the compiler version that was used to generate it matches the library version. So when you upgrade to the next release, you will need to rebuild everything. On the other hand, if you apply the patch to 4.2.0, then you can just replace the affected files in libxsd without rebuild anything.