Home Bug Reports

[3.4b] slice2java skips exception fields with // comments

joshmoorejoshmoore GermanyMember Josh MooreOrganization: Glencoe Software, Inc.Project: OME, http://openmicroscopy.org
Running slice2java against the following slice definition produces one exception (E1) with only a single field (concurrency) and one exception (E2) with three fields (concurrency, backOff, type)
module ex {
  exception E1 {
      bool    concurrency;
      long    backOff;    // Only used if ConcurrencyException
      string  type;       // Ice static type information
  };
  exception E2 {
      bool    concurrency;
      long    backOff;    /* Only used if ConcurrencyException */
      string  type;       /* Ice static type information */
  };
};

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    On what platform are you seeing this? Did you compile MCPP yourself? If so, did you apply the patch we provided?
  • joshmoorejoshmoore GermanyMember Josh MooreOrganization: Glencoe Software, Inc.Project: OME, http://openmicroscopy.org
    This was on Mac 10.4 with an up-to-date MacPorts installation. I compiled mcpp with:
    test -e $MCPP_DONE || {
        patch -p0 < ../mcpp/patch.mcpp.2.7.2
        touch $MCPP_DONE
    }
    test -e $MCPP_HOME || {
        ./configure CFLAGS="-fno-common -fPIC" --enable-mcpplib --disable-shared --prefix=$MCPP_HOME
        make
        make install
    }
    
    and then called
    export MCPP_HOME=$MCPP_HOME
    
    before compiling Ice, but apparently the MacPorts mcpp 2.7.2 (installed as a dependency of ice-cpp 3.3.1) was still picked up before MCPP_HOME. Forcibly removing the MacPorts version fixed the problem.

    Let me know if it's worth trying to reproduce the build error, but for now, it's working. Thanks for the help, Dwayne.
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    The issue is expected if the mcpp patch is not applied.
Sign In or Register to comment.