Archived
This forum has been archived. Please start a new discussion on GitHub.
Integration of Python code with Ice on Ubuntu
Dear All,
I'm stuck right now in the integration of Python (2.6.5) code with Ice on Ubuntu (10.04). I've built Ice 3.4.2 from sources using the patch for mcpp from the "Third-Party" package. My slice definition has some includes (which are compiled without any problems using slice2cpp) and looks as follows:
I'm compiling it with slice2py as follows:
but getting the following error:
Common.ice:58 is the very last line here:
It reminds me of this discussion about the parsing errors in slice2py: http://www.zeroc.com/forums/help-center/4872-slice2py-parsing-errors.html
Is this problem still not fixed? Any ideas?
Many thanks in advance!
Cheers,
Alexey
I'm stuck right now in the integration of Python (2.6.5) code with Ice on Ubuntu (10.04). I've built Ice 3.4.2 from sources using the patch for mcpp from the "Third-Party" package. My slice definition has some includes (which are compiled without any problems using slice2cpp) and looks as follows:
#ifndef _MONOIMAGESEGMENTATION_ICE #define _MONOIMAGESEGMENTATION_ICE #include <Sensors.ice> #include <Ice/SliceChecksumDict.ice> module Garnics { module MidLevel { interface MonoImageSegmentation { // Slice checksums idempotent Ice::SliceChecksumDict getSliceChecksums(); Garnics::Common::GARNICSERROR segmentInfraredImage(Garnics::SensorServer::acquisitionData inputData , out Garnics::SensorServer::acquisitionData monoSegments); }; }; }; #endif //#ifndef _MONOIMAGESEGMENTATION_ICE
I'm compiling it with slice2py as follows:
slice2py --checksum --ice --all -I/opt/Ice-3.4.2/slice/ -I. MonoImageSegmentation.ice
but getting the following error:
/home/administrator/Desktop/GarnicsSVNData/garnics/code/slice/Common.ice:58: enum `COORDINATESYSTEM' must have at least one enumerator
Common.ice:58 is the very last line here:
enum COORDINATESYSTEM { WORLD, /*roboter base*/ TOOL, //roboter tool (e.g. calibrated with KUKA, including cameras) BASE, //roboter base (calibrated with KUKA) CAM //camera in current acquisitiondata (e.g. for relative extrinsics) };
It reminds me of this discussion about the parsing errors in slice2py: http://www.zeroc.com/forums/help-center/4872-slice2py-parsing-errors.html
Is this problem still not fixed? Any ideas?
Many thanks in advance!
Cheers,
Alexey
0
Comments
-
Hi Alexey,
I am not aware of any parsing bug in slice2py.
Can you post a complete .ice file that triggers this error? I've just tried your enum definition, and it worked fine.
Thanks,
Bernard0 -
Hi Bernard,
thanks for your reply! In the meanwhile we have fixed the problem by switching from C++ to C comment style in all our interfaces and slice2py works fine. Either I need to some patches for my system or slice2py still have some parsing problems as described here: http://www.zeroc.com/forums/help-center/4872-slice2py-parsing-errors.html .
Best,
Alexey0 -
Wrong version of mcpp
Hi,
you seem to be using an unpatched version of mcpp. Once you apply the fixes (they are parts of FreeBSD ports, MacPorts, Debian etc. and also available for download on the ZeroC website) it should work as expected.
See also: http://www.zeroc.com/forums/bug-reports/5309-mishap-slice-compilers.html
Cheers,
Michael0