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

[CI][Packaging][Java] java-jars job fail on macOS aarch_64 #37201

Closed
raulcd opened this issue Aug 16, 2023 · 13 comments
Closed

[CI][Packaging][Java] java-jars job fail on macOS aarch_64 #37201

raulcd opened this issue Aug 16, 2023 · 13 comments

Comments

@raulcd
Copy link
Member

raulcd commented Aug 16, 2023

Describe the bug, including details regarding any error messages, version, and platform.

The java-jars job is currently failing on Build C++ libraries macOS aarch_64

This error is also happening on the maintenance branch for 13.0.0:
#36616 (comment)
https://github.com/ursacomputing/crossbow/actions/runs/5877563237/job/15937924010

The error is the following:

 -- Performing Test CXX_LINKER_SUPPORTS_VERSION_SCRIPT
 -- Performing Test CXX_LINKER_SUPPORTS_VERSION_SCRIPT - Failed

There's a bunch of Warnings but I am pretty sure they are not related:

CMake Warning at /Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp-build/cpp-install/lib/cmake/Arrow/FindThriftAlt.cmake:56 (find_package):
  By not providing "FindThrift.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Thrift", but
  CMake did not find one.

  Could not find a package configuration file provided by "Thrift" with any
  of the following names:

    ThriftConfig.cmake
    thrift-config.cmake

  Add the installation prefix of "Thrift" to CMAKE_PREFIX_PATH or set
  "Thrift_DIR" to a directory containing one of the above files.  If "Thrift"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.27.2/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp-build/cpp-install/lib/cmake/Arrow/ArrowConfig.cmake:105 (find_dependency)
  adapter/orc/CMakeLists.txt:18 (find_package)


CMake Warning at /Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp-build/cpp-install/lib/cmake/Arrow/Findlz4Alt.cmake:29 (find_package):
  By not providing "Findlz4.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "lz4", but
  CMake did not find one.

  Could not find a package configuration file provided by "lz4" with any of
  the following names:

    lz4Config.cmake
    lz4-config.cmake

  Add the installation prefix of "lz4" to CMAKE_PREFIX_PATH or set "lz4_DIR"
  to a directory containing one of the above files.  If "lz4" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.27.2/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp-build/cpp-install/lib/cmake/Arrow/ArrowConfig.cmake:105 (find_dependency)
  adapter/orc/CMakeLists.txt:18 (find_package)


-- Arrow version: 13.0.0
-- Found the Arrow shared library: 
-- Found the Arrow import library: 
-- Found the Arrow static library: /Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp-build/cpp-install/lib/libarrow.a
-- Configuring incomplete, errors occurred!

Component(s)

Continuous Integration, Java, Packaging

@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

It seems the error is here:

 -- Found Java: /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home/bin/java (found version "11.0.20") 
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
CMake Error at /opt/homebrew/Cellar/cmake/3.27.2/share/cmake/Modules/FindJNI.cmake:394 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:61 (find_package)


-- Found JNI: /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home/include  found components: AWT JVM 

@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

I am investigating with @amaldonadomat it might be related to an update on the M1 OS

@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

@kou @lidavidm any idea of what might be going on here?
The last successful job on main for the macOS aarch_64 is this one:
https://github.com/ursacomputing/crossbow/actions/runs/5818829907/job/15776016372
from 6 days ago.

  • CMake was 3.27.1 instead of 3.27.2

but on the release notes there doesn't seem to be nothing relevant around the issue above:
https://cmake.org/cmake/help/latest/release/3.27.html#id2

@raulcd raulcd changed the title [CI][Packaging][Java] java-jars job fail on CXX_LINKER_SUPPORTS_VERSION_SCRIPT check on macOS aarch_64 [CI][Packaging][Java] java-jars job fail on macOS aarch_64 Aug 16, 2023
@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

It does seem to be related to the last two commits on FindJNI.cmake:
Kitware/CMake@efa0e2d
Kitware/CMake@597139b

@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

it does seem the fix is not included on a new CMake release

raulcd added a commit to raulcd/arrow that referenced this issue Aug 16, 2023
@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

There doesn't seem to be any alias for prior CMake versions on Homebrew that we could reuse.

@lidavidm
Copy link
Member

Hmm, would vendoring FindJNI.cmake possibly work?

@raulcd
Copy link
Member Author

raulcd commented Aug 16, 2023

I am asking if they have a timeline for 3.27.3 on the fix: https://gitlab.kitware.com/cmake/cmake/-/issues/25181

@assignUser
Copy link
Member

This is on our self-hosted runner right? I think the easiest fix would be to manually install an older cmake version without the bug and remove the brew cmake after the bundle installation: https://github.com/ursacomputing/crossbow/actions/runs/5877563237/workflow#L197

@kou
Copy link
Member

kou commented Aug 17, 2023

Duplicated of #37159.

@kou
Copy link
Member

kou commented Aug 17, 2023

How about adding -DXCODE_VERSION= CMake option as a workaround?

diff --git a/ci/scripts/java_jni_macos_build.sh b/ci/scripts/java_jni_macos_build.sh
index d66c39a37..647a7dad8 100755
--- a/ci/scripts/java_jni_macos_build.sh
+++ b/ci/scripts/java_jni_macos_build.sh
@@ -90,6 +90,7 @@ cmake \
   -DPARQUET_BUILD_EXECUTABLES=OFF \
   -DPARQUET_REQUIRE_ENCRYPTION=OFF \
   -Dre2_SOURCE=BUNDLED \
+  -DXCODE_VERSION= \
   -GNinja \
   ${arrow_dir}/cpp
 cmake --build . --target install

@kou
Copy link
Member

kou commented Aug 17, 2023

https://gitlab.kitware.com/cmake/cmake/-/issues/25181#note_1401407

I managed to wrap up that work quickly. I've released 3.27.3. It should be announced later today.

Homebrew/homebrew-core#139719

We may not need a workaround.

@raulcd
Copy link
Member Author

raulcd commented Aug 17, 2023

Duplicated of #37159.

Thanks @kou , I missed the original issue. I am closing as duplicate but as suggested this is already fixed upstream.

@raulcd raulcd closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants