Sre_constants.error: multiple repeat

I’m hitting an error when trying to stage sigc++ as part of the gnome-3-34 build snap.

make[2]: Leaving directory '/root/parts/sigc++/build'                    
make[1]: Leaving directory '/root/parts/sigc++/build'                    
Staging sigc++                      
multiple repeat at position 25

Here is the full pastebin of the error

my snapcraft version is (edge/pr-2794):
snapcraft 3.9.2+git232.gfea28e83 x2 edge/… - classic

my multipass version is:
multipass 1.1.0-dev.78+g915e1e0 1693 edge canonical✓ classic

From googling this error, it seems to regex with multiple repeats found when matching so perhaps there’s some regex in that needs tweaking.

I would bet this is because you have ++ in the part name. Try renaming the part to sigc-plusplus or just sigc.

Looking at the code in question, it is substituting a path into a regular expression:

    if prefix_trim:
        pattern_trim = re.compile("^prefix={}(?P<prefix>.*)".format(prefix_trim))

So the regex special characters likely are what is triggering the bug. That code should probably be using re.escape() to make prefix_trim safe to substitute into the regex.