Error compiling stable branch of arb

56 views
Skip to first unread message

Oren Bassik

unread,
May 25, 2022, 3:32:43 PM5/25/22
to flint-devel
Hello,
I got the below error compiling arb, after a fresh and successful install of FLINT (both latest main branches from Github.)

I am on ubuntu linux, on windows via WSL-2.

I searched both ARB and FLINT source and could not find a typedef for "bsplit_basecase_func_t".

My sincerest apologies if this is the wrong list, or if I have made an obvious user error. Thanks.


Error:
const_euler.c: In function ‘euler_bsplit_1’:
const_euler.c:152:5: warning: implicit declaration of function ‘flint_parallel_binary_splitting’ [-Wimplicit-function-declaration]
  152 |     flint_parallel_binary_splitting(s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const_euler.c:153:10: error: ‘bsplit_basecase_func_t’ undeclared (first use in this function)
  153 |         (bsplit_basecase_func_t) euler_bsplit_1_basecase,
      |          ^~~~~~~~~~~~~~~~~~~~~~
const_euler.c:153:10: note: each undeclared identifier is reported only once for each function it appears in
const_euler.c:153:33: error: expected ‘)’ before ‘euler_bsplit_1_basecase’
  153 |         (bsplit_basecase_func_t) euler_bsplit_1_basecase,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                 )
const_euler.c:145:19: warning: variable ‘args’ set but not used [-Wunused-but-set-variable]
  145 |     bsplit_args_t args;
      |                   ^~~~
const_euler.c: In function ‘euler_bsplit_2’:
const_euler.c:282:10: error: ‘bsplit_basecase_func_t’ undeclared (first use in this function)
  282 |         (bsplit_basecase_func_t) euler_bsplit_2_basecase,
      |          ^~~~~~~~~~~~~~~~~~~~~~
const_euler.c:282:33: error: expected ‘)’ before ‘euler_bsplit_2_basecase’
  282 |         (bsplit_basecase_func_t) euler_bsplit_2_basecase,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                 )
const_euler.c:270:19: warning: variable ‘args’ set but not used [-Wunused-but-set-variable]
  270 |     bsplit_args_t args;
      |                   ^~~~
At top level:
const_euler.c:217:1: warning: ‘euler_bsplit_2_basecase’ defined but not used [-Wunused-function]
  217 | euler_bsplit_2_basecase(euler_bsplit_2_t s, slong n1, slong n2, bsplit_args_t * args)
      | ^~~~~~~~~~~~~~~~~~~~~~~
const_euler.c:109:1: warning: ‘euler_bsplit_1_basecase’ defined but not used [-Wunused-function]
  109 | euler_bsplit_1_basecase(euler_bsplit_1_t s, slong n1, slong n2, bsplit_args_t * args)


Stephen Crowley

unread,
May 26, 2022, 5:25:12 PM5/26/22
to flint-devel
You are not on Linux, you are on some bastardized poor approximation of it that microsloth has obfuscated to make people think they are suddenly getting a high quality operating system when really its just a crappy linux clone.
My suggestion would be to run a real linux distribution where it compiles just fine

Albin Ahlbäck

unread,
May 26, 2022, 6:03:48 PM5/26/22
to flint-devel

Hello,

I'm sorry for the harsh reply.

Have you tried pulling the latest commits from FLINT? I think the problem lies in that Arb has newer commits than FLINT. Fredrik made some commits a couple of days ago with newer threading functions.

Let us know if the problem remains after this.

Best,
Albin

Stephen Crowley

unread,
May 26, 2022, 7:44:27 PM5/26/22
to flint...@googlegroups.com

I'm an idiot, is that the thing that does windows api emulation in linux? I'll take a look and see if i can reproduce the issue


Found the right side of the bed,

Stephen

--

---
You received this message because you are subscribed to a topic in the Google Groups "flint-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flint-devel/LkFGX0QwQ8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flint-devel...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/flint-devel/1ddcfb9d-5348-4bb3-b2fe-5128ffe375e4n%40googlegroups.com.

Stephen Crowley

unread,
May 28, 2022, 4:24:42 PM5/28/22
to flint-devel
I successfully built the latest arb with the latest flint, I did get the following warning though

gauss_period_minpoly.c:24:13: warning: implicit declaration of function 'n_gcd_full' is invalid in C99 [-Wimplicit-function-declaration]
            n_gcd_full(n, (q - 1) / n) != 1)
dpkg-shlibdeps: warning: symbol n_gcd_full used by debian/libflint-arb2/usr/lib/x86_64-linux-gnu/libflint-arb.so.2.13.1 found in none of the libraries

Oren Bassik

unread,
Jun 1, 2022, 3:32:48 AM6/1/22
to flint-devel
This is resolved - I took FLINT from fredrik-johansson, initially, but taking from wbhart/flint2 eliminated the compile error. 

If it is of interest to anyone, "make check" failed with the below error.  However, I was able to install both libraries and my user-land program (which uses ARB polynomials) seems to be working fine.  Thanks for the help.

    CXX   ../build/flintxx/test/t-arithxx
In file included from test/t-arithxx.cpp:16:
test/t-arithxx.cpp: In function ‘void test_bell()’:
test/t-arithxx.cpp:58:33: error: ‘bell_number_bsplit’ was not declared in this scope; did you mean ‘bell_number_tab’?
   58 |     tassert(bell_number(10u) == bell_number_bsplit(10u));
      |                                 ^~~~~~~~~~~~~~~~~~
