bobhan1 opened a new pull request, #70491: URL: https://github.com/apache/doris/pull/70491
### Background Cloud configuration prepares FoundationDB 7.1.57 as the default client and 7.3.69 as an external client. Their headers and shared libraries are copied into the third-party installation and packaged with Cloud binaries and tests. ### What problem does this PR solve? Issue Number: None Related PR: #59360 (multi-version FDB client setup) PR Type: Bugfix Problem Summary: On macOS, `./build.sh --cloud` appears to hang after `-- build azure: ON`. The FDB OS detector expands `/etc/*release*` to an empty list and invokes `cat` without arguments, which waits for stdin. Sending EOF lets configuration continue, but it then selects Linux clients. Detect macOS explicitly, read release files through CMake, and prepare native macOS clients through linking and installation. ### Details - **Frequency:** Every fresh macOS Cloud configuration with stdin kept open; an empty release-file list can also occur on other hosts. - **Root cause:** The detector relies on an external `cat` process and defaults every non-Ubuntu host to CentOS. Artifact and installation paths assume `.so` libraries. - **Why existing tests missed it:** Linux hosts normally have release files, and the failure happens before Cloud tests can be built. The macOS BE workflow does not exercise Cloud FDB setup. - **Fix:** Use native CMake file reads and explicit macOS detection. Add official arm64/x86_64 packages for both configured FDB versions, follow download redirects, use CMake's portable checksum implementation, and extract client payloads with `pkgutil` without running the installer. Select the platform library filename and enable macOS loader paths for build and installed executables. - **Other paths and branches:** Update default-client, external-client, helper-installer, and Cloud-test installation paths together. Linux artifact URLs, library filenames, and API versions remain unchanged. This PR targets master. - **Behavior change:** macOS configuration proceeds without terminal input and prepares native clients. A failed extraction stops configuration; an installation missing its library is extracted again. ### Testing Locally on macOS arm64: - `git diff --check` passed. - Kept stdin open in a standalone CMake project including the actual FDB module: master timed out after 30 seconds; the patched module configured in about 3 seconds with cached packages, including stale CentOS detection cache entries. - Verified all four macOS packages against upstream SHA-256 sidecars before recording their MD5 values. Exercised fresh downloads, verification, and extraction through the patched module. - Linked and ran an arm64 C client, initialized its FDB network with the external-client directory, and ran it again after relocating the installed directory. Confirmed API versions 710 and 730. Cross-compiled and installed the x86_64 probe and checked both x86_64 client libraries; no x86_64 runtime claim. - Exercised Linux ARM/CentOS fallback with no release files and AMD64/Ubuntu selection with a release-file fixture, using the real Linux archives. No Linux executable runtime test was run. - Confirmed rejection/removal of an incomplete download, fatal handling of a simulated `pkgutil` failure, and recovery when an installed client library is missing. - With JDK 17, `BUILD_TYPE=ASAN DISABLE_BE_JAVA_EXTENSIONS=ON ./build.sh --cloud -j 4` completed FDB setup and CMake configuration. The subsequent build stopped because the existing third-party installation lacks `installed/lib/libs2n.a`; a full Cloud build was not completed. ### Release note Fix the FoundationDB configuration hang on macOS and prepare native macOS clients for Cloud builds. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: FDB configuration, linking, installation, and arm64 smoke checks passed; the full Cloud build is blocked by the existing missing `libs2n.a` dependency. ### AI Disclosure - Tool: OpenAI Codex (GPT-6) - Generated: Code and this description. - Human review: No human review of the generated changes recorded yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
