From seumaryo at gmail.com Tue May 9 01:29:55 2017 From: seumaryo at gmail.com (HSK) Date: Tue, 9 May 2017 14:29:55 +0900 Subject: [CastXML] Build with an LLVM different from the installed version Message-ID: Hello, I am building CastXML on CentOS where LLVM/Clang 3.4.2 is installed and 3.9.0 has been built in another directory. Then Cmake emitted an error. [root at algenib CastXML]# cmake ./src -- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at CMakeLists.txt:48 (llvm_map_components_to_libnames): Unknown CMake command "llvm_map_components_to_libnames". The below also failed in the same error. [root at algenib CastXML]# CC=clang CXX=clang++ LLVM_DIR=/root/llvm-3.9.0.build cmake ./src Should the CMakeLists.txt be modified to work in my environment? Please advise. Thank you. Ryo -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Tue May 9 09:06:08 2017 From: brad.king at kitware.com (Brad King) Date: Tue, 9 May 2017 09:06:08 -0400 Subject: [CastXML] Build with an LLVM different from the installed version In-Reply-To: References: Message-ID: <0155c1d4-c3a9-959a-d175-e97d148f2652@kitware.com> On 05/09/2017 01:29 AM, HSK wrote: > [root at algenib CastXML]# CC=clang CXX=clang++ LLVM_DIR=/root/llvm-3.9.0.build cmake ./src Make sure you have the LLVM/Clang build installed, e.g. via "make install". Then run CMake with ``` $ mkdir build $ cd build $ CC=clang CXX=clang++ cmake /path/to/castxml -DLLVM_DIR=/root/llvm-3.9.0.install/lib/cmake/llvm ``` Note that the `src/` subdirectory within the castxml source tree should not be given to CMake. The top-level directory should be given. -Brad From seumaryo at gmail.com Fri May 12 03:36:57 2017 From: seumaryo at gmail.com (HSK) Date: Fri, 12 May 2017 16:36:57 +0900 Subject: [CastXML] Build with an LLVM different from the installed version In-Reply-To: <0155c1d4-c3a9-959a-d175-e97d148f2652@kitware.com> References: <0155c1d4-c3a9-959a-d175-e97d148f2652@kitware.com> Message-ID: Brad, Thanks a lot. I've just built CastXML. Cheers, Ryo -------------- next part -------------- An HTML attachment was scrubbed... URL: From adadeepak8 at gmail.com Fri May 19 10:03:41 2017 From: adadeepak8 at gmail.com (Ankit Deepak) Date: Fri, 19 May 2017 19:33:41 +0530 Subject: [CastXML] Runtime error while finding element_type with containers of pointers Message-ID: Hello all, I have started working on CastXML recently. I am trying to modify pybindgen [1] to work with CastXML and latest versions of pygccxml. "__find_xxx_type" of "container_traits" throws Runtime Error when it encounters std containers having pointers as elements, it works fine with other containers. The traceback looks like: Traceback (most recent call last): File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/python/ns3modulescan-modular.py", line 284, in ns3_module_scan(sys.argv[1], sys.argv[2], eval(sys.argv[3]), sys.argv[4], sys.argv[5]) File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/python/ns3modulescan-modular.py", line 265, in ns3_module_scan module_parser.scan_types() File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 801, in scan_types self._scan_namespace_types(self.module, self.module_namespace, pygen_register_function_name="register_types") File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 1334, in _scan_namespace_types self._register_container(module, traits, type_info, _outer_class, name) File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 1522, in _register_container element_type = traits.element_type(definition) File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", line 494, in element_type File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", line 484, in __find_xxx_type RuntimeError: Unable to find out list '::std::list >' key\value type. Similarly, it fails with RuntimeError: Unable to find out map '::std::map, ns3::LogComponent *, std::less >, std::allocator, ns3::LogComponent *> > >' key\value type. Am I missing something regarding such containers? Please advise. I am sorry if I was unable to explain everything clearly. [1] https://github.com/gjcarneiro/pybindgen Thanks, Ankit Deepak -------------- next part -------------- An HTML attachment was scrubbed... URL: From adadeepak8 at gmail.com Sun May 21 06:27:42 2017 From: adadeepak8 at gmail.com (Ankit Deepak) Date: Sun, 21 May 2017 15:57:42 +0530 Subject: [CastXML] Runtime error while finding element_type with containers of pointers In-Reply-To: References: Message-ID: Hello all, I think I found out where the error was. The problem was not with the pointer but the space between the type and '*' operator. When working with pointers, "find_value_type" of "traits_impl_details" removes the '*' using a substring operation, and when that happened, it tried to find the type of the actual type along with a space. If this is not an intended behaviour of the code, then a possible enhancement could be to strip the type string of the trailing spaces before the find operation. Thanks, Ankit Deepak On Fri, May 19, 2017 at 7:33 PM, Ankit Deepak wrote: > Hello all, > > I have started working on CastXML recently. I am trying to modify > pybindgen [1] to work with CastXML and latest versions of pygccxml. > "__find_xxx_type" of "container_traits" throws Runtime Error when it > encounters std containers having pointers as elements, it works fine with > other containers. The traceback looks like: > > Traceback (most recent call last): > File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/ > python/ns3modulescan-modular.py", line 284, in > ns3_module_scan(sys.argv[1], sys.argv[2], eval(sys.argv[3]), > sys.argv[4], sys.argv[5]) > File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/ > python/ns3modulescan-modular.py", line 265, in ns3_module_scan > module_parser.scan_types() > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", > line 801, in scan_types > self._scan_namespace_types(self.module, self.module_namespace, > pygen_register_function_name="register_types") > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", > line 1334, in _scan_namespace_types > self._register_container(module, traits, type_info, _outer_class, > name) > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", > line 1522, in _register_container > element_type = traits.element_type(definition) > File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", > line 494, in element_type > File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", > line 484, in __find_xxx_type > RuntimeError: Unable to find out list '::std::list *, std::allocator >' key\value type. > > Similarly, it fails with > > RuntimeError: Unable to find out map '::std::map, > ns3::LogComponent *, std::less >, > std::allocator, ns3::LogComponent > *> > >' key\value type. > > Am I missing something regarding such containers? Please advise. > > I am sorry if I was unable to explain everything clearly. > > [1] https://github.com/gjcarneiro/pybindgen > > Thanks, > Ankit Deepak > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Sun May 21 06:42:58 2017 From: michkapopoff at gmail.com (Michka Popoff) Date: Sun, 21 May 2017 12:42:58 +0200 Subject: [CastXML] Runtime error while finding element_type with containers of pointers In-Reply-To: References: Message-ID: <271D4349-2018-4B44-81A3-8AABA594E1AE@gmail.com> Hi thanks for reporting. This seems to be a problem in pygccxml. To help me understand the exact problem, would it be possible to provide a minimal c++ code example, and the pygccxml code you are calling? Thanks Michka > On 21 May 2017, at 12:27, Ankit Deepak wrote: > > Hello all, > > I think I found out where the error was. The problem was not with the pointer but the space between the type and '*' operator. When working with pointers, "find_value_type" of "traits_impl_details" removes the '*' using a substring operation, and when that happened, it tried to find the type of the actual type along with a space. If this is not an intended behaviour of the code, then a possible enhancement could be to strip the type string of the trailing spaces before the find operation. > > Thanks, > Ankit Deepak > > On Fri, May 19, 2017 at 7:33 PM, Ankit Deepak > wrote: > Hello all, > > I have started working on CastXML recently. I am trying to modify pybindgen [1] to work with CastXML and latest versions of pygccxml. "__find_xxx_type" of "container_traits" throws Runtime Error when it encounters std containers having pointers as elements, it works fine with other containers. The traceback looks like: > > Traceback (most recent call last): > File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/python/ns3modulescan-modular.py", line 284, in > ns3_module_scan(sys.argv[1], sys.argv[2], eval(sys.argv[3]), sys.argv[4], sys.argv[5]) > File "/home/ankit/Videos/bake/source/ns-3-dev/bindings/python/ns3modulescan-modular.py", line 265, in ns3_module_scan > module_parser.scan_types() > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 801, in scan_types > self._scan_namespace_types(self.module, self.module_namespace, pygen_register_function_name="register_types") > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 1334, in _scan_namespace_types > self._register_container(module, traits, type_info, _outer_class, name) > File "/home/ankit/Videos/bake/source/pybindgen/pybindgen/castxmlparser.py", line 1522, in _register_container > element_type = traits.element_type(definition) > File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", line 494, in element_type > File "build/bdist.linux-x86_64/egg/pygccxml/declarations/container_traits.py", line 484, in __find_xxx_type > RuntimeError: Unable to find out list '::std::list >' key\value type. > > Similarly, it fails with > > RuntimeError: Unable to find out map '::std::map, ns3::LogComponent *, std::less >, std::allocator, ns3::LogComponent *> > >' key\value type. > > Am I missing something regarding such containers? Please advise. > > I am sorry if I was unable to explain everything clearly. > > [1] https://github.com/gjcarneiro/pybindgen > > Thanks, > Ankit Deepak > > _______________________________________________ > CastXML mailing list > CastXML at public.kitware.com > http://public.kitware.com/mailman/listinfo/castxml -------------- next part -------------- An HTML attachment was scrubbed... URL: From michkapopoff at gmail.com Tue May 23 16:49:03 2017 From: michkapopoff at gmail.com (Michka Popoff) Date: Tue, 23 May 2017 22:49:03 +0200 Subject: [CastXML] [ANNOUNCE] pygccxml v1.9.0 released References: <7AFF1654-9B49-47F6-BC3E-26DAF7D1827E@gmail.com> Message-ID: <542C1EE6-7ACA-439E-804D-5FCDBA41FA6A@gmail.com> Hi I am pleased to announce that pygccxml v1.9.0 has been released. pygccxml is a specialized XML reader that reads the output from CastXML or GCC-XML. It provides a simple framework to navigate C++ declarations, using Python classes. https://github.com/gccxml/pygccxml The release notes can be found here: https://github.com/gccxml/pygccxml/blob/develop/CHANGELOG.md#version-190 Enjoy! Michka -------------- next part -------------- An HTML attachment was scrubbed... URL: