Bug 1210948 - Consider replacing gccxml with castxml
Summary: Consider replacing gccxml with castxml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gccxml
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1211943 1212835
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-11 11:15 UTC by Marcin Juszkiewicz
Modified: 2015-10-03 17:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-03 17:41:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marcin Juszkiewicz 2015-04-11 11:15:34 UTC
Description of problem:

gccxml is based on very old version of gcc which do not know anything about new architectures (like aarch64 for example).

Upstream page http://gccxml.github.io/HTML/Index.html says "Note: GCC-XML has been succeeded by CastXML." 

CastXML was announced recently: http://permalink.gmane.org/gmane.comp.compilers.gccxml/730 as a successor to GCC-XML:

It is a tool based on LLVM/Clang that generates the same
XML output format as GCC-XML [2].  CastXML's design offers
some advantages over GCC-XML's:

1. LLVM/Clang offers a true SDK for external tools,
   so CastXML does not need to maintain a fork.
   GCC-XML requires significant work to update its
   parser to a more recent GCC.  CastXML can simply
   be built against a recent LLVM/Clang.

2. LLVM/Clang natively supports parsing both GCC and
   Visual Studio system headers, so CastXML does not
   need to maintain a set of system header patches.
   GCC-XML must be updated with system header patches
   for each new version of compilers it supports.
   CastXML can simply parse the headers directly.

3. CastXML will need little to no work to support newer
   GCC and Visual Studio versions as they are released.
   LLVM/Clang maintainers already take care of this.
   Due to the above, CastXML supports recent versions
   of Visual Studio, while GCC-XML does not support
   VS 2010 or later.

4. CastXML can parse in some language modes besides C++98,
   though since the output format currently matches GCC-XML,
   only C++98-compatible interface structures appear in the
   output.

Comment 1 Marcin Juszkiewicz 2015-04-11 11:20:20 UTC
Builds fine on aarch64 with llvm 3.6.0 (requires llvm-devel clang-devel llvm-static):

