Skip to content

Conversation

@cxzhong
Copy link
Contributor

@cxzhong cxzhong commented Sep 8, 2025

Uninstall cmake before installing dependencies. fix an error in https://github.com/sagemath/sage/actions/runs/17527169455/job/49779204903

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

actions/runner-images#12912

Uninstall cmake before installing dependencies.
@cxzhong cxzhong changed the title Uninstall cmake before installing fix an error in macos ci Sep 8, 2025
@cxzhong
Copy link
Contributor Author

cxzhong commented Sep 8, 2025

And you can see this issue actions/runner-images#12912

@cxzhong cxzhong marked this pull request as ready for review September 8, 2025 05:49
Copilot AI review requested due to automatic review settings September 8, 2025 05:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a macOS CI error by adding a command to uninstall cmake before installing dependencies. The change addresses a specific CI failure where conflicting cmake installations were causing build issues.

  • Adds a forced uninstall of cmake before dependency installation in the macOS CI workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Thanks.

Could you please add a short comment linking the above gh issue? Feel free to set to positive review after the CI is green.

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

Documentation preview for this PR (built with commit 244d0e1; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@cxzhong
Copy link
Contributor Author

cxzhong commented Sep 8, 2025

@tobiasdiez
Copy link
Contributor

Okay, but it's failing at a later point - so this is already a nice improvement.

For reference:

[sagelib-10.8.beta2]   [spkg-install]   FAILED: [code=1] src/sage/libs/eclib/mwrank.cpython-312-darwin.so
  [sagelib-10.8.beta2]   [spkg-install]   g++ -std=gnu++11 -std=gnu++11  -o src/sage/libs/eclib/mwrank.cpython-312-darwin.so src/sage/libs/eclib/mwrank.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mwrank.pyx.cpp.o -L/Users/runner/work/sage/sage/local/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,dynamic_lookup -bundle -Wl,-undefined,dynamic_lookup -Wl,-ld_classic -g -O2 -Wl,-rpath,@loader_path/../../../../../../local/lib -Wl,-rpath,/usr/local/Cellar/flint/3.3.1/lib -Wl,-rpath,/usr/local/Cellar/mpfr/4.2.2/lib -Wl,-rpath,/usr/local/Cellar/gmp/6.3.0/lib /Users/runner/work/sage/sage/local/lib/libec.dylib -lecl /usr/local/Cellar/flint/3.3.1/lib/libflint.dylib /usr/local/Cellar/mpfr/4.2.2/lib/libmpfr.dylib /usr/local/Cellar/gmp/6.3.0/lib/libgmp.dylib
  [sagelib-10.8.beta2]   [spkg-install]   ld: illegal thread local variable reference to regular symbol __ZN3NTL2RR4precE for architecture x86_64
  [sagelib-10.8.beta2]   [spkg-install]   clang: error: linker command failed with exit code 1 (use -v to see invocation)

https://github.com/sagemath/sage/actions/runs/17540857013/job/49812147119#step:6:59711

- name: Build
run: |
source ./.homebrew-build-env
export CXXFLAGS="-DNTL_THREADS=0 -fno-threadsafe-statics $CXXFLAGS"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really needed, or was this a result of you trying to fix the build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I want to fix it, but it seems useless

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, then I would propose you remove this change here again, add a short comment to actions/runner-images#12912 and then we merge this, leaving the real build errors for another PR.

@cxzhong cxzhong requested a review from tobiasdiez September 9, 2025 06:14
@cxzhong
Copy link
Contributor Author

cxzhong commented Sep 12, 2025

Okay, but it's failing at a later point - so this is already a nice improvement.

For reference:

[sagelib-10.8.beta2]   [spkg-install]   FAILED: [code=1] src/sage/libs/eclib/mwrank.cpython-312-darwin.so
  [sagelib-10.8.beta2]   [spkg-install]   g++ -std=gnu++11 -std=gnu++11  -o src/sage/libs/eclib/mwrank.cpython-312-darwin.so src/sage/libs/eclib/mwrank.cpython-312-darwin.so.p/meson-generated_src_sage_libs_eclib_mwrank.pyx.cpp.o -L/Users/runner/work/sage/sage/local/lib -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,dynamic_lookup -bundle -Wl,-undefined,dynamic_lookup -Wl,-ld_classic -g -O2 -Wl,-rpath,@loader_path/../../../../../../local/lib -Wl,-rpath,/usr/local/Cellar/flint/3.3.1/lib -Wl,-rpath,/usr/local/Cellar/mpfr/4.2.2/lib -Wl,-rpath,/usr/local/Cellar/gmp/6.3.0/lib /Users/runner/work/sage/sage/local/lib/libec.dylib -lecl /usr/local/Cellar/flint/3.3.1/lib/libflint.dylib /usr/local/Cellar/mpfr/4.2.2/lib/libmpfr.dylib /usr/local/Cellar/gmp/6.3.0/lib/libgmp.dylib
  [sagelib-10.8.beta2]   [spkg-install]   ld: illegal thread local variable reference to regular symbol __ZN3NTL2RR4precE for architecture x86_64
  [sagelib-10.8.beta2]   [spkg-install]   clang: error: linker command failed with exit code 1 (use -v to see invocation)

https://github.com/sagemath/sage/actions/runs/17540857013/job/49812147119#step:6:59711

The root cause has been fixed now. Can you test it? @tobiasdiez

@vbraun vbraun merged commit 3ac59e0 into sagemath:develop Sep 14, 2025
22 of 28 checks passed
@cxzhong cxzhong deleted the fix-macos-workflow branch September 28, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants