Build error with bzip2 download

155 views
Skip to first unread message

Ted Fujimoto

unread,
May 14, 2015, 8:12:10 PM5/14/15
to sage-s...@googlegroups.com
Getting the following error using OS X 10.10:

$ make -j8
...
make base
/Users/tcf/Applications/sage/build/pipestatus "sage-spkg -f bzip2-1.0.6.20140317 2>&1" "tee -a /Users/tcf/Applications/sage/logs/pkgs/bzip2-1.0.6.20140317.log"
Found local metadata for bzip2-1.0.6.20140317
Attempting to download package bzip2-1.0.6.20140317
[Traceback (most recent call last):
  File "<stdin>", line 35, in <module>
  File "/Users/tcf/Applications/sage/local/lib/python/urllib.py", line 240, in retrieve
    fp = self.open(url, data)
  File "/Users/tcf/Applications/sage/local/lib/python/urllib.py", line 208, in open
    return getattr(self, name)(url)
  File "/Users/tcf/Applications/sage/local/lib/python/urllib.py", line 359, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/Users/tcf/Applications/sage/local/lib/python/urllib.py", line 376, in http_error
    return self.http_error_default(url, fp, errcode, errmsg, headers)
  File "<stdin>", line 17, in http_error_default
Error: failed to download package bzip2-1.0.6.20140317
make[2]: *** [/Users/tcf/Applications/sage/local/var/lib/sage/installed/bzip2-1.0.6.20140317] Error 1
make[1]: *** [all] Error 2

real 0m1.524s
user 0m0.415s
sys 0m0.255s
***************************************************************
Error building Sage.

The following package(s) may have failed to build:

package: bzip2-1.0.6.20140317
log file: /Users/tcf/Applications/sage/logs/pkgs/bzip2-1.0.6.20140317.log
build directory: /Users/tcf/Applications/sage/local/var/tmp/sage/build/bzip2-1.0.6.20140317

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.

make: *** [build] Error 1


Volker Braun

unread,
May 15, 2015, 3:28:28 AM5/15/15
to sage-s...@googlegroups.com
There were some changes to how we host the tarballs, get sage-6.7.rc0 instead (which you need anyways to work around bugs in the newest xcode)

Ted Fujimoto

unread,
May 15, 2015, 9:06:32 PM5/15/15
to sage-s...@googlegroups.com
Just tried it but now having trouble with NumPy. Is this normal if I already have NumPy installed (using Anaconda distribution)?:

make[1]: *** [all] Error 2

real 91m32.068s
user 259m40.279s
sys 33m41.236s
***************************************************************
Error building Sage.

The following package(s) may have failed to build:

package: numpy-1.8.1.p0
log file: /Users/tcf/Applications/sage-6.7.rc0/logs/pkgs/numpy-1.8.1.p0.log
build directory: /Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.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.

make: *** [build] Error 1

Dima Pasechnik

unread,
May 16, 2015, 2:20:30 AM5/16/15
to sage-s...@googlegroups.com


On Saturday, 16 May 2015 02:06:32 UTC+1, Ted Fujimoto wrote:
Just tried it but now having trouble with NumPy. Is this normal if I already have NumPy installed (using Anaconda distribution)?:

The latter is probably OK.
Well, it's hard to say without seeing the log what exactly went wrong.
 

Ted Fujimoto

unread,
May 16, 2015, 2:32:16 PM5/16/15
to sage-s...@googlegroups.com
Hope this helps:

Writing /Users/tcf/Applications/sage-6.7.rc0/local/lib/python2.7/site-packages/numpy-1.8.1-py2.7.egg-info
running install_clib
copying build/temp.macosx-10.9-x86_64-2.7/libnpymath.a -> /Users/tcf/Applications/sage-6.7.rc0/local/lib/python2.7/site-packages/numpy/core/lib
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line 170, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): Symbol not found: _PyUnicodeUCS2_AsASCIIString
  Referenced from: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
  Expected in: flat namespace
 in /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so

