Home Bug Reports

Ice 3.3.1 slice2cpp error with symlinks

hawesiehawesie Member Nick HawesOrganization: University of BirminghamProject: Robotics middleware
Using an install of 3.3.1 compiled from source on Mac OS X when I issue a slice2cpp command with a symlinked path to the slice file I get an error. E.g.

vonnegut:cast nah$ slice2cpp -I/Users/nah/cast/src/slice --stream --header-ext hpp --output-dir /Users/nah/cast/src/c++/cast/slice /Users/nah/cast/src/slice/CDL.ice
Assertion failed: (_definitionContextStack.size() == 1), function parse, file Parser.cpp, line 5512.
Abort trap

But, with just the relative normal path to the ice file it all works

vonnegut:cast nah$ slice2cpp -I/Users/nah/cast/src/slice --stream --header-ext hpp --output-dir /Users/nah/cast/src/c++/cast/slice src/slice/CDL.ice

I can work around it for now, but it seems pretty odd!

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    I tried this with a simple example and could not reproduce the problem.

    Could you post the exact file paths and symlink paths, as well as the content of the Slice files? Alternatively, if you have a self-contained example that shows the problem, that would be great too.

    Thanks,

    Michi.
  • hawesiehawesie Member Nick HawesOrganization: University of BirminghamProject: Robotics middleware
    I've done a bit more digging and here's the problem in more detail. The full (dumb... excuse my disorganised filesystem!) absolute path to the Slice file is

    /Users/nah/Documents/code/cosy.svn/development/cast/trunk/tools/cast/src/slice/CDL.ice

    The directory I use as the root for my work is

    /Users/nah/Documents/code/cosy.svn/development/cast/trunk/tools/cast

    I have two symlinks that I use to get to this:

    ln -s /Users/nah/Documents/code/cosy.svn ~/svn.cosy

    and

    ln -s ~/svn.cosy/development/cast/trunk/tools/cast ~/cast

    (note that the second link requires the first one)

    Given this setup the command slice2cpp gives the error like:

    vonnegut:~ nah$ slice2cpp /Users/nah/cast/src/slice/CDL.ice
    Assertion failed: (_definitionContextStack.size() == 1), function parse, file Parser.cpp, line 5512.
    Abort trap


    BUT if I replace the ~/cast symlink with

    ln -s Documents/code/cosy.svn/development/cast/trunk/tools/cast ~/cast

    (i.e. this now does not depend on the intermediate symlink)

    then the error does not occur. So it seems like the intermediate link (which I really shouldn't need anyway) causes the problem. This did not happen with 3.3.0 (the only other version of Ice I've used).

    I've put the Slice file here:

    http://www.cs.bham.ac.uk/~nah/cast/CDL.ice

    If you need more information, just let me know.
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    I managed to reproduce the problem, thanks. We already published a patch for this issue.

    Cheers,

    Michi.
  • cholzhausencholzhausen Member Chris HolzhausenOrganization: Analytical Engineering Inc.Project: Project GINA
    Hello Michi,

    I have upgraded to 3.3.1 and added the patch that you have specified, and I am still receiving the error that was mentioned in this thread. I can get rid of the error if I remove the multiple '/' from my Makefile for the slice2cpp command. I running on a linux machine.

    Thanks,
    Chris
Sign In or Register to comment.