-- The C compiler identification is GNU 5.0.0
-- The CXX compiler identification is GNU 5.0.0
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /bin/git (found version "2.3.5") 
-- Checking whether header cstdio is available
-- Checking whether header cstdio is available - yes
-- Checking for Large File Support
-- Checking for Large File Support - yes
-- Checking whether STL classes are in std namespace
-- Checking whether STL classes are in std namespace - yes
-- Checking whether ANSI stream headers are available
-- Checking whether ANSI stream headers are available - yes
-- Checking whether ANSI streams are in std namespace
-- Checking whether ANSI streams are in std namespace - yes
-- Checking whether ANSI string stream is available
-- Checking whether ANSI string stream is available - yes
-- Checking whether header cstddef is available
-- Checking whether header cstddef is available - yes
-- Checking whether stl string has operator!= for char*
-- Checking whether stl string has operator!= for char* - yes
-- Checking whether stl has iterator_traits
-- Checking whether stl has iterator_traits - yes
-- Checking whether stl has standard template allocator
-- Checking whether stl has standard template allocator - yes
-- Checking for rebind member of stl allocator
-- Checking for rebind member of stl allocator - yes
-- Checking for non-standard argument to stl allocator<>::max_size
-- Checking for non-standard argument to stl allocator<>::max_size - no
-- Checking whether stl containers support allocator objects.
-- Checking whether stl containers support allocator objects. - yes
-- Checking whether ios has binary openmode
-- Checking whether ios has binary openmode - yes
-- Checking whether "<>" is needed for template friends
-- Checking whether "<>" is needed for template friends - yes
-- Checking for member template support
-- Checking for member template support - yes
-- Checking for standard template specialization syntax
-- Checking for standard template specialization syntax - yes
-- Checking whether argument dependent lookup is supported
-- Checking whether argument dependent lookup is supported - yes
-- Checking whether struct stat has st_mtim member
-- Checking whether struct stat has st_mtim member - yes
-- Checking whether C++ compiler has 'long long'
-- Checking whether C++ compiler has 'long long' - yes
-- Checking whether C++ compiler has '__int64'
-- Checking whether C++ compiler has '__int64' - no
-- Checking whether wstring is available
-- Checking whether wstring is available - yes
-- Checking whether C compiler has ptrdiff_t in stddef.h
-- Checking whether C compiler has ptrdiff_t in stddef.h - yes
-- Checking whether C compiler has ssize_t in unistd.h
-- Checking whether C compiler has ssize_t in unistd.h - yes
-- Checking whether CXX compiler has setenv
-- Checking whether CXX compiler has setenv - yes
-- Checking whether CXX compiler has unsetenv
-- Checking whether CXX compiler has unsetenv - yes
-- Checking whether CXX compiler has environ in stdlib.h
-- Checking whether CXX compiler has environ in stdlib.h - no
-- Checking whether CXX compiler has utimes
-- Checking whether CXX compiler has utimes - yes
-- Checking whether CXX compiler has utimensat
-- Checking whether CXX compiler has utimensat - yes
-- Found GNU C compiler '/bin/gcc' to drive tests
-- Found GNU CXX compiler '/bin/gcc' to drive tests
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hrw/rpmbuild/UPSTREAM/CastXML/build
Scanning dependencies of target cc-gnu
Scanning dependencies of target cc-msvc
Scanning dependencies of target cxsys
[ 13%] [ 13%] Building C object test/CMakeFiles/cc-gnu.dir/cc-gnu.c.o
Building C object test/CMakeFiles/cc-msvc.dir/cc-msvc.c.o
[ 33%] [ 33%] [ 33%] [ 53%] [ 53%] [ 53%] [ 60%] Building C object src/kwsys/CMakeFiles/cxsys.dir/ProcessUNIX.c.o
Building CXX object src/kwsys/CMakeFiles/cxsys.dir/Directory.cxx.o
Building C object src/kwsys/CMakeFiles/cxsys.dir/System.c.o
Building CXX object src/kwsys/CMakeFiles/cxsys.dir/SystemTools.cxx.o
Building CXX object src/kwsys/CMakeFiles/cxsys.dir/EncodingCXX.cxx.o
Building C object src/kwsys/CMakeFiles/cxsys.dir/EncodingC.c.o
Building CXX object src/kwsys/CMakeFiles/cxsys.dir/RegularExpression.cxx.o
Linking C executable cc-gnu
Linking C executable cc-msvc
[ 66%] Building CXX object src/kwsys/CMakeFiles/cxsys.dir/FStream.cxx.o
[ 66%] Built target cc-gnu
[ 66%] Built target cc-msvc
Linking CXX static library ../../lib/libcxsys.a
[ 66%] Built target cxsys
Scanning dependencies of target castxml
[ 86%] [ 86%] [ 86%] [100%] [100%] Building CXX object src/CMakeFiles/castxml.dir/Utils.cxx.o
Building CXX object src/CMakeFiles/castxml.dir/Output.cxx.o
Building CXX object src/CMakeFiles/castxml.dir/castxml.cxx.o
Building CXX object src/CMakeFiles/castxml.dir/Detect.cxx.o
Building CXX object src/CMakeFiles/castxml.dir/RunClang.cxx.o
Linking CXX executable ../bin/castxml
[100%] Built target castxml

Never used gccxml so no idea how to check does it work properly.

Comment 2 Mattias Ellert 2015-04-15 11:46:22 UTC
Thank you for your suggestion. I think this new software is indeed a better choice. Especially since it doesn't automatically break every time there is a new gcc version released.

I had a look at packaging it, and it seems to work properly, at least the test suite run with 204 test passed out of 204. I did however have a bit of trouble replacing the static libraries with shared libraries as part of adapting it to the Fedora guidelines. I have filed a bugzilla report about my problems.

Comment 3 Mattias Ellert 2015-04-17 12:57:21 UTC
I have submitted the package for review with some comments in the specfile about the use of static linking to the clang libraries with reference to the bugzilla ticket.

https://bugzilla.redhat.com/show_bug.cgi?id=1212835

Comment 4 Jan Kurik 2015-07-15 14:17:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 5 Fedora Admin XMLRPC Client 2015-09-25 09:22:35 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Update System 2015-09-25 11:20:18 UTC
castxml-0.1-0.6.20150924git552dd69.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-6eddeb8faf

Comment 7 Fedora Update System 2015-09-27 00:55:34 UTC
castxml-0.1-0.6.20150924git552dd69.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update castxml'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-6eddeb8faf

Comment 8 Fedora Update System 2015-10-03 17:41:21 UTC
castxml-0.1-0.6.20150924git552dd69.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.