test/helpers.h:29:11: note: in definition of macro ‘tassert’
   29 |     if (!(expr)) \
      |           ^~~~
test/t-arithxx.cpp: In function ‘void test_multiplicative()’:
test/t-arithxx.cpp:134:32: error: no matching function for call to ‘divisor_sigma(flint::fmpzxx&, unsigned int)’
  134 |     tassert(divisor_sigma(p, 4u) == 1u + p.pow(4u));
      |                                ^
test/helpers.h:29:11: note: in definition of macro ‘tassert’
   29 |     if (!(expr)) \
      |           ^~~~
In file included from /home/orebas/learning/flint2/fmpqxx.h:19,
                 from /home/orebas/learning/flint2/fmpq_polyxx.h:21,
                 from /home/orebas/learning/flint2/arithxx.h:17,
                 from test/t-arithxx.cpp:14:
/home/orebas/learning/flint2/arithxx.h:258:22: note: candidate: ‘template<class T1, class T2> typename flint::detail::binary_op_helper<T1, flint::operations::divisor_sigma_op, T2>::enable::type flint::divisor_sigma(const T1&, const T2&)’
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      |                      ^~~~~~~~~~~~~
/home/orebas/learning/flint2/flintxx/expression.h:782:1: note: in definition of macro ‘FLINT_DEFINE_BINOP_HERE’
  782 | name(const T1& t1, const T2& t2) \
      | ^~~~
/home/orebas/learning/flint2/arithxx.h:64:1: note: in expansion of macro ‘FLINT_DEFINE_BINOP’
   64 | FLINT_DEFINE_BINOP(name) \
      | ^~~~~~~~~~~~~~~~~~
/home/orebas/learning/flint2/arithxx.h:258:1: note: in expansion of macro ‘ARITHXX_DEFINE_BINOP’
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      | ^~~~~~~~~~~~~~~~~~~~
/home/orebas/learning/flint2/arithxx.h:258:22: note:   template argument deduction/substitution failed:
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      |                      ^~~~~~~~~~~~~
/home/orebas/learning/flint2/flintxx/expression.h:782:1: note: in definition of macro ‘FLINT_DEFINE_BINOP_HERE’
  782 | name(const T1& t1, const T2& t2) \
      | ^~~~
/home/orebas/learning/flint2/arithxx.h:64:1: note: in expansion of macro ‘FLINT_DEFINE_BINOP’
   64 | FLINT_DEFINE_BINOP(name) \
      | ^~~~~~~~~~~~~~~~~~
/home/orebas/learning/flint2/arithxx.h:258:1: note: in expansion of macro ‘ARITHXX_DEFINE_BINOP’
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      | ^~~~~~~~~~~~~~~~~~~~
/home/orebas/learning/flint2/arithxx.h: In substitution of ‘template<class T1, class T2> typename flint::detail::binary_op_helper<T1, flint::operations::divisor_sigma_op, T2>::enable::type flint::divisor_sigma(const T1&, const T2&) [with T1 = flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>; T2 = unsigned int]’:
test/t-arithxx.cpp:134:5:   required from here
/home/orebas/learning/flint2/arithxx.h:258:22: error: no type named ‘type’ in ‘flint::detail::nary_op_helper<flint::operations::divisor_sigma_op, flint::tuple<const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>&, flint::tuple<unsigned int, flint::empty_tuple> > >::enable’ {aka ‘struct flint::mp::enable_if<flint::traits::is_implemented<flint::rules::UNIMPLEMENTED>, flint::detail::nary_op_helper_step2<flint::rules::UNIMPLEMENTED, flint::operations::divisor_sigma_op, flint::tuple<const flint::fmpzxx_expression<flint::operations::immediate, flint::detail::fmpz_data>&, flint::tuple<unsigned int, flint::empty_tuple> > >::return_t>’}
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      |                      ^~~~~~~~~~~~~
/home/orebas/learning/flint2/flintxx/expression.h:782:1: note: in definition of macro ‘FLINT_DEFINE_BINOP_HERE’
  782 | name(const T1& t1, const T2& t2) \
      | ^~~~
/home/orebas/learning/flint2/arithxx.h:64:1: note: in expansion of macro ‘FLINT_DEFINE_BINOP’
   64 | FLINT_DEFINE_BINOP(name) \
      | ^~~~~~~~~~~~~~~~~~
/home/orebas/learning/flint2/arithxx.h:258:1: note: in expansion of macro ‘ARITHXX_DEFINE_BINOP’
  258 | ARITHXX_DEFINE_BINOP(divisor_sigma, fmpzxx, at::ulong, FMPZXX_COND_S)
      | ^~~~~~~~~~~~~~~~~~~~
make[1]: *** [../Makefile.subdirs:104: ../build/flintxx/test/t-arithxx] Error 1
make[1]: Leaving directory '/home/orebas/learning/flint2/flintxx'
make: *** [Makefile:223: check] Error 2

Fredrik Johansson

unread,
Jun 1, 2022, 3:37:11 AM6/1/22
to flint-devel
Yeah, that would explain it. We will soon make my repo the official one for development, but right now it's sometimes a few versions behind. Sorry for the trouble.

Fredrik
Reply all
Reply to author
Forward
0 new messages