Skip to content
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

Ninja check failing #222

Open
xansec opened this issue Jun 13, 2023 · 2 comments
Open

Ninja check failing #222

xansec opened this issue Jun 13, 2023 · 2 comments

Comments

@xansec
Copy link

xansec commented Jun 13, 2023

After running the cmake commands here, I get:

$ ninja check

[..output...]

#0 1.739 /usr/bin/clang++  -I/src/libprotobuf-mutator -I/src/libprotobuf-mutator/build -I/src/libprotobuf-mutator/build/external.googletest/include -fno-exceptions -Werror -Wall -Wstring-conversion -g -std=c++14  -fsanitize-coverage=0 -MD -MT src/CMakeFiles/protobuf-mutator.dir/mutator.cc.o -MF src/CMakeFiles/protobuf-mutator.dir/mutator.cc.o.d -o src/CMakeFiles/protobuf-mutator.dir/mutator.cc.o -c /src/libprotobuf-mutator/src/mutator.cc
#0 1.739 In file included from /src/libprotobuf-mutator/src/mutator.cc:27:
#0 1.739 /src/libprotobuf-mutator/src/field_instance.h:193:50: error: no member named 'requires_utf8_validation' in 'google::protobuf::FieldDescriptor'
#0 1.739   bool EnforceUtf8() const { return descriptor_->requires_utf8_validation(); }
#0 1.739                                     ~~~~~~~~~~~  ^
#0 1.739 1 error generated.
@EljakimHerrewijnen
Copy link

I had the same issue and fixed it by adding this flag to the cmake command:

-DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON

So:

cmake .. -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON

@xansec
Copy link
Author

xansec commented Jun 23, 2023

Thanks! That's a lot better than my solution of

sed -i 's/descriptor_->requires_utf8_validation()/true/' /src/libprotobuf-mutator/src/field_instance.h

(but this should probably still be resolved upstream.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants