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

GH-44384: [C++] Use CMAKE_LIBTOOL on macOS #44385

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

tomjakubowski
Copy link
Contributor

@tomjakubowski tomjakubowski commented Oct 11, 2024

When a builder sets CMAKE_LIBTOOL, use that as the program to bundle dependencies. This matches the behavior of the Windows build.

Also make a nitpicky minor update to the error message when a non-Apple libtool is detected.

Are these changes tested?

I did not add a test case for this build configuration. I confirmed the behavior when CMAKE_LIBTOOL is set, using this script on a Mac. It creates an ad-hoc libtool wrapper and then passes it as CMAKE_LIBTOOL.

#!/bin/bash

mylibtool=$(mktemp -d)/libtool.sh
cat << 'EOF' > "$mylibtool"
#!/bin/bash
say -v Tom -- "voice-enhanced libtool:" "$@"
/usr/bin/libtool "$@"
EOF
chmod +x "$mylibtool"

cmake -GNinja -DARROW_DEPENDENCY_SOURCE=BUNDLED -DCMAKE_LIBTOOL="$mylibtool" -S cpp -B build/
cmake --build build/

I am not sure how to best add a test for this to the repository.

Are there any user-facing changes?

This changes how bundled builds behave when an Apple build-user sets CMAKE_LIBTOOL in their CMake invocation. I think the change is a sensible one and wouldn't be surprising to users, but it may break existing builds in environments where /usr/bin/libtool is Apple's libtool, and CMAKE_LIBTOOL is set to a non-Apple one.

Copy link

⚠️ GitHub issue #44384 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Could you fix a lint error by pre-commit run --show-diff-on-failure --color=always --all?

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Oct 12, 2024
When a builder sets `CMAKE_LIBTOOL`, use that as the program to bundle
dependencies.  This matches the behavior of the Windows build.

Also make a nitpicky minor update to the error message when a non-Apple
libtool is detected.
@tomjakubowski
Copy link
Contributor Author

Updated the formatting and got myself set up with pre-commit. Thanks for the pointer!

@tomjakubowski
Copy link
Contributor Author

C GLib & Ruby / AMD64 Ubuntu 22.04 GLib & Ruby (pull_request) Failing after 10m

  connect to 140.82.113.4 port 443 failed: Connection timed out

  Failed to connect to github.com port 443 after 135169 ms: Connection timed
  out

looks like a network outage maybe?

R / Check minimum supported Arrow C++ Version (15.0.2) (pull_request) Failing after 25s

E: Version '15.0.2-1' for 'libarrow-dev' was not found
E: Version '15.0.2-1' for 'libarrow-acero-dev' was not found
E: Version '15.0.2-1' for 'libparquet-dev' was not found
E: Version '15.0.2-1' for 'libarrow-dataset-dev' was not found

Not sure what that one is about.

@tomjakubowski
Copy link
Contributor Author

tomjakubowski commented Oct 15, 2024

two other build failures also seem unrelated (they have the same error):

C++ / AMD64 Conda C++ AVX2 (pull_request) Failing after 22s

C++ / AMD64 Ubuntu 22.04 C++ ASAN UBSAN (pull_request)

Reading state information...
python3 is already the newest version (3.12.3-0ubuntu2).
python3-dev is already the newest version (3.12.3-0ubuntu2).
python3-pip is already the newest version (24.0+dfsg-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.

@kou
Copy link
Member

kou commented Oct 16, 2024

The GLib failure is just a network error. It'll be fixed by re-run.

Other failures are already fixed on main.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit 25a2440 into apache:main Oct 16, 2024
33 of 36 checks passed
@kou kou removed the awaiting merge Awaiting merge label Oct 16, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Oct 16, 2024
@tomjakubowski tomjakubowski deleted the macos-cmake-libtool branch October 16, 2024 01:45
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 25a2440.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 19 possible false positives for unstable benchmarks that are known to sometimes produce them.

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

Successfully merging this pull request may close these issues.

2 participants