sagemath 9.5beta9 fails to compile on opensuse tumbleweed

150 views
Skip to first unread message

Florian Hanisch

unread,
Dec 27, 2021, 5:41:22 AM12/27/21
to sage-devel
Hi,

I have tried to compile sagemath 9.5beta9 on opensuse tumbleweed (running on a DELL XPS 15, core i7, 16G RAM) but failed. I have been running

./configure --without-system-givaro
MAKE='make -j6' make

Without the extra option "--without-system-givaro", linbox does not build and the whole process quickly terminates. I also tried compiling using gcc10 provided by my system but this did not resolve the issue.

config.log is attached, install.log (approx 18MB) can be found here:

https://baernextcloud.math.uni-potsdam.de/index.php/s/SJ9RRBxF6grrMoH

I could not figure out what actually caused the problem, the end of install.log reads

  [scipy-1.7.2] Successfully installed scipy-1.7.2
  [scipy-1.7.2] Deleting temporary build directory
  [scipy-1.7.2] /home/fhanisch/programs/sage/sage-9.5.beta9/local/var/lib/sage/venv-python3.8/var/tmp/sage/build/scipy-1.7.2
  [scipy-1.7.2] Finished installing scipy-1.7.2
  make[2]: *** [Makefile:2389: all-start] Error 2
  make[2]: Leaving directory '/home/fhanisch/programs/sage/sage-9.5.beta9/build/make'

  real        47m33.472s
  user        287m2.665s
  sys        14m7.144s
  ***************************************************************
  Error building Sage.

  The following package(s) may have failed to build (not necessarily
  during this run of 'make all-start'):

  It is safe to delete ...

I hope that this googlegroup is the correct place to post the problem, sorry for spamming if not. I am trying to compile the beta version of sagemath 9.5 because compiling stable release 9.4 or lower failed, too. I believe this is (at least partly) due to the "glibc >= 2.34" issue described in https://wiki.sagemath.org/ReleaseTours/sage-9.4, so I followed the recommendation mentioned there and went for 9.5beta9.

Thanks a lot for any suggestions, best wishes

Florian
config.log

Dima Pasechnik

unread,
Dec 27, 2021, 5:51:24 AM12/27/21
to sage-devel
On Mon, Dec 27, 2021 at 10:41 AM 'Florian Hanisch' via sage-devel
<sage-...@googlegroups.com> wrote:
>
> Hi,
>
> I have tried to compile sagemath 9.5beta9 on opensuse tumbleweed (running on a DELL XPS 15, core i7, 16G RAM) but failed. I have been running
>
> ./configure --without-system-givaro
> MAKE='make -j6' make
>
> Without the extra option "--without-system-givaro", linbox does not build and the whole process quickly terminates. I also tried compiling using gcc10 provided by my system but this did not resolve the issue.
>
> config.log is attached, install.log (approx 18MB) can be found here:
>
> https://baernextcloud.math.uni-potsdam.de/index.php/s/SJ9RRBxF6grrMoH
>
> I could not figure out what actually caused the problem, the end of install.log reads
>
> [scipy-1.7.2] Successfully installed scipy-1.7.2
> [scipy-1.7.2] Deleting temporary build directory
> [scipy-1.7.2] /home/fhanisch/programs/sage/sage-9.5.beta9/local/var/lib/sage/venv-python3.8/var/tmp/sage/build/scipy-1.7.2
> [scipy-1.7.2] Finished installing scipy-1.7.2
> make[2]: *** [Makefile:2389: all-start] Error 2
> make[2]: Leaving directory '/home/fhanisch/programs/sage/sage-9.5.beta9/build/make'
>
> real 47m33.472s
> user 287m2.665s
> sys 14m7.144s
> ***************************************************************
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
>
probably the error is in building sagelib.
Look in logs/pkgs/sagelib-9.5.beta9.log

(you can also remove install.log and run make again, it will try (and
most probably fail) at the point it failed the previous time)



> It is safe to delete ...
>
> I hope that this googlegroup is the correct place to post the problem, sorry for spamming if not. I am trying to compile the beta version of sagemath 9.5 because compiling stable release 9.4 or lower failed, too. I believe this is (at least partly) due to the "glibc >= 2.34" issue described in https://wiki.sagemath.org/ReleaseTours/sage-9.4, so I followed the recommendation mentioned there and went for 9.5beta9.
>
> Thanks a lot for any suggestions, best wishes
>
> Florian
>
> --
> 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/229a6f65-32f0-4899-8aa7-c6d7165c92aan%40googlegroups.com.

Florian Hanisch

unread,
Dec 27, 2021, 7:41:11 AM12/27/21
to sage-devel
> probably the error is in building sagelib. 
> Look in logs/pkgs/sagelib-9.5.beta9.log

Thanks a lot, this log file indeed ends on an error message (still have to figure out what exactly went wrong here):

error: Command "gcc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -g -O2 -fPIC -I./sage/ext -I./sage/cpython -I./sage/rings/finite_rings -I/home/fhanisch/programs/sage/sage-9.5.beta9/local/var/lib/sage/venv-python3.8/lib64/python3.8/site-packages/cysignals -I./sage/libs/flint -Isage/cpython -I/home/fhanisch/programs/sage/sage-9.5.beta9/pkgs/sagemath-standard -I/usr/include/python3.8 -I/home/fhanisch/programs/sage/sage-9.5.beta9/local/var/lib/sage/venv-python3.8/lib64/python3.8/site-packages/numpy/core/include -Ibuild/cythonized -I/home/fhanisch/programs/sage/sage-9.5.beta9/local/var/lib/sage/venv-python3.8/include -I/usr/include/python3.8 -c build/cythonized/sage/matrix/matrix_modn_dense_float.cpp -o build/temp.linux-x86_64-3.8/build/cythonized/sage/matrix/matrix_modn_dense_float.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -O2 -Wall -g -DNDEBUG -U_LB_DEBUG -DDISABLE_COMMENTATOR -fopenmp -DFFLAS_COMPILED -DFFPACK_COMPILED -fabi-version=6 -std=gnu++11" failed with exit status 1

The log file moreover contains the following  (not critical ?) error message at several places:

/home/fhanisch/programs/sage/sage-9.5.beta9/local/include/fflas-ffpack/fflas/fflas_level3.inl:498:5: error: no return statement in function returning non-void [-Werror=return-type]
  498 |     }
      |     ^


Dima Pasechnik

unread,
Dec 27, 2021, 8:01:38 AM12/27/21
to sage-devel
Your compiler settings are stricter that usual.

Try

CXXFLAGS="$CXXFLAGS -Wno-error=return-type" CFLAGS=$CFLAGS
-Wno-error=return-type" make build

On Mon, Dec 27, 2021 at 12:41 PM 'Florian Hanisch' via sage-devel
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b6c83d05-3ef7-4e39-8818-3a070035f6d8n%40googlegroups.com.

Matthias Koeppe

unread,
Dec 27, 2021, 11:50:36 AM12/27/21
to sage-devel
These flags likely come in through the sysconfig of the system python. Check "python3 -m sysconfig | grep CFLAGS"

Florian Hanisch

unread,
Dec 28, 2021, 8:32:51 AM12/28/21
to sage-...@googlegroups.com

On 27/12/2021 17:50, Matthias Koeppe wrote:

These flags likely come in through the sysconfig of the system python. Check "python3 -m sysconfig | grep CFLAGS"
Thanks, these flags are introduced by the system python, yes. I need to take a closer look at sysconfig and adjust it.



On Monday, December 27, 2021 at 5:01:38 AM UTC-8 Dima Pasechnik wrote:
Your compiler settings are stricter that usual.

Try

CXXFLAGS="$CXXFLAGS -Wno-error=return-type" CFLAGS=$CFLAGS
-Wno-error=return-type" make build
I was following your suggestions. There was one interruption (sage-maxima.lisp not found while building the docs). After adding the file to /sage-9.5.beta9/local/var/lib/sage/venv-python3.8/lib64/python3.8/site-packages/sage/interfaces and restarting the process, it seemed that compiling was successful. Last output was


make[2]: Leaving directory '/home/fhanisch/programs/sage/sage-9.5.beta9/build/make'

