Build failure with v2.23.0
-- The C compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
flint2 found in /usr/lib64/libflint.so
mpfr found in /usr/lib64/libmpfr.so
mpir found in /usr/lib64/libgmp.so
flint/flint.h found in /usr/include
mpfr.h found in /usr/include
gmp.h found in /usr/include
-- <<< Gentoo configuration >>>
Build type Release
Install path /usr
Compiler flags:
C -O2 -pipe -march=native
C++
Linker flags:
Executable -Wl,-O1 -Wl,--as-needed
Module -Wl,-O1 -Wl,--as-needed
Shared -Wl,-O1 -Wl,--as-needed
-- Configuring done
-- Generating done
...
FAILED: CMakeFiles/arb.dir/acb_calc/integrate_gl_auto_deg.c.o
/usr/bin/x86_64-pc-linux-gnu-gcc -DARB_BUILD_DLL -Darb_EXPORTS -I/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0 -O2 -pipe -march=native -fPIC -MD -MT CMakeFiles/arb.dir/acb_calc/integrate_gl_auto_deg.c.o -MF CMakeFiles/arb.dir/acb_calc/integrate_gl_auto_deg.c.o.d -o CMakeFiles/arb.dir/acb_calc/integrate_gl_auto_deg.c.o -c /var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c: In function 'acb_calc_gl_node':
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:119:9: warning: implicit declaration of function 'flint_parallel_do' [-Wimplicit-function-declaration]
119 | flint_parallel_do((do_func_t) nodes_worker, &work, (n + 1) / 2, -1, FLINT_PARALLEL_STRIDED);
| ^~~~~~~~~~~~~~~~~
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:119:28: error: 'do_func_t' undeclared (first use in this function)
119 | flint_parallel_do((do_func_t) nodes_worker, &work, (n + 1) / 2, -1, FLINT_PARALLEL_STRIDED);
| ^~~~~~~~~
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:119:28: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:119:38: error: expected ')' before 'nodes_worker'
119 | flint_parallel_do((do_func_t) nodes_worker, &work, (n + 1) / 2, -1, FLINT_PARALLEL_STRIDED);
| ~ ^~~~~~~~~~~~~
| )
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c: In function 'acb_calc_integrate_gl_auto_deg':
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:369:32: error: 'do_func_t' undeclared (first use in this function)
369 | flint_parallel_do((do_func_t) gl_worker, &work, best_n, -1, FLINT_PARALLEL_STRIDED);
| ^~~~~~~~~
/var/tmp/portage/sci-mathematics/arb-2.23.0/work/arb-2.23.0/acb_calc/integrate_gl_auto_deg.c:369:42: error: expected ')' before 'gl_worker'
369 | flint_parallel_do((do_func_t) gl_worker, &work, best_n, -1, FLINT_PARALLEL_STRIDED);
| ~ ^~~~~~~~~~
| )
ninja: build stopped: subcommand failed.
I suppose the documentation needs to be updated to state that FLINT 2.9 or later is required.
I suppose the documentation needs to be updated to state that FLINT 2.9 or later is required.
I think a check in arb.h or something more low-level would be more fitting:
#if __FLINT_VERSION < 2 || (__FLINT_VERSION == 2 && __FLINT_VERSION_MINOR < 9)
# error My error message
#endif
Oh, if that's all this is, then I would suggest checking for it even earlier in CMake. It looks like the fmpz_mod_poly_div function is new to flint-2.9, so you could look for that function with e.g. check_symbol_exists.
I suppose the documentation needs to be updated to state that FLINT 2.9 or later is required.
Lol... I hit an error building 2.9.0 that is supposed to be fixed in 2.9.1 and just downloaded 2.8.5 and then hit this, Docs for the win! (the docs do say a recent version or something like that, I did see that, but figured, 1 back was recent enough... lol) and somewhere else... Flint 2.5.... i'll see if I can find it.