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

fuzztest: new recipe #22995

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

Ahajha
Copy link
Contributor

@Ahajha Ahajha commented Mar 5, 2024

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.


@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 2 (8ffe9ba8ca74c6bb8fea7621799b18a3572cf12a):

  • fuzztest/cci.20240305:
    Error running command conan export recipes/fuzztest/all/conanfile.py fuzztest/cci.20240305@:
    [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK
    [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK
    [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK
    [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK
    [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 12.3857421875 KB
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK
    [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK
    [HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK
    [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK
    [HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK
    [HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK
    [HOOK - conan-center.py] pre_export(): [NOT ALLOWED ATTRIBUTES (KB-H039)] OK
    [HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK
    [HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK
    [HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK
    [HOOK - conan-center.py] pre_export(): [CONFIG.YML HAS NEW VERSION (KB-H052)] OK
    [HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK
    [HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS RENAME (KB-H057)] OK
    [HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK
    [HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK
    [HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK
    [HOOK - conan-center.py] pre_export(): [NO BUILD SYSTEM FUNCTIONS (KB-H061)] OK
    [HOOK - conan-center.py] pre_export(): [TOOLS CROSS BUILDING (KB-H062)] OK
    [HOOK - conan-center.py] pre_export(): [INVALID TOPICS (KB-H064)] OK
    [HOOK - conan-center.py] pre_export(): [NO REQUIRED_CONAN_VERSION (KB-H065)] OK
    [HOOK - conan-center.py] pre_export(): [TEST_TYPE MANAGEMENT (KB-H068)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO DEFAULT OPTIONS (KB-H069)] OK
    [HOOK - conan-center.py] pre_export(): [MANDATORY SETTINGS (KB-H070)] OK
    [HOOK - conan-center.py] pre_export(): [PYLINT EXECUTION (KB-H072)] OK
    [HOOK - conan-center.py] pre_export(): [REQUIREMENT OVERRIDE PARAMETER (KB-H075)] OK
    [HOOK - conan-center.py] pre_export(): ERROR: [NO FINAL ENDLINE (KB-H041)] File '/home/conan/w/prod-v1_cci_PR-22995/recipes/fuzztest/all/test_package/test_package.cpp' does not end with an endline (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H041-NO-FINAL-ENDLINE) 
    ERROR: [HOOK - conan-center.py] pre_export(): Some checks failed running the hook, check the output
    

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 ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

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 @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 2 (8ffe9ba8ca74c6bb8fea7621799b18a3572cf12a):

  • fuzztest/cci.20240305:
    Error running command conan graph info --requires fuzztest/cci.20240305@#19eff69441efdf2d0880e8a82f8a6ca8 -f json -pr:h /home/conan/w/prod-v2/bsr/102861/cccdc/profile_linux_11_libstdcpp11_17_gcc_release_64.-shared-False.txt -pr:b /home/conan/w/prod-v2/bsr/102861/cccdc/profile_linux_11_libstdcpp11_17_gcc_release_64..txt:
    ======== Computing dependency graph ========
    abseil/20240116.1@local/beta: Not found in local cache, looking in remotes...
    abseil/20240116.1@local/beta: Checking remote: conan-center
    abseil/20240116.1@local/beta: Checking remote: c3i_PR-v2-22995
    Graph root
        cli
    Requirements
        fuzztest/cci.20240305#19eff69441efdf2d0880e8a82f8a6ca8 - Cache
    Graph error
        Package 'abseil/20240116.1@local/beta' not resolved: Unable to find 'abseil/20240116.1@local/beta' in remotes.
    ERROR: Package 'abseil/20240116.1@local/beta' not resolved: Unable to find 'abseil/20240116.1@local/beta' in remotes.
    

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.

@Ahajha
Copy link
Contributor Author

Ahajha commented Mar 8, 2024

@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 CONAN_RE2_USE_INTERNAL_HEADERS within the fuzztest package (and I think it would also need to be exposed to consumers).

Thoughts?

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

Successfully merging this pull request may close these issues.

[request] fuzztest/cci.20240229
2 participants