Make OpenBLAS Error

439 views
Skip to first unread message

Ethan Petersen

unread,
Oct 12, 2016, 12:43:20 PM10/12/16
to sage-devel
Hello all,

I'm building sage on a Lenovo Thinkpad W540 with Ubuntu 16.04, and there was an "Error building OpenBLAS"/"Error installing package openblas-0.2.19" with a suggestion to email this google group with the attached log file. If anyone has ideas on solving this issue, please let me know!

Thanks,

Ethan
openblas-0.2.19.log

Steven Trogdon

unread,
Oct 12, 2016, 1:40:57 PM10/12/16
to sage-devel
It looks like you are missing libgfortran3 libraries or at least they could not be found. Perhaps

apt-get install libgfortran3

but there could be something else that's the problem.

Steven Trogdon

unread,
Oct 12, 2016, 1:55:18 PM10/12/16
to sage-devel

Eric Gourgoulhon

unread,
Oct 12, 2016, 3:07:24 PM10/12/16
to sage-devel
Hi,

Just to complete Steven's answer: with Ubuntu 16.04, if you install the Ubuntu package gfortran-5, your Sage build will use the system gfortran, which works fine (no missing libgfortran.so.3). In this case, you do not need the fix introduced in https://trac.sagemath.org/ticket/21689

Best wishes,

Eric.

Jeroen Demeyer

unread,
Oct 13, 2016, 2:14:37 AM10/13/16
to sage-...@googlegroups.com
On 2016-10-12 18:14, Ethan Petersen wrote:
> there was an "Error building OpenBLAS"/"Error installing package openblas-0.2.19" with a suggestion to email this google group with the attached log file.

I'm glad that you did that! Almost *nobody* seems to read that message.

> If anyone has ideas on solving this issue, please let me know!

There is a fix at https://trac.sagemath.org/ticket/21689 but it's not
yet in a Sage release.

Sébastien Labbé

unread,
Oct 13, 2016, 5:01:45 AM10/13/16
to sage-devel


On Wednesday, October 12, 2016 at 9:07:24 PM UTC+2, Eric Gourgoulhon wrote:
> with Ubuntu 16.04, if you install the Ubuntu package gfortran-5, your Sage build will use the system gfortran, which works fine (no missing libgfortran.so.3).

Is there any other reason/advantage for Sage to use the system gfortran?

Sébastien

Francois Bissey

unread,
Oct 13, 2016, 5:03:20 AM10/13/16
to sage-...@googlegroups.com
Not spending the time compiling gcc to get gfortran?

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

Sébastien Labbé

unread,
Oct 13, 2016, 5:31:30 AM10/13/16
to sage-devel
Is there a page in the Sage wiki or Sage documentation about "How to install Sage from source faster" that gathers all those tricks?

The only thing I currently use is parallel stuff : export MAKE = "make -j4"

For example, how do I know that the architecture of my dual core os x laptop is CoreDuo or Core2 or Corei2 or whatever when I want to set the SAGE_ATLAS_ARCH?

http://doc.sagemath.org/html/en/installation/source.html#environment-variables

Jeroen Demeyer

unread,
Oct 13, 2016, 8:21:04 AM10/13/16
to sage-...@googlegroups.com
On 2016-10-13 11:31, Sébastien Labbé wrote:
> Is there a page in the Sage wiki or Sage documentation about "How to
> install Sage from source faster" that gathers all those tricks?

This page is the best I can think of:
http://doc.sagemath.org/html/en/installation/source.html

> For example, how do I know that the architecture of my dual core os x
> laptop is|CoreDuo or |||Core2| or Corei2 or whatever when I want to set
> the |||SAGE_ATLAS_ARCH?

Sage no longer compiles ATLAS by default.

Ethan Petersen

unread,
Oct 16, 2016, 2:37:34 PM10/16/16
to sage-devel
Thanks Steven, this worked great for me. Now just have to make sure the rest of the make goes well.

Ethan Petersen

unread,
Oct 16, 2016, 2:37:56 PM10/16/16
to sage-devel
Hi Eric,

Thanks for clearing this up, appreciate your reply!

Ethan

Ethan Petersen

unread,
Oct 16, 2016, 2:42:04 PM10/16/16
to sage-devel
I'll make sure to continue to do so in the future if I see those messages! I usually zone out during builds, glad I caught that line.

Thanks for the help. 
Message has been deleted

Ackbach