real 2m12.107s
user 1m50.320s
sys 0m8.643s
************************************************************************
Error installing package numpy-1.8.1.p0
************************************************************************
explaining the problem and including the relevant part of the log file
  /Users/tcf/Applications/sage-6.7.rc0/logs/pkgs/numpy-1.8.1.p0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.p0 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.p0' && '/Users/tcf/Applications/sage-6.7.rc0/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Dima Pasechnik

unread,
May 16, 2015, 2:38:59 PM5/16/15
to sage-s...@googlegroups.com

indeed, this is the interference from another installation of numpy.
Before running make, remove everything that starts from /usr/local from
PATH in the shell you start make from.
Hopefully it will work then.
(if not, post the new log...)

OK, we should put Anaconda on our blacklist :-)


 

Ted Fujimoto

unread,
May 16, 2015, 3:18:26 PM5/16/15
to sage-s...@googlegroups.com
I removed all starting with /usr/local on my PATH but getting the same error on my Homebrew version of Python:

Writing /Users/tcf/Applications/sage-6.7.rc0/local/lib/python2.7/site-packages/numpy-1.8.1-py2.7.egg-info
running install_clib
copying build/temp.macosx-10.9-x86_64-2.7/libnpymath.a -> /Users/tcf/Applications/sage-6.7.rc0/local/lib/python2.7/site-packages/numpy/core/lib
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line 170, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): Symbol not found: _PyUnicodeUCS2_AsASCIIString
  Referenced from: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
  Expected in: flat namespace
 in /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so

real 2m15.443s
user 1m49.642s
sys 0m8.702s
************************************************************************
Error installing package numpy-1.8.1.p0
************************************************************************
explaining the problem and including the relevant part of the log file
  /Users/tcf/Applications/sage-6.7.rc0/logs/pkgs/numpy-1.8.1.p0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.p0 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.p0' && '/Users/tcf/Applications/sage-6.7.rc0/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
make[2]: *** [/Users/tcf/Applications/sage-6.7.rc0/local/var/lib/sage/installed/numpy-1.8.1.p0] Error 1
make[1]: *** [all] Error 2

real 2m19.942s
user 1m50.269s
sys 0m9.297s
***************************************************************
Error building Sage.

The following package(s) may have failed to build:

package: numpy-1.8.1.p0
log file: /Users/tcf/Applications/sage-6.7.rc0/logs/pkgs/numpy-1.8.1.p0.log
build directory: /Users/tcf/Applications/sage-6.7.rc0/local/var/tmp/sage/build/numpy-1.8.1.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.

make: *** [build] Error 1

Dima Pasechnik

unread,
May 16, 2015, 6:47:25 PM5/16/15
to sage-s...@googlegroups.com


On Saturday, 16 May 2015 20:18:26 UTC+1, Ted Fujimoto wrote:
I removed all starting with /usr/local on my PATH but getting the same error on my Homebrew version of Python:t

right, Homebrew/Fink/MacPorts are known to create problems with building on OSX.

In SAGEROOT/configure there is a comment:
###########################################################################
# (OS X only)
# Sage will probably not build at all if either Fink or MacPorts can be
# found, and the error messages can be extremely confusing.  Even if it does
# build, the product will probably be wrong.  This runs a basic check to
# find them. Once the Sage build process is perfected, this won't be necessary.

and in fact Fink/MacPorts are detected, but probably not HomeBrew...

anyhow, this what is to be done in case of the former:
"Either:
(1) rename /opt/local and /sw, or
(2) change PATH and DYLD_LIBRARY_PATH
(Once Sage is built, you can restore them.)"

I don't know what exactly needs to be removed from the above PATH to have this fixed in Homebrew case...


ksk...@gmail.com

unread,
Apr 26, 2016, 11:53:34 PM4/26/16
to sage-support
I've run into similar issues building development branches on other platforms. Is there a generic workaround I should know about?

Kiran


On Friday, May 15, 2015 at 12:28:28 AM UTC-7, Volker Braun wrote:
Reply all
Reply to author
Forward
0 new messages