-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing tests with castxml + gcc5 (container traits) #47
Comments
For this I need to setup a new travis build with gcc5, to get that tested. |
I added a bunch of builds, with gcc 5.2.1 and 5.3.0, and they all pass. It was not on Wily though, so the toolchain may have a different setup there (though it should be gcc 5.2.1). I'll need to double-check that in Wily itself. |
I am also seeing errors on wily with gcc 5.2.1, but not with gcc 4.9. Specifically, the error is triggered by a call to full_name_from_declaration_path in declarations/algorithm.py:
I have attached the XML files generated by castxml with the two different compilers, in case that helps: If this appears unrelated to the original issue, I can create a separate one for my bug. |
I wrote too soon. It looks like gcc49 also fails, just not in the first module. It happens in other modules (same error as above) that depend on the first one. In addition, the error also happens on 15.04, so it's definitely a different bug. |
I'll not have time this week to look at this, I'm on holidays for a few days :) I'll investigate further next week. Maybe I will also try to add more builds to travis to get it reproduced on the build bots. |
@mamoll I added Travis builds for c++03, c++11 and c++14. They are all green. Could you please open a new bug for your problem, which seems to be a separate one than this one. Also, if possible, a small c++ code example would be great so I can try to reproduce this. |
Notes about the initial error, which I can reproduce in a wily docker container, using gcc 5.2.1-22ubuntu2. I also get this warning:
This is because the wrong macros are loaded. Removing this line fixes it, so that tr1/unordered_map and tr1/unordered_set are used: The problem seems to be that the castxml is not defined with gcc5 on wily.
does not print the error. @bradking any idea why that could happen ? It is defined when run with clang on on OS X and with gcc 5.3 on OS X. |
The castxml version packaged on wily is 0.1+git20150807-1 which pre-dates introduction of the |
The __castxml__ definition does not exist with the castxml shipped with wily. In this case, do not use it and check for __GCCXML__ instead, to know which xml generator we are using. The travis build was not getting this error because we are using one of the latest versions of CastXML there instead of the one shipped by apt. Reorganised the definitions to make more sense.
Ok, I never thought that the castxml definition was introduced only later. This does make sense why I am seing the error on Wily but not on the Travis builds where I am using one of the newer versions of CastXML. I adapted the test to check for gccxml first. The errors we were seing here we not due to a pygccxml bug, but to a test/setup problem. This should be fixed now. Thanks for the help. |
@mamoll and @Richard-Gmac I opened a new issued for your problem, see #55 Closing here. |
There are a bunch of errors with container traits under Wily (Ubuntu 5.2.1-22ubuntu2).
ERROR: test_hash_map (remove_template_defaults_tester.tester_t)
Traceback (most recent call last):
File "/home/popoff/repo/pygccxml/unittests/remove_template_defaults_tester.py", line 166, in test_hash_map
(name + '< int, double >') == hm_traits.remove_defaults(hm_i2d))
File "../pygccxml/pygccxml/declarations/container_traits.py", line 530, in remove_defaults
name = self.class_declaration(type_or_string).name
File "../pygccxml/pygccxml/declarations/container_traits.py", line 457, in class_declaration
(type_.decl_string, self.name()))
TypeError: Type "::rtd::hash_maps::hm_i2d" is not instantiation of std::unordered_map
ERROR: test_hash_multimap (remove_template_defaults_tester.tester_t)
Traceback (most recent call last):
File "/home/popoff/repo/pygccxml/unittests/remove_template_defaults_tester.py", line 182, in test_hash_multimap
hmm_traits.remove_defaults(hmm_i2d))
File "../pygccxml/pygccxml/declarations/container_traits.py", line 530, in remove_defaults
name = self.class_declaration(type_or_string).name
File "../pygccxml/pygccxml/declarations/container_traits.py", line 457, in class_declaration
(type_.decl_string, self.name()))
TypeError: Type "::rtd::hash_multimaps::hmm_i2d" is not instantiation of std::unordered_multimap
ERROR: test_hash_multiset (remove_template_defaults_tester.tester_t)
Traceback (most recent call last):
File "/home/popoff/repo/pygccxml/unittests/remove_template_defaults_tester.py", line 151, in test_hash_multiset
mhs_traits.remove_defaults(mhs_v_int))
File "../pygccxml/pygccxml/declarations/container_traits.py", line 530, in remove_defaults
name = self.class_declaration(type_or_string).name
File "../pygccxml/pygccxml/declarations/container_traits.py", line 457, in class_declaration
(type_.decl_string, self.name()))
TypeError: Type "::rtd::hash_multisets::mhs_v_int" is not instantiation of std::unordered_multiset
ERROR: test_hash_set (remove_template_defaults_tester.tester_t)
Traceback (most recent call last):
File "/home/popoff/repo/pygccxml/unittests/remove_template_defaults_tester.py", line 135, in test_hash_set
hs_traits.remove_defaults(hs_v_int),
File "../pygccxml/pygccxml/declarations/container_traits.py", line 530, in remove_defaults
name = self.class_declaration(type_or_string).name
File "../pygccxml/pygccxml/declarations/container_traits.py", line 457, in class_declaration
(type_.decl_string, self.name()))
TypeError: Type "::rtd::hash_sets::hs_v_int" is not instantiation of std::unordered_set
FAIL: test_find_traits (find_container_traits_tester.tester_t)
Traceback (most recent call last):
File "/home/popoff/repo/pygccxml/unittests/find_container_traits_tester.py", line 99, in test_find_traits
"unordered_set< std::vector< int > >")
File "/home/popoff/repo/pygccxml/unittests/find_container_traits_tester.py", line 39, in __cmp_traits
traits.name()))
AssertionError: container "rtd::hash_sets::hs_v_int [typedef]", expected unordered_set_traits, got hash_set_traits
The text was updated successfully, but these errors were encountered: