[xsd-users] Error: incomplete type when compiling cxx generated with --file-per-type

Yongchang Huang xjtu.yohuang at gmail.com
Wed Jul 26 03:42:56 EDT 2023


I think I need some coffee. libxsd does not provide .so files actually.

I ignored the previous libxsd doc build error and linked the objects into
executable finally, and successfully parsed a very simple sample xml.

I will continue to try more complex xml with multiple namespaces elements
and open a new case if needed.

Thank you Boris for this new libxsd release!

Thanks,
yohuang

Yongchang Huang <xjtu.yohuang at gmail.com> 于2023年7月26日周三 11:11写道:

> Hi Boris,
>
> I can build xsd tool from the new released and tried to generate cxx
> files, and it seems the generated .cxx can compile now.
>
> Then I tried to build libxsd library in order to test the generated .cxx
> files, but I have trouble building libxsd with the new version using build2
> tool.
>
> *bpkg build libxsd* command reported below error:
>
> fetched libxsd/4.2.0-b.4
> unpacked libxsd/4.2.0-b.4
> configured libxsd/4.2.0-b.4
> version libxsd-4.2.0-b.4/xsd/cxx/in{version} ->
> libxsd-4.2.0-b.4/xsd/cxx/hxx{version}
> in libxsd-4.2.0-b.4/doc/cxx/tree/reference/in{libxsd} ->
> libxsd-4.2.0-b.4/doc/cxx/tree/reference/doxygen{libxsd}
> in libxsd-4.2.0-b.4/doc/cxx/tree/reference/in{footer} ->
> libxsd-4.2.0-b.4/doc/cxx/tree/reference/html{footer}
> libxsd-4.2.0-b.4/doc/buildfile:51:7: error: target : not found in diag
> builtin
>   info: while updating
> libxsd-4.2.0-b.4/doc/cxx/tree/reference/doxytag{libxsd}
>   info: while updating libxsd-4.2.0-b.4/dir{doc/}
>
>   info: while updating dir{libxsd-4.2.0-b.4/}
> info: failed to update dir{libxsd-4.2.0-b.4/}
>
> buildfile is hard to understand compared to Makefile, and I tried to
> understand how buildfile works, and tried to remove doc target
> in libxsd-4.2.0-b.4/buildfile as shown below:
>
> ./: {*/ -build/} doc{INSTALL NEWS README} legal{GPLv2 LICENSE FLOSSE}
> manifest
>
> to
>
> ./: {*/ -build/ -doc/} legal{GPLv2 LICENSE FLOSSE} manifest
>
>
> but libxsd so file was not generated somehow. It seems the
> libxsd-4.2.0-b.4/xsd/buildfile was not used.
>
> thanks,
> yohuang
>
> Yongchang Huang <xjtu.yohuang at gmail.com> 于2023年7月24日周一 23:55写道:
>
>> Hi Boris,
>>
>> Sorry that I did not check the debug.tar carefully before sending it out.
>>
>> The updated tar is attached.
>>
>> I will also try to use the pre-release version meanwhile.
>>
>> thanks,
>> yohuang
>>
>> Boris Kolpackov <boris at codesynthesis.com> 于2023年7月24日周一 22:59写道:
>>
>>> Boris Kolpackov <boris at codesynthesis.com> writes:
>>>
>>> > Yongchang Huang <xjtu.yohuang at gmail.com> writes:
>>> >
>>> > > I used xsd-4.0.0 to generate cxx-tree files with --file-per-type
>>> option,
>>> > > and then tried to compile the .cxx files. g++ reported incomplete
>>> type
>>> > > error as shown below.
>>> >
>>> > There were some issues in this area that we've fixed since the 4.0.0
>>> > release. Would you be able to re-test this with the latest XSD pre-
>>> > release and see if it makes any difference?
>>>
>>> I had a minute so I tried to check this myself using the reproducer
>>> you have provided. But it seems to be missing some schemas:
>>>
>>> $ ./run.sh
>>> busDefinition.xsd: error: 'generator.xsd': unable to open in read mode
>>>
>>


More information about the xsd-users mailing list