Sage 9.0 build fails at the sagelib step
Hi,
I was hoping that someone would help me figure out why my build keeps failing. The last few lines before it failed was
[493/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/libs/pynac -I./sage/cpython -Isage/libs/pynac -Isage/cpython -I/opt/sage/local/lib/python3.7/site-packages/cysignals -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/expression.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/expression.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/expression.cpp:677:
/opt/sage/local/include/pynac/container.h: In member function :
/opt/sage/local/include/pynac/container.h:592:3: warning: this clause does not guard... [-Wmisleading-indentation]
592 | if (is_a<container<C> >(result))
| ^~
/opt/sage/local/include/pynac/container.h:595:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
595 | return result;
| ^~~~~~
/opt/sage/local/include/pynac/container.h:597:3: warning: this clause does not guard... [-Wmisleading-indentation]
597 | if (is_a<container<C> >(*this))
| ^~
/opt/sage/local/include/pynac/container.h:600:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
600 | return *this;
| ^~~~~~
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/expression.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/expression.cpython-37m-x86_64-linux-gnu.so -lpari
[494/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/cpython -Isage/cpython -I./sage/libs/ntl -I./sage/libs/pynac -Isage/libs/pynac -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/function.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/function.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/function.cpp:674:
/opt/sage/local/include/pynac/container.h: In member function :
/opt/sage/local/include/pynac/container.h:592:3: warning: this clause does not guard... [-Wmisleading-indentation]
592 | if (is_a<container<C> >(result))
| ^~
/opt/sage/local/include/pynac/container.h:595:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
595 | return result;
| ^~~~~~
/opt/sage/local/include/pynac/container.h:597:3: warning: this clause does not guard... [-Wmisleading-indentation]
597 | if (is_a<container<C> >(*this))
| ^~
/opt/sage/local/include/pynac/container.h:600:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
600 | return *this;
| ^~~~~~
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/function.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/function.cpython-37m-x86_64-linux-gnu.so
[495/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/libs/pynac -I./sage/cpython -Isage/libs/pynac -Isage/cpython -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/getitem.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/getitem.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/getitem.cpp:670:
/opt/sage/local/include/pynac/container.h: In member function :
/opt/sage/local/include/pynac/container.h:592:3: warning: this clause does not guard... [-Wmisleading-indentation]
592 | if (is_a<container<C> >(result))
| ^~
/opt/sage/local/include/pynac/container.h:595:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
595 | return result;
| ^~~~~~
/opt/sage/local/include/pynac/container.h:597:3: warning: this clause does not guard... [-Wmisleading-indentation]
597 | if (is_a<container<C> >(*this))
| ^~
/opt/sage/local/include/pynac/container.h:600:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
600 | return *this;
| ^~~~~~
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/getitem.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/getitem.cpython-37m-x86_64-linux-gnu.so
[496/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/libs/pynac -I./sage/cpython -Isage/libs/pynac -Isage/cpython -I./sage/libs/ntl -I/opt/sage/local/lib/python3.7/site-packages/cypari2 -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/ring.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/ring.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/ring.cpp:678:
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/ring.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/ring.cpython-37m-x86_64-linux-gnu.so
[497/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/libs/pynac -I./sage/cpython -Isage/libs/pynac -Isage/cpython -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/series.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/series.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/series.cpp:670:
/opt/sage/local/include/pynac/container.h: In member function :
/opt/sage/local/include/pynac/container.h:592:3: warning: this clause does not guard... [-Wmisleading-indentation]
592 | if (is_a<container<C> >(result))
| ^~
/opt/sage/local/include/pynac/container.h:595:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
595 | return result;
| ^~~~~~
/opt/sage/local/include/pynac/container.h:597:3: warning: this clause does not guard... [-Wmisleading-indentation]
597 | if (is_a<container<C> >(*this))
| ^~
/opt/sage/local/include/pynac/container.h:600:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
600 | return *this;
| ^~~~~~
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/series.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/series.cpython-37m-x86_64-linux-gnu.so
[498/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/libs/pynac -I./sage/cpython -Isage/libs/pynac -Isage/cpython -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/symbolic/substitution_map.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/substitution_map.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11 -DSING_NDEBUG -DOM_NDEBUG -I/opt/sage/local/include/singular -I/opt/sage/local/include/
In file included from /opt/sage/local/include/pynac/lst.h:26,
from /opt/sage/local/include/pynac/ginac.h:37,
from ./sage/libs/pynac/pynac_wrap.h:13,
from build/cythonized/sage/symbolic/substitution_map.cpp:670:
/opt/sage/local/include/pynac/container.h: In member function :
/opt/sage/local/include/pynac/container.h:592:3: warning: this clause does not guard... [-Wmisleading-indentation]
592 | if (is_a<container<C> >(result))
| ^~
/opt/sage/local/include/pynac/container.h:595:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
595 | return result;
| ^~~~~~
/opt/sage/local/include/pynac/container.h:597:3: warning: this clause does not guard... [-Wmisleading-indentation]
597 | if (is_a<container<C> >(*this))
| ^~
/opt/sage/local/include/pynac/container.h:600:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the
600 | return *this;
| ^~~~~~
/opt/sage/local/include/pynac/container.h: In instantiation of :
/opt/sage/local/include/pynac/container.h:589:29: required from
/opt/sage/local/include/pynac/container.h:579:4: required from here
/opt/sage/local/include/pynac/container.h:803:22: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
803 | return std::move(s);
| ^
/opt/sage/local/include/pynac/container.h:803:22: note: remove call
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/symbolic/substitution_map.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lpynac -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/symbolic/substitution_map.cpython-37m-x86_64-linux-gnu.so
[499/500] creating build/temp.linux-x86_64-3.7/build/cythonized/sage/tests
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I./sage/cpython -Isage/cpython -I./sage/libs/ntl -I/opt/sage/local/lib/python3.7/site-packages/cysignals -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/tests/stl_vector.cpp -o build/temp.linux-x86_64-3.7/build/cythonized/sage/tests/stl_vector.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c++11
build/cythonized/sage/tests/stl_vector.cpp: In function :
build/cythonized/sage/tests/stl_vector.cpp:2891:30: warning: comparison of integer expressions of different signedness: and {aka } [-Wsign-compare]
2891 | __pyx_t_1 = (__pyx_v_i < __pyx_v_self->data->size());
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/tests/stl_vector.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lgmp -lstdc++ -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/tests/stl_vector.cpython-37m-x86_64-linux-gnu.so -lpari
[500/500] gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -fPIC -I/opt/sage/local/include -I/opt/sage/src -I/opt/sage/src/sage/ext -I/opt/sage/local/include/python3.7m -I/opt/sage/local/lib/python3.7/site-packages/numpy/core/include -Ibuild/cythonized -I/opt/sage/local/include/python3.7m -c build/cythonized/sage/tests/cython.c -o build/temp.linux-x86_64-3.7/build/cythonized/sage/tests/cython.o -fno-strict-aliasing -DCYTHON_CLINE_IN_TRACEBACK=1 -std=c99
gcc -pthread -shared -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L. -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib -L/opt/sage/local/lib -Wl,-rpath,/opt/sage/local/lib build/temp.linux-x86_64-3.7/build/cythonized/sage/tests/cython.o -L/opt/sage/local/lib -L/opt/sage/local/lib -lpython3.7m -o build/lib.linux-x86_64-3.7/sage/tests/cython.cpython-37m-x86_64-linux-gnu.so
error: command 'gcc' failed with exit status 1
make[4]: *** [Makefile:33: sage] Error 1
make[4]: Leaving directory '/opt/sage/src'
I'm trying to build it using the SlackBuilds script with the version number changed. I tried to attach the log file but I don't have enough karma yet.
Any help or insight will be greatly appreciated.
You should post this on sage-support. Ask.sagemath is more dedicated to math and programming questions about a working sage...
Thank you for your reply. The root cause appears to be some patches that was applying to it that I thought were necessary but turns out weren't needed. In addition, the SlackBuilds script looks like it was updated recently to account for the failure in building the documentation. Either way, I got it to build now!
Hello, @BudRz. I am just guessing, but a similar problem of mine was solved by installing the
pkg-config
package. Please, try this and let me know if that helps.