Building sage-9.0 fails on Cygwin64 with fflas-ffpack errors

53 views
Skip to first unread message

Darij Grinberg

unread,
Jan 3, 2020, 11:13:22 AM1/3/20
to sage-devel
From the end of install.log:

build/temp.cygwin-3.0.7-x86_64-3.7/build/cythonized/sage/matrix/matrix_modn_sparse.o: In function `FFPACK::rns_double::reduce(unsigned long, double*, unsigned long, bool) const':
[sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/field/rns-double.inl:530: undefined reference to `omp_get_num_threads'
[sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/field/rns-double.inl:533: undefined reference to `GOMP_parallel'
[sagelib-9.0] build/temp.cygwin-3.0.7-x86_64-3.7/build/cythonized/sage/matrix/matrix_modn_sparse.o: In function `FFPACK::rns_double::init(unsigned long, unsigned long, double*, unsigned long, Givaro::Integer const*, unsigned long, unsigned long, bool) const':
[sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/paladin/blockcuts.inl:67: undefined reference to `omp_get_num_threads'
[sagelib-9.0] collect2: error: ld returned 1 exit status
[sagelib-9.0] error: command 'g++' failed with exit status 1
[sagelib-9.0] make[4]: *** [Makefile:33: sage] Error 1
[sagelib-9.0] make[4]: Leaving directory '/home/skraeling/sage/src'

This happens reproducibly both with "make" and with "make install", after the sagelib modules compile. There are further "undefined reference" messages all the way during the sagelib compilation process.

Any ideas?

Best regards & happy almost-new year,
Darij

Darij Grinberg

unread,
Jan 5, 2020, 12:22:13 PM1/5/20
to sage-...@googlegroups.com
Aha. The build failure was caused by
https://trac.sagemath.org/ticket/27444 , exactly as embray's
comment:34 suggested. Undoing the 1-line change from that branch to
build/pkgs/fflas_ffpack/spkg-install and recompiling fflas_ffpack
(sage -f fflas_ffpack) got me through that point. Hope the rest of the
build goes smoothly... --Darij
> --
> You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/O06i87XYpz8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e3b50139-609f-4a06-bed5-2bc65ed89b35%40googlegroups.com.

E. Madison Bray

unread,
Jan 6, 2020, 9:06:27 AM1/6/20
to sage-devel
On Sun, Jan 5, 2020 at 6:22 PM Darij Grinberg <darijg...@gmail.com> wrote:
>
> Aha. The build failure was caused by
> https://trac.sagemath.org/ticket/27444 , exactly as embray's
> comment:34 suggested. Undoing the 1-line change from that branch to
> build/pkgs/fflas_ffpack/spkg-install and recompiling fflas_ffpack
> (sage -f fflas_ffpack) got me through that point. Hope the rest of the
> build goes smoothly... --Darij

Yep. You can also get around it without modifying *any* files by
building Sage with:

FFLAS_FFPACK_CONFIGURE=--disable-openmp

I do think someone should look into this more. I don't know exactly
why it happens: Why does fflas-ffpack try to build with OpenMP support
if OpenMP support isn't actually working in the first place? Does it
not check? Furthermore, it would be nice to see if you *can* get it
working with OMP on Cygwin; I just haven't tried using OMP on Cygwin
yet, though I believe it can work...


> On Fri, Jan 3, 2020 at 5:13 PM Darij Grinberg <darijg...@gmail.com> wrote:
> >
> > From the end of install.log:
> >
> > build/temp.cygwin-3.0.7-x86_64-3.7/build/cythonized/sage/matrix/matrix_modn_sparse.o: In function `FFPACK::rns_double::reduce(unsigned long, double*, unsigned long, bool) const':
> > [sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/field/rns-double.inl:530: undefined reference to `omp_get_num_threads'
> > [sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/field/rns-double.inl:533: undefined reference to `GOMP_parallel'
> > [sagelib-9.0] build/temp.cygwin-3.0.7-x86_64-3.7/build/cythonized/sage/matrix/matrix_modn_sparse.o: In function `FFPACK::rns_double::init(unsigned long, unsigned long, double*, unsigned long, Givaro::Integer const*, unsigned long, unsigned long, bool) const':
> > [sagelib-9.0] /home/skraeling/sage/local/include/fflas-ffpack/paladin/blockcuts.inl:67: undefined reference to `omp_get_num_threads'
> > [sagelib-9.0] collect2: error: ld returned 1 exit status
> > [sagelib-9.0] error: command 'g++' failed with exit status 1
> > [sagelib-9.0] make[4]: *** [Makefile:33: sage] Error 1
> > [sagelib-9.0] make[4]: Leaving directory '/home/skraeling/sage/src'
> >
> > This happens reproducibly both with "make" and with "make install", after the sagelib modules compile. There are further "undefined reference" messages all the way during the sagelib compilation process.
> >
> > Any ideas?
> >
> > Best regards & happy almost-new year,
> > Darij
> >
> > --
> > You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
> > To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/O06i87XYpz8/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e3b50139-609f-4a06-bed5-2bc65ed89b35%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAN3jM_nWAK7Ccb3bVR-xWpOZ6A_TcL8tsz1r0Zzx7y%2BA0VH2hQ%40mail.gmail.com.

Darij Grinberg

unread,
Jan 6, 2020, 9:08:43 AM1/6/20
to sage-...@googlegroups.com
On Mon, Jan 6, 2020 at 3:06 PM E. Madison Bray <erik....@gmail.com> wrote:
> Yep. You can also get around it without modifying *any* files by
> building Sage with:
>
> FFLAS_FFPACK_CONFIGURE=--disable-openmp

Thanks; this removes the need to mess with the repository.

> I do think someone should look into this more. I don't know exactly
> why it happens: Why does fflas-ffpack try to build with OpenMP support
> if OpenMP support isn't actually working in the first place? Does it
> not check? Furthermore, it would be nice to see if you *can* get it
> working with OMP on Cygwin; I just haven't tried using OMP on Cygwin
> yet, though I believe it can work...

Afraid I won't be of much use with this... (Quite possibly my Cygwin
isn't very up-to-date either.)

Best regards,
Darij
Reply all
Reply to author
Forward
0 new messages