real    42m51.576s
user    260m13.955s
sys    11m41.387s
Sage build/upgrade complete!

However, the process actually did not build working binaries, ./sage only yields an output of the form

**** It seems that you are attempting to run Sage from an unpacked source tarball ... ****

In particular, /logs/pkgs/sagelib-9.5.beta9.log does not indicate a sucessful build of sagelib. As far es I could see, the log does not include any serious error messages, there are some TypeErrors that do not interrupt the compiling process and I have no idea why it ultimately failed. Log files (install.log and sagelib-9.5beta9.log) can be found here:

https://baernextcloud.math.uni-potsdam.de/index.php/s/ofEF3YabEkFqZLL
https://baernextcloud.math.uni-potsdam.de/index.php/s/TgDdcmD24K8i3xT

Matthias Koeppe

unread,
Dec 28, 2021, 1:30:18 PM12/28/21
to sage-devel
On Tuesday, December 28, 2021 at 5:32:51 AM UTC-8 Florian Hanisch wrote:

 There was one interruption (sage-maxima.lisp not found while building the docs). After adding the file to /sage-9.5.beta9/local/var/lib/sage/venv-python3.8/lib64/python3.8/site-packages/sage/interfaces and restarting the process, it seemed that compiling was successful. [...]

However, the process actually did not build working binaries, ./sage only yields an output of the form

I think you are running here into https://trac.sagemath.org/ticket/32868, which needs review

 

Christian Bär

unread,
Jan 12, 2022, 4:18:41 AM1/12/22
to sage-devel
On recent opensuse tumbleweed 20220109 sagemath 9.5rc0 still does not compile. Tested on different hardware configurations. 

The install.log and all package log files which contain an error can be found here: https://baernextcloud.math.uni-potsdam.de/index.php/s/ofG2zfYXR3fkrLz

It looks like all packages including linbox compile fine but after

export MAKE="make -j24"   
./configure CC=gcc-10 CXX=g++-10 FC=gfortran-10
make

the compilation ends with 

Verzeichnis „/home/baer/Programme/Sage/sage-9.5.rc0/build/make“ wird verlassen

real    12m30,129s
user    146m4,540s
sys     7m49,795s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make[1]: *** [Makefile:39: all-start] Fehler 1
make[1]: Verzeichnis „/home/baer/Programme/Sage/sage-9.5.rc0“ wird verlassen
make: *** [Makefile:13: all] Fehler 2


Dima Pasechnik

unread,
Jan 12, 2022, 5:19:25 AM1/12/22
to sage-devel
On Wed, Jan 12, 2022 at 9:18 AM Christian Bär <bae...@gmail.com> wrote:
>
> On recent opensuse tumbleweed 20220109 sagemath 9.5rc0 still does not compile. Tested on different hardware configurations.
>
> The install.log and all package log files which contain an error can be found here: https://baernextcloud.math.uni-potsdam.de/index.php/s/ofG2zfYXR3fkrLz
>
> It looks like all packages including linbox compile fine but after
>
> export MAKE="make -j24"
> ./configure CC=gcc-10 CXX=g++-10 FC=gfortran-10
> make
>
> the compilation ends with
>
> Verzeichnis „/home/baer/Programme/Sage/sage-9.5.rc0/build/make“ wird verlassen
>
> real 12m30,129s
> user 146m4,540s
> sys 7m49,795s
> ***************************************************************
> Error building Sage.
>
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
>
> It is safe to delete any log files and build directories, but they
> contain information that is helpful for debugging build problems.
> WARNING: If you now run 'make' again, the build directory of the
> same version of the package will, by default, be deleted. Set the
> environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

the error is in building sagelib:

