diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14ed18ffc1c..e8c0955835a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,8 @@ jobs: - debian:forky - ghcr.io/void-linux/void-glibc-full - archlinux - #- ubuntu:22.04 - fails due to issue with cypari2 - #- ubuntu:24.04 - fails due to issue with cypari2 + #- ubuntu:22.04 - gap is outdated there (only 4.11) + - ubuntu:24.04 - ubuntu:25.04 container: image: ${{ matrix.container }} @@ -46,6 +46,10 @@ jobs: # but we need the maxima help to be in place sed -i '/^NoExtract/d' /etc/pacman.conf fi + if [ "${{ matrix.container }}" = "ubuntu:22.04" ]; then + apt-get update + apt-get install -y git + fi - name: Checkout code # cannot use v4 yet because of https://github.com/actions/checkout/issues/1487 diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 054122ab234..13bafa22dc0 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -153,7 +153,7 @@ case $system:$command in fi ;; @(fedora*|redhat*|centos*):install) - [ "$YES" = yes ] && options="$options -y" + [ "$YES" = yes ] && options="$options -y --allowerasing" [ "$IGNORE_MISSING" = yes ] && options="$options --skip-unavailable" [ -n "$system_packages" ] && print_shell_command ${SUDO}dnf install $options $system_packages ;; diff --git a/meson.build b/meson.build index 7f5f0acf9c6..720991a331e 100755 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project( version: files('VERSION.txt'), license: 'GPL v3', default_options: ['c_std=c17', 'cpp_std=c++17', 'python.install_env=auto'], - meson_version: '>=1.2', + meson_version: '>=1.5', ) # Python module diff --git a/src/meson.build b/src/meson.build index 920a37dc1f7..526dd59df55 100644 --- a/src/meson.build +++ b/src/meson.build @@ -87,6 +87,32 @@ except Exception: endif # Cannot be found via pkg-config pari = cc.find_library('pari', required: not is_windows, disabler: true) +if pari.found() and not meson.is_cross_build() + # Verify PARI version + pari_version_code = ''' + #include + #include + int main(void) { + pari_init(1000000, 2); + GEN v = pari_version(), M = gel(v,1), m = gel(v,2), p = gel(v,3); + printf("%ld.%ld.%ld", itos(M), itos(m), itos(p)); + pari_close(); + return 0; + } + ''' + pari_version = cc.run( + pari_version_code, + args: ['-v'], + name: 'pari version', + dependencies: [pari], + required: true, + ).stdout().strip() + if pari_version.version_compare('<=2.17.0') + message('PARI version > 2.17.0 required, found ' + pari_version) + pari = disabler() + endif +endif + mpfr = dependency('mpfr') diff --git a/subprojects/flint.wrap b/subprojects/flint.wrap index b2aa8b8aee6..e85ef64b7ef 100644 --- a/subprojects/flint.wrap +++ b/subprojects/flint.wrap @@ -3,6 +3,8 @@ url = https://github.com/flintlib/flint.git revision = main depth = 1 patch_directory = flint +diff_files = flint/cmakelinux.patch +method = cmake [provide] -dependency_names = flint +flint = flint_dep diff --git a/subprojects/packagefiles/flint/cmakelinux.patch b/subprojects/packagefiles/flint/cmakelinux.patch new file mode 100644 index 00000000000..32244e3bb94 --- /dev/null +++ b/subprojects/packagefiles/flint/cmakelinux.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d959fb..5dcbf6e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,10 +12,6 @@ + + cmake_minimum_required(VERSION 3.22) + +-if(NOT WIN32) +- message(FATAL_ERROR "Detected system is not Windows. Please use the Autotools configuration along with the Makefile instead as it is more up-to-date. Read INSTALL.md.") +-endif() +- + include(CheckCCompilerFlag) + include(CheckCSourceRuns) + include(CheckIPOSupported)