unread,
Apr 10, 2017, 4:13:39 PM4/10/17
to sage-devel
Having issues building the same package. Only I get a different log file. I always prefer building Sage from scratch for performance, but have lately been having trouble doing so, as Sage keeps failing to build. Background:

OS: Debian 8.7, 64-bit.
Sage Version: 7.6.
HW: Lenovo ThinkPad 11e, 120GB SSD, 8GB RAM, Intel Celeron N2940, with 4 cpu cores (as evidenced by the cat /proc/cpuinfo command).

I follow the instructions for [installing from source](http://doc.sagemath.org/html/en/installation/source.html), and I execute the MAKE='make -j4' make command. The compile gets quite a ways into the compile. It finishes compiling maxima, in fact, and then I get the following error message:

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/akeister/Downloads/sage-7.6/logs/pkgs/openblas-0.2.19.p0.log
  build directory: /home/akeister/Downloads/sage-7.6/local/var/tmp/sage/build/openblas-0.2.19.p0

I have attached the indicated log file, where it says to contact this group. You can see that the issue is different from the OP, but it's still a problem compiling that package.

Ideas?

Thanks for your time!

Cheers,
Adrian
openblas-0.2.19.p0.log

Francois Bissey

unread,
Apr 10, 2017, 4:17:38 PM4/10/17
to sage-...@googlegroups.com
Did it start happening with openblas 0.2.19 or did it suddenly happen
one release build openblas 0.2.19 successfully and the next didn’t?
I suspect it is a CPU detection problem, we have seen similar logs
before on atom chips.

François
> --
> 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 post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
> <openblas-0.2.19.p0.log>

Ackbach

unread,
Apr 10, 2017, 9:00:51 PM4/10/17
to sage-devel
I'm afraid I don't have that data. I will say I've never been able to compile Sage 7.6 the first time. I have definitely been able to compile 7.5.1 and earlier the first time, though sometimes there are still errors. I can try to compile 7.5.1 on this machine and get back to you how it works.

Francois Bissey

unread,
Apr 10, 2017, 9:05:53 PM4/10/17
to sage-...@googlegroups.com
OK 7.5.1 and 7.6 have the same version of openblas, so something else changed
to cause the build failure.
So, yes try to build 7.5.1 again. If it fails now, the cause is likely a change in
the host system. If it succeeds that’s probably something else in sage that changed.

Steven Trogdon

unread,
Apr 11, 2017, 12:45:44 AM4/11/17
to sage-devel
It is curious that 7.5.1 would build but not 7.6. You might get some mileage with

OPENBLAS_CONFIGURE="TARGET=ATOM" make 

See this thread:

Ackbach

unread,
Apr 11, 2017, 6:50:10 AM4/11/17
to sage-devel
7.5.1 failed to build. Looks like the same error as before. I'll try Steven's linked suggestion with 7.6, and see if that flies.

Thanks for all your help, by the way!

One suggestion: if the OPENBLAS_CONFIGURE="TARGET=ATOM" make command builds everything correctly, then maybe the next version of Sage could automate processor detection and do the right switches on that basis?

Cheers.

Ackbach

unread,
Apr 11, 2017, 3:23:42 PM4/11/17
to sage-devel
All right! Sage 7.6 compiled correctly, so far as I know. I haven't run the tests, but it opens into a notebook in Firefox, and correctly computes

integrate(e^(-x^2),x,-infinity,infinity)

Is there a way to combine the OPENBLAS_CONFIGURE command with the -j4 option for using multiple cores to compile? It did take a VERY long time to compile - I think it was about 8 hours.

In any case, targeting an ATOM processor seems like a common-enough occurrence that it deserves a mention in the manual, if it's not there already (I haven't looked, and please don't shoot me).

Thanks much!

Cheers.

Steven Trogdon

unread,
Apr 11, 2017, 5:02:40 PM4/11/17
to sage-devel
From a bash shell where you build Sage:

export OPENBLAS_CONFIGURE="TARGET=ATOM" MAKE="make -j5 -l3.5"

should set the important variables. This is the MAKE I use for a very, very old 4 core machine. The OPENBLAS_CONFIGURE variable is alluded to in build/pkgs/openblas/spkg-check but I find it no where else. Somewhere in the openblas code there is a listing of supported architectures. I don't know how many ATOM processor variations there are? And getting the openblas code to work properly is probably an upstream issue.
Reply all
Reply to author
Forward
0 new messages