/home/baer/Programme/Sage/sage-9.5.rc0/local/include/fflas-ffpack/fflas/fflas_level3.inl:
In instantiation of ‘typename Field::Element_ptr FFLAS::pfgemm(const
Field&, FFLAS::FFLAS_TRANSPOSE, FFLAS::FFLAS_TRANSPOSE, size_t,
size_t, size_t, typename Field::Element, typename
Field::ConstElement_ptr, size_t, typename Field::ConstElement_ptr,
size_t, typename Field::Element, typename Field::Element_ptr, size_t,
size_t) [with Field = Givaro::Modular<double>; typename
Field::Element_ptr = double*; size_t = long unsigned int; typename
Field::Element = double; typename Field::ConstElement_ptr = const
double*]’:
build/cythonized/sage/matrix/matrix_modn_dense_double.cpp:6030:343:
required from here
/home/baer/Programme/Sage/sage-9.5.rc0/local/include/fflas-ffpack/fflas/fflas_level3.inl:498:5:
error: no return statement in function returning non-void
[-Werror=return-type]
498 | }
| ^


Basically, your C++ compiler is too strict.
On the other hand, updated code for this function does have a return
statement, see
https://github.com/linbox-team/fflas-ffpack/blob/v2.5.0/fflas-ffpack/fflas/fflas_level3.inl#L496

To begin with, you can try manually add the return as in the link
above, and see if it helps.
just running

make

afther this change.




>
> make[1]: *** [Makefile:39: all-start] Fehler 1
> make[1]: Verzeichnis „/home/baer/Programme/Sage/sage-9.5.rc0“ wird verlassen
> make: *** [Makefile:13: all] Fehler 2
>
>
> --
> 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/304ae393-b079-4fb2-b865-364e67628f13n%40googlegroups.com.

Michael Orlitzky

unread,
Jan 12, 2022, 8:18:20 AM1/12/22
to sage-...@googlegroups.com
On Wed, 2022-01-12 at 10:19 +0000, Dima Pasechnik wrote:
>
> Basically, your C++ compiler is too strict.

I think it's just the CFLAGS that are too strict:

error: Command "gcc-10 -Wno-unused-result -Wsign-compare -DNDEBUG
-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -Werror=return-type ...

If it wasn't added manually, that "-Werror=return-type" likely came
from some pkg-config file and was automatically appended to CFLAGS.
First I would try

export CFLAGS="${CFLAGS} -Wno-error=return-type"
./configure
make

to see if it can be overridden. But it would be nice to track down the
source of the -Werror so that it can be fixed for others.


Dima Pasechnik

unread,
Jan 12, 2022, 8:27:26 AM1/12/22
to sage-devel
I have found it - it's absense of return statement in an inline
function in an fflas-ffpack header,
see my message for details.

>
>
> --
> 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/da7d09b006332844b079f810fda46ed7f57770b2.camel%40orlitzky.com.

Michael Orlitzky

unread,
Jan 12, 2022, 8:35:07 AM1/12/22
to sage-...@googlegroups.com
On Wed, 2022-01-12 at 13:27 +0000, Dima Pasechnik wrote:
> > to see if it can be overridden. But it would be nice to track down the
> > source of the -Werror so that it can be fixed for others.
>
> I have found it - it's absense of return statement in an inline
> function in an fflas-ffpack header,
> see my message for details.
>
>

I mean, who adds the "-Werror=return-type" flag? That's bound to cause
other problems.


Dima Pasechnik

unread,
Jan 12, 2022, 8:48:04 AM1/12/22
to sage-devel
Could be compiler configuration on that particular system, or on that
particular OS, perhaps.

>
>
> --
> 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/ba8ae322834fff41b0f7a86a2f877e6947ecb214.camel%40orlitzky.com.

Matthias Koeppe

unread,
Jan 12, 2022, 11:39:33 AM1/12/22
to sage-devel
See https://groups.google.com/g/sage-devel/c/81unMG60MyU/m/iDXLIDc0EAAJ - this comes in through the sysconfig of opensuse's python3.

This should be reported as a bug to opensuse. 

Christian Bär

unread,
Jan 12, 2022, 12:20:55 PM1/12/22
to sage-devel
Indeed, adding the flag 
export CFLAGS="${CFLAGS} -Wno-error=return-type"
fixed the problem. Never had to do this in the past though.

Thanks a lot for the help!

Matthias Koeppe

unread,
Jan 12, 2022, 12:56:43 PM1/12/22
to sage-devel
I have opened https://trac.sagemath.org/ticket/33153 for this.
Reply all
Reply to author
Forward
0 new messages