Sage 9.8 build error

97 views
Skip to first unread message

Alex

unread,
Jan 4, 2023, 1:56:01 AM1/4/23
to sage-support
Hello,

I am trying to build Sage 9.8 from source on a 2021 Apple M1 laptop. I have attached the logs for each attempt and also the packages with errors as indicated by running 

grep -li "^Error" logs/pkgs/*

Thank you,
Alex


logs.zip

John H Palmieri

unread,
Jan 4, 2023, 2:35:39 PM1/4/23
to sage-support
Many of the errors are discussed at https://trac.sagemath.org/ticket/34838. You can probably avoid those by running "make typing_extensions" before running "make".

The most recent error seems to be for sagelib:

    ld: library not found for -lopenblas

I assume that you followed the directions at the end of ./configure? It is possible that some homebrew package got updated after running ./configure, and now Sage is looking for the old one and can't find it. Maybe you need to start over by running "make distclean"? Re-run "./configure", then "make typing_extension", then "make".

John H Palmieri

unread,
Jan 4, 2023, 2:38:29 PM1/4/23
to sage-support
Maybe you also need to do "make flit_core" before "make typing_extension".

Alex

unread,
Jan 4, 2023, 5:04:29 PM1/4/23
to sage-s...@googlegroups.com
Hi John,

Sorry, just after I sent my previous message I realized I should have typed 'make typing_extensions' and not 'make typing_extension' so I am no longer getting the error I indicated above. I am currently building with no errors so far, so I will send another update soon.

Best,
Alex

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/5c58d060-cfda-4518-a4ff-cfeef5c06bcen%40googlegroups.com.

Alex

unread,
Jan 4, 2023, 5:59:01 PM1/4/23
to sage-support
After following all of the suggestions, I am still getting the error

"""
Error building Sage.

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

* package:         sagelib-9.8.beta6
  last build time: Jan 4 14:45
  log file:        /Users/alexchandler/Documents/GitHub/sage/logs/pkgs/sagelib-9.8.beta6.log

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]: *** [all-start] Error 1
make: *** [all] Error 2
"""

This time there are only four packages with errors pointed out when I run

grep -li "^Error" logs/pkgs/*

so this is an improvement, but I am still unable to proceed. Any idea how to fix the issue? I have attached logs, config.log, and a text file with the 4 packages with errors.

Thank you!
Alex

On Wednesday, January 4, 2023 at 11:35:39 AM UTC-8 John H Palmieri wrote:
logs_and_config.zip

John H Palmieri

unread,
Jan 5, 2023, 1:27:04 AM1/5/23
to sage-support
Some observations:

- It's showing a different error now.
- I find it unusual that more packages haven't been built before it tries to build sagelib. You could try "make" again and see how far it gets.
- config.log says

Invocation command line was

  $ ./configure PKG_CONFIG_PATH=/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/openblas/lib/pkgconfig:/opt/homebrew/lib/pkgconfig: --no-create --no-recursion

Did you pass these arguments to ./configure?

- Did you "source .homebrew-build-env" before running "./configure" and "make"?

Alex

unread,
Jan 5, 2023, 2:23:09 AM1/5/23
to sage-s...@googlegroups.com
I tried running 'make' again but am getting stuck at the same spot.

I did not pass any arguments to configure. I don't have a good idea of how this process works so i did not deviate from the instructions in README.md (as far as I know). 

I did indeed run source .homebrew-build-env before configure and make. 

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Matthias Koeppe

unread,
Jan 5, 2023, 1:54:13 PM1/5/23
to sage-support
I see the following error in sagelib-*.log:

====
    #define LOCAL_HIREMAINDER register ulong hiremainder
                              ^
    sage/rings/polynomial/multi_polynomial_libsingular.cpp:35068:120: error: use of undeclared identifier 'pTakeOutComp1'; did you mean 'pTakeOutComp'?
          __pyx_t_1 = ((PyObject *)__pyx_f_4sage_5rings_10polynomial_28multi_polynomial_libsingular_new_MP(__pyx_v_parent, pTakeOutComp1((&(__pyx_v_res->m[__pyx_v_i])), __pyx_v_j))); if (
====

This is caused by a too new version of Singular installed in the system.

We have a fix (and upgrade of Singular) in https://trac.sagemath.org/ticket/34851; you can fetch and merge the branch of that ticket.

Alternatively, as a workaround, you can pass "--without-system-singular" as an option to "./configure"

Alex

unread,
Jan 5, 2023, 5:07:46 PM1/5/23
to sage-support
Thank you, Matthias. I was indeed able to build sage after passing "--without-system-singular" to "./configure". Still working on figuring out how to merge the branch of the ticket you suggested.

Best,
Alex

Reply all
Reply to author
Forward
0 new messages