Error building Sage on UM 16.04 LTS, failed to build openblas

54 views
Skip to first unread message

Christopher Phoenix

unread,
Jul 12, 2017, 9:12:18 PM7/12/17
to sage-support
My attempt to build Sage 7.6 resulted in an error. Before beginning, I checked that I had all the required dependencies and suggested programs. Then I got the code through git, set MAKE='make -j5 -j4' since I have four physical cpu cores, and ran make. Make ran for about 45 min. and then returned this error:

Error building Sage.

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

* package: openblas-0.2.19.p0
  log file
: /home/christopher/sagemath/sage/logs/pkgs/openblas-0.2.19.p0.log
  build directory
: /home/christopher/sagemath/sage/local/var/tmp/sage/build/openblas-0.2.19.p0

The build directory may contain configuration files and other potentially
helpful information
. WARNING: if you now run 'make' again, the build
directory will
, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to
'yes' to prevent this.

Makefile:16: recipe for target 'all' failed
make
: *** [all] Error 1

I checked the log file, and it said that detecting the CPU failed:

make[3]: *** [getarch_2nd] Error 1
Makefile:123: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly,
e
.g. make TARGET=your_cpu_target. Please read README for the detail..  Stop.
make
[3]: Leaving directory '/home/christopher/sagemath/sage/local/var/tmp/sage/build/openblas-0.2.19.p0/src'
Error building OpenBLAS

Above this, I saw a bunch of errors involving getarch_2nd.c, which seems consistent with this. My cput is an Intel Celeron N2940 with four cores and a base clock of 1.83 ghz, this is what inxi reports on it:

me@thinkpad11e:~$ inxi -C
CPU
:       Quad core Intel Celeron N2940 (-MCP-) cache: 1024 KB
           clock speeds
: max: 2249 MHz 1: 1140 MHz 2: 1569 MHz 3: 2245 MHz 4: 2247 MHz

This is my first time building a program from source. It looks like I have to set the TARGET env variable to indicate my CPU manually, but I'm not sure how to do that. Should I do this, or just trying running make again? (If I double-posted, I'm sorry, the first time I tried to post it looked like it had failed to come through)

Henri Girard

unread,
Jul 13, 2017, 3:17:43 AM7/13/17
to sage-s...@googlegroups.com

Did you read this ... if it can help you ?

https://groups.google.com/forum/#!topic/sage-devel/zQsZsivts0I

--
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 post to this group, send email to sage-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Christopher Phoenix

unread,
Jul 13, 2017, 7:32:44 PM7/13/17
to sage-support
Thanks for the link! I don't have the OP's issue with the missing fortran libs, but further down someone reports having the EXACT same issue I have: https://groups.google.com/d/msg/sage-devel/zQsZsivts0I/cblwvEkNDgAJ

I posted on sage-devel about this and left a copy of the relevant logs. Anyway, it seems that setting OPENBLAS_CONFIGURE="TARGET=ATOM" resolved this issue, so I am going to try this later today. :-) One thing I am confused by is the setting ATOM itself. I have a Celeron, not an Atom processor. Is this just a catch-all setting for lower-end cpus?

Christopher Phoenix

unread,
Jul 14, 2017, 12:47:55 AM7/14/17
to sage-support
Quick update, just successfully built Sage on my 11e using OPENBLAS_CONFIGURE='TARGET=ATOM'. I haven't run all the tests yet (or indeed know how to run Sage, lol) but cli Sage starts up and does simple math, and the notebook starts up in Firefox. Looking forward to exploring all the possibilities of Sage. Thanks for the help!


On Thursday, July 13, 2017 at 12:17:43 AM UTC-7, HG wrote:
Reply all
Reply to author
Forward
0 new messages