Thread: [pygccxml-development] Test environment
Brought to you by:
mbaas,
roman_yakovenko
From: Michał N. <mm...@gm...> - 2009-11-17 22:56:30
|
Hello I have following problem: in my project I use pyplusplus and pygccxml. I want my application to be standalone so pyplusplus_dev, pygccxml_bin and gccxml_bin directories are embedded in my root directory (via svn:externals). This project requires also boost (frozen 1.39 is embedded too). When i launch my build script on 64 bit ubuntu 8.10 with gcc 4.3 and python 2.5 I get following errors: gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/detail/lcast_precision.hpp:16 (...) /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/integer_traits.hpp:155: error: integer constant is too large for 'long' type In file included from /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/lexical_cast.hpp:31, (...) /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/detail/lcast_precision.hpp:85: error: integer constant is too large for 'long' type This is strange because on other computer (32 bits kubuntu 9.4 gcc4.3 python 2.5) this just works fine. I thought binaries in gccxml_bin should work on any linux just to try unit tests out of box (by the way - not all unit test are passed). Maybe I can just set some flags or attach some config file to solve this problem? Can you help me? My project can be found here: svn checkout svn://koral.ise.pw.edu.pl/fasthapl (yes, it's quite large because of third parties) to build it just run python build.py in impl directory. -- Regards Michał Nowotka |
From: Roman Y. <rom...@gm...> - 2009-11-18 05:59:15
|
2009/11/18 Michał Nowotka <mm...@gm...>: > Hello > I have following problem: in my project I use pyplusplus and pygccxml. > I want my application to be standalone so pyplusplus_dev, pygccxml_bin > and gccxml_bin directories are embedded in my root directory (via > svn:externals). This project requires also boost (frozen 1.39 is > embedded too). When i launch my build script on 64 bit ubuntu 8.10 > with gcc 4.3 and python 2.5 I get following errors: > > gccxml_runtime_error_t: Error occured while running GCC-XML: In file > included from /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/detail/lcast_precision.hpp:16 > (...) > /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/integer_traits.hpp:155: > error: integer constant is too large for 'long' type > In file included from > /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/lexical_cast.hpp:31, > (...) > /home/mnowotka/Pulpit/fasthapl/impl/pyplusplus_dev/../boost/include/boost-1_39/boost/detail/lcast_precision.hpp:85: > error: integer constant is too large for 'long' type > > > This is strange because on other computer (32 bits kubuntu 9.4 gcc4.3 > python 2.5) this just works fine. I thought binaries in gccxml_bin > should work on any linux just to try unit tests out of box (by the way > - not all unit test are passed). If I remember right, gccxml is based on GCC 4.2 compiler, so it is possible that such errors will happen. > Maybe I can just set some flags or > attach some config file to solve this problem? Can you help me? I could try: create small example that reproduce the problem and post it here. I will take a look on it. > My project can be found here: > svn checkout svn://koral.ise.pw.edu.pl/fasthapl (yes, it's quite large > because of third parties) > > to build it just run python build.py in impl directory. Unfortunately, I don't have enough resources to investigate the problem on your project. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Roman Y. <rom...@gm...> - 2009-11-19 06:34:34
|
2009/11/19 Michał Nowotka <mm...@gm...>: > Ok, test case is very simple... > > #include <climits> > > class test > { > public: > unsigned int b; > test() :b(ULONG_MAX){} > }; > > And thats all. I don't know whats special in climits and ULONG_MAX > constant but this causes an error. Hmm. It looks like a real bug. Take a look on the following table: http://www.ibm.com/developerworks/library/l-port64.html . If you can change code: you can move the code to cpp file and to use std::numeric_limits If you can't : a quick work around could be to redefine the ULONG_MAX value Let me know, if you need help with the second solution. P.S. The mail was sent to the mailing list too -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Roman Y. <rom...@gm...> - 2009-11-20 19:25:09
|
2009/11/20 Michał Nowotka <mm...@gm...>: >> If you can change code. > I can't. :-( >> Let me know, if you need help with the second solution. > Yes I need. What GCCXML version you are using? I just your example with the latest gccxml version and it works just fine. ( On Ubuntu 9.10 ) > I just don't feel this solution. What value should I assign to ULONG_MAX? UINT_MAX :-) > Where actually should I redefine it and how (the compiler will yield > at me because of redefinition)? http://language-binding.net/pygccxml/apidocs/parser.html mb = module_builder_t( gccxml_config=gccxml_configuration_t( .... ), ... ) gc = gccxml_configuration_t( define_symbols=["ULONG_MAX=432524"], ... ) > And this is just dirty hack - note that i use tester class from > pyplusplus unittests. This first invokes gccxml and later gcc in order > to expose some code to python. Both tools gccxml and gcc works on the > same code and this is done automatically. Redefining some constant > just for gccxml is problematic. It could be, I agree with you, but in the scenario you gave. GCCXML reports only declarations - it doesn't dump a C++ expression. So, it should be safe to "redefine" some pieces to cause it to compile the code. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Roman Y. <rom...@gm...> - 2009-11-20 19:26:13
|
2009/11/20 Roman Yakovenko <rom...@gm...>: > 2009/11/20 Michał Nowotka <mm...@gm...>: >>> If you can change code. >> I can't. > > :-( > >>> Let me know, if you need help with the second solution. >> Yes I need. > > What GCCXML version you are using? I just your example with the latest > gccxml version and it works just fine. ( On Ubuntu 9.10 ) > >> I just don't feel this solution. What value should I assign to ULONG_MAX? > > UINT_MAX :-) > >> Where actually should I redefine it and how (the compiler will yield >> at me because of redefinition)? > > http://language-binding.net/pygccxml/apidocs/parser.html > > mb = module_builder_t( gccxml_config=gccxml_configuration_t( .... ), ... ) > > gc = gccxml_configuration_t( define_symbols=["ULONG_MAX=432524"], ... ) > >> And this is just dirty hack - note that i use tester class from >> pyplusplus unittests. This first invokes gccxml and later gcc in order >> to expose some code to python. Both tools gccxml and gcc works on the >> same code and this is done automatically. Redefining some constant >> just for gccxml is problematic. > > It could be, I agree with you, but in the scenario you gave. I wanted to write "but NOT in the scenario you gave. " -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |