-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It fails to compile using g++ 6.1.x #102
Comments
Ouch! :( As per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932, this seems to be due to a regression in GCC 6.1. For now, you should be able to work around the problem by changing the flexible array member to a zero-sized array member as follows:
I will let you know what the GCC folks say. |
Martin Sebor said that it's actually https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71147, which was fixed a couple of months ago. However, the 20160707 snapshot should have included that fix, so I will have to follow up. |
It's both of those bugs, apparently. :) |
Got an update but the problem does still appear. Current version: |
Alas, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932 has not yet been fixed. |
@junyer Where did you put this fix:
|
stefanv@86503cb is an example of the workaround. |
Out of interest, is there any reason you couldn't make |
|
It looks like Ubuntu 16.10 includes gcc 6.2, which still has this bug. TensorFlow depends on re2 at the moment, so it also breaks the TensorFlow build in the latest version of Ubuntu. Could we submit a workaround for now? |
Sent a proposed fix at #122 that avoids both flexible array members and undefined behavior. |
It's unfortunate that this bug hasn't been fixed yet, but I'd prefer not to throw the baby out with the bathwater, so I'm going to commit the workaround that I've described previously. |
For #102. Change-Id: I0e4270f7e492a59b0ee43c523378b7b9d941f38a Reviewed-on: https://code-review.googlesource.com/8492 Reviewed-by: Paul Wankadia <junyer@google.com>
…rom re2 master branch.
Hasn't this been resolved in b94b7cd? |
I'm keeping this open until the GCC folks have fixed the regression because I'll have to tweak the workaround if, for example, the regression still exists in 7.0. |
No one has reported breakage with GCC 7.x and our build matrix on Travis CI is clean. I'm going to adjust the comment on the workaround and then close this bug. |
Hello, |
Thanks for letting me know! If the bug isn't fixed in time for the GCC 10.0 release, please feel free to file a new issue for RE2 to extend the workaround. (Otherwise, I will presumably take care of it when I add GCC 10.x to the Travis CI matrix.) |
When I forced it to use clang++ with "make CXX=clang++ test" it worked.
Versions:
clang version 3.8.0 (tags/RELEASE_380/final)
g++ (GCC) 6.1.1 20160707
Translation of the error message to english (if that helps you):
re2/dfa.cc:95:10: Error: unknown array size in »delete«
The text was updated successfully, but these errors were encountered: