-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fuzztest: new recipe #22995
base: master
Are you sure you want to change the base?
fuzztest: new recipe #22995
Conversation
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ❌Failure in build 2 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping See details:Failure in build 2 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
@RubenRBS I'd like some feedback, the big problem is that this package uses internal re2 headers that aren't in that package. There's an issue for it (google/fuzztest#91), but I don't expect it to be fixed anytime soon. As a potential hacky fix, we can add the following to re2's package (messy version, just as a proof-of-concept): diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py
index 8d2e83b16..bb5455c37 100644
--- a/recipes/re2/all/conanfile.py
+++ b/recipes/re2/all/conanfile.py
@@ -2,7 +2,7 @@ from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
-from conan.tools.files import copy, get, rmdir
+from conan.tools.files import copy, get, replace_in_file, rmdir
from conan.tools.scm import Version
import os
@@ -86,6 +86,17 @@ class Re2Conan(ConanFile):
deps.generate()
def build(self):
+ # HACK: fuzztest uses these internal headers
+ replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(RE2_HEADERS", """
+set(RE2_HEADERS
+ re2/prog.h
+ util/logging.h
+ re2/pod_array.h
+ re2/sparse_array.h
+ re2/sparse_set.h
+ re2/regexp.h
+ util/utf.h
+""")
cmake = CMake(self)
cmake.configure()
cmake.build()
@@ -94,6 +105,9 @@ class Re2Conan(ConanFile):
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()
+ replace_in_file(self, os.path.join(self.package_folder, "include", "re2", "prog.h"), "util/logging.h", "re2/logging.h")
+ replace_in_file(self, os.path.join(self.package_folder, "include", "re2", "regexp.h"), "util/logging.h", "re2/logging.h")
+ replace_in_file(self, os.path.join(self.package_folder, "include", "re2", "regexp.h"), "util/utf.h", "re2/utf.h")
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) If we want a bit of safety, we could also add to the add of the top of each of those files something like #ifndef CONAN_RE2_USE_INTERNAL_HEADERS
#error "These headers are internal! Define CONAN_RE2_USE_INTERNAL_HEADERS if you know what you're doing!"
#endif Then define Thoughts? |
Specify library name and version: fuzztest/cci.20240305
Resolves #22933
Depends on #22982, #22983
One issue that will come up is that fuzztest uses internal re2 headers (see here). A possible fix is to just expose these headers in re2, but I don't think there's a good solution to this aside from a proper fix from upstream.