Error Building Sage

287 views
Skip to first unread message

Brandon Gontmacher

unread,
Jun 13, 2019, 8:16:27 AM6/13/19
to sage-devel
Hi,

I'm running Ubuntu 18.04 on a Windows 7 (32-bit) laptop through VirtualBox. Every time I try to make Sage I get an error when it tries to install Scipy 1.2 (Google drive link to log file at the end of the post). It appears to me that the issue is

failed with error code 1 in /tmp/pip-req-build-OJsJeE/

I have looked this problem up - it appears to be an easy fix with something along the lines of

pip install --upgrade setuptools

but this has not been working for me (in addition to having unrelated problems with pip itself).

Any help is appreciated!


Dima Pasechnik

unread,
Jun 13, 2019, 8:20:11 AM6/13/19
to sage-devel
On Thu, Jun 13, 2019 at 1:16 PM Brandon Gontmacher
<bgont...@gmail.com> wrote:
>
> Hi,
>
> I'm running Ubuntu 18.04 on a Windows 7 (32-bit) laptop through VirtualBox. Every time I try to make Sage I get an error when it tries to install Scipy 1.2 (Google drive link to log file at the end of the post). It appears to me that the issue is
>
> failed with error code 1 in /tmp/pip-req-build-OJsJeE/

somewhere towards the end of the log file you can see

virtual memory exhausted: Cannot allocate memory

error message by the compiler. That is, give your VirtualBox more RAM,
then it will hopefully work.

HTH
Dima


>
> I have looked this problem up - it appears to be an easy fix with something along the lines of
>
> pip install --upgrade setuptools
>
> but this has not been working for me (in addition to having unrelated problems with pip itself).
>
> Any help is appreciated!
>
>
> https://drive.google.com/open?id=1B7p1SKuRXnun1eiYN1gnylGhlvxpzPL0
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0d56f5f0-7696-48c8-9198-a9dfd718a2bb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Brandon Gontmacher

unread,
Jun 13, 2019, 2:21:35 PM6/13/19
to sage-devel
Hi,

I did allocate more memory and this cleared up the issue! Thanks for that.
I'm now in a situation where as expected the build is taking a lot of time but in particular it has been on the following screen with no progress for a while now

Selection_001.png


I know there is still a process running since I cannot use any commands. Is there anything you recommend? I do not believe it is done, but I'm not sure what to do.

Thanks.

Dima Pasechnik

unread,
Jun 13, 2019, 2:28:59 PM6/13/19
to sage-devel
On Thu, Jun 13, 2019 at 7:21 PM Brandon Gontmacher <bgont...@gmail.com> wrote:
Hi,

I did allocate more memory and this cleared up the issue! Thanks for that.
I'm now in a situation where as expected the build is taking a lot of time but in particular it has been on the following screen with no progress for a while now

Selection_001.png


I know there is still a process running since I cannot use any commands. Is there anything you recommend? I do not believe it is done, but I'm not sure what to do.

well, you don't really need to build HTML documentation (which you can consult online); just hit Ctrl-C (perhaps a number of times) to kill this process,
and run

make build

to make sure Sage is built (without docs in HTML)

------------

building docs is known to be a bit iffy, in particular on Cygwin. You make try to restart the build as

make -j1

perhaps it won't get stuck.


 

Thanks.

On Thursday, June 13, 2019 at 8:16:27 AM UTC-4, Brandon Gontmacher wrote:
Hi,

I'm running Ubuntu 18.04 on a Windows 7 (32-bit) laptop through VirtualBox. Every time I try to make Sage I get an error when it tries to install Scipy 1.2 (Google drive link to log file at the end of the post). It appears to me that the issue is

failed with error code 1 in /tmp/pip-req-build-OJsJeE/

I have looked this problem up - it appears to be an easy fix with something along the lines of

pip install --upgrade setuptools

but this has not been working for me (in addition to having unrelated problems with pip itself).

Any help is appreciated!


--
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.

E. Madison Bray

unread,
Jun 14, 2019, 8:09:02 AM6/14/19
to sage-devel
On Thu, Jun 13, 2019 at 8:28 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
>
>
> On Thu, Jun 13, 2019 at 7:21 PM Brandon Gontmacher <bgont...@gmail.com> wrote:
>>
>> Hi,
>>
>> I did allocate more memory and this cleared up the issue! Thanks for that.
>> I'm now in a situation where as expected the build is taking a lot of time but in particular it has been on the following screen with no progress for a while now
>>
>>
>> I know there is still a process running since I cannot use any commands. Is there anything you recommend? I do not believe it is done, but I'm not sure what to do.
>
>
> well, you don't really need to build HTML documentation (which you can consult online); just hit Ctrl-C (perhaps a number of times) to kill this process,
> and run
>
> make build
>
> to make sure Sage is built (without docs in HTML)
>
> ------------
>
> building docs is known to be a bit iffy, in particular on Cygwin. You make try to restart the build as

Not sure why Cygwin is relevant on this thread, but for a note I've
actually had it working pretty well lately. Roughly 8 times out of 10
the only problem with building the docs on Cygwin has been due to bugs
in openblas that only occurred in the context of forked processes (of
which there are many when building the docs), or more recently due to
a bug in Cygwin 3.0.0 that interacted badly with Python's
multiprocessing module (which is used in the docbuild). The remaining
10% of the time is due to rebase issues but those are rare anymore on
a clean build.


>> On Thursday, June 13, 2019 at 8:16:27 AM UTC-4, Brandon Gontmacher wrote:
>>>
>>> Hi,
>>>
>>> I'm running Ubuntu 18.04 on a Windows 7 (32-bit) laptop through VirtualBox. Every time I try to make Sage I get an error when it tries to install Scipy 1.2 (Google drive link to log file at the end of the post). It appears to me that the issue is
>>>
>>> failed with error code 1 in /tmp/pip-req-build-OJsJeE/
>>>
>>> I have looked this problem up - it appears to be an easy fix with something along the lines of
>>>
>>> pip install --upgrade setuptools
>>>
>>> but this has not been working for me (in addition to having unrelated problems with pip itself).
>>>
>>> Any help is appreciated!
>>>
>>>
>>> https://drive.google.com/open?id=1B7p1SKuRXnun1eiYN1gnylGhlvxpzPL0
>>
>> --
>> 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.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/bb072e6b-7b1a-44a0-b558-c14796819308%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0%3D1zz_wSYzpcX7-C4gJcy42Wi4%3DjCbQPomBJo4fKuLHw%40mail.gmail.com.

Alex S

unread,
Jun 16, 2019, 2:00:32 AM6/16/19
to sage-devel
Hello,

I am trying to build sage on my mac os 10.14.5, and am unable to build the python2 and python3 packages. Running 'make' gives:

***************************************************************

Error building Sage.


The following package(s) may have failed to build (not necessarily

during this run of 'make all-start'):


* package: python2-2.7.15.p1

  log file: /Library/SageDev/logs/pkgs/python2-2.7.15.p1.log

  build directory: /Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1


* package: python3-3.7.3.p1

  log file: /Library/SageDev/logs/pkgs/python3-3.7.3.p1.log

  build directory: /Library/SageDev/local/var/tmp/sage/build/python3-3.7.3.p1


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

make: *** [all] Error 2


Thank you much,

Alex

python2-2.7.15.p1.log
python3-3.7.3.p1.log

Dima Pasechnik

unread,
Jun 16, 2019, 3:58:36 AM6/16/19
to sage-devel
I don't think I even saw this - the Python build complains it cannot
find _struct.c, _ctypes/_ctypes_test.c
(and in fact most source files for modules)

Do you have some unusual settins for the file system you are using for
the build?
A non-standard tar program?


....
clang -L. -L/Library/SageDev/local/lib
-Wl,-rpath,/Library/SageDev/local/lib -o python.exe \
Modules/python.o \
-L. -lpython2.7 -ldl -framework CoreFoundation
DYLD_LIBRARY_PATH=/Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1/src
./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
running build
running build_ext
building dbm using ndbm
building '_struct' extension
clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wno-unused -I/Library/SageDev/local/include -I. -IInclude -I./Include
-I/usr/local/include
-I/Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1/src/Include
-I/Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1/src -c
_struct.c -o build/temp.macosx-10.9-x86_64-2.7/_struct.o
clang: error: no such file or directory: '_struct.c'
clang: error: no input files
building '_ctypes_test' extension
creating build/temp.macosx-10.9-x86_64-2.7/_ctypes
clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wno-unused -I/Library/SageDev/local/include -I. -IInclude -I./Include
-I/usr/local/include
-I/Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1/src/Include
-I/Library/SageDev/local/var/tmp/sage/build/python2-2.7.15.p1/src -c
_ctypes/_ctypes_test.c -o
build/temp.macosx-10.9-x86_64-2.7/_ctypes/_ctypes_test.o
clang: error: no such file or directory: '_ctypes/_ctypes_test.c'
clang: error: no input files
...
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/305e17da-b57d-4d86-bb5d-9690b86b6b6c%40googlegroups.com.

Dima Pasechnik

unread,
Jun 16, 2019, 4:46:43 AM6/16/19
to sage-devel
perhaps there is a race condition in the build?
Can you remove the log you have on python2 (rm logs/pkgs/python2*) and
try running

MAKE="make -j1" ./sage -i python2

And post the log you will get, if it still fails.

Alex S

unread,
Jun 16, 2019, 11:30:09 AM6/16/19
to sage-devel
No unusual settings I'm aware of. Here is the new log file after running that command. Thank you.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.
python2-2.7.15.p1.log

Dima Pasechnik

unread,
Jun 16, 2019, 7:03:59 PM6/16/19
to sage-devel
You are building in /Library - an unusual location. Perhaps you're
gotten into trouble with SIP.

Could you instead try in your home directory, or somewhere in /usr/local ?
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e3afa88e-5d62-49ca-adc3-cef8e15cf252%40googlegroups.com.

Alex S

unread,
Jun 16, 2019, 11:43:26 PM6/16/19
to sage-devel
Worked great. Thank you much!
Reply all
Reply to author
Forward
0 new messages