sage -b fail

50 views
Skip to first unread message

Paul Mercat

unread,
Jul 18, 2016, 6:48:47 AM7/18/16
to sage-devel
Hi !

I just installed the last developpement version of sage with
git clone git://github.com/sagemath/sage.git
and it compiles correctly on my Ubuntu 16.04 computer.
But after that the command "./sage -b" fail with the following error :

... qflllTraceback (most recent call last):
  File "<string>", line 1, in <module>
  File "sage_setup/autogen/pari/__init__.py", line 5, in rebuild
    G()
  File "sage_setup/autogen/pari/generator.py", line 249, in __call__
    self.handle_pari_function(**v)
  File "sage_setup/autogen/pari/generator.py", line 190, in handle_pari_function
    get_rest_doc(function))
  File "sage_setup/autogen/pari/doc.py", line 365, in get_rest_doc
    return raw_to_rest(raw)
  File "sage_setup/autogen/pari/doc.py", line 224, in raw_to_rest
    raise SyntaxError("@ found: " + doc[ilow:ihigh])
SyntaxError: @ found: i,j} <= \|0.51\|`, and the
Lov@[aacute]sz's constant is :mat
Makefile:19 : la recette pour la cible « sage/libs/pari/auto_gen.pxi » a échouée
make: *** [sage/libs/pari/auto_gen.pxi] Erreur 1

How can I get ride of this error ?
I really need to make this works in order to use tools that I have developped for sage.

Thanks !
Paul

Thierry

unread,
Jul 18, 2016, 7:24:41 AM7/18/16
to 'Paul Mercat' via sage-devel
Hi,

On Mon, Jul 18, 2016 at 03:48:47AM -0700, 'Paul Mercat' via sage-devel wrote:
> Hi !
>
> I just installed the last developpement version of sage with
> git clone git://github.com/sagemath/sage.git
> and it compiles correctly on my Ubuntu 16.04 computer.

Do you mean that at this point you sucessfully ran 'make' ? If so, there is no
need to run 'sage -b' (or you need to provide more details about your
workflow).

Ciao,
Thierry


> ... qflllTraceback (most recent call last):
> File "<string>", line 1, in <module>
> File "sage_setup/autogen/pari/__init__.py", line 5, in rebuild
> G()
> File "sage_setup/autogen/pari/generator.py", line 249, in __call__
> self.handle_pari_function(**v)
> File "sage_setup/autogen/pari/generator.py", line 190, in
> handle_pari_function
> get_rest_doc(function))
> File "sage_setup/autogen/pari/doc.py", line 365, in get_rest_doc
> return raw_to_rest(raw)
> File "sage_setup/autogen/pari/doc.py", line 224, in raw_to_rest
> raise SyntaxError("@ found: " + doc[ilow:ihigh])
> SyntaxError: @ found: i,j} <= \|0.51\|`, and the
> Lov@[aacute]sz's constant is :mat
> Makefile:19 : la recette pour la cible « sage/libs/pari/auto_gen.pxi » a
> échouée
> make: *** [sage/libs/pari/auto_gen.pxi] Erreur 1
>
> How can I get ride of this error ?
> I really need to make this works in order to use tools that I have
> developped for sage.
>
> Thanks !
> Paul
>
> --
> 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.

Paul Mercat

unread,
Jul 18, 2016, 8:48:39 AM7/18/16
to sage-devel
Yes, I successfully ran 'make'.
But I need to run 'sage -b' because I want to modify some things in the source code.
But this command doesn't work even if I don't make any change in the source code.

Ciao
Paul

Thierry

unread,
Jul 18, 2016, 9:04:11 AM7/18/16
to 'Paul Mercat' via sage-devel
I can not reproduce your problem with 7.3.beta7 (downloaded from Sage's
git/trac server).

That said, if you make some modifications of Sage source code, you can just do
'make' afterwards.

Ciao,
Thierry
> > an email to sage-devel+...@googlegroups.com <javascript:>.
> > > To post to this group, send email to sage-...@googlegroups.com
> > <javascript:>.

John Cremona

unread,
Jul 18, 2016, 9:10:35 AM7/18/16
to SAGE devel
I have a similar problem, on a machine which has successfully built
Sage in the past. Version 7.2 (literally commit f76401f).

The last few commainds in history are

make distclean
./configure
make
make

but each of the last two make's ends with the following, also
mentioning sage_setup.autogen.pari:


make[3]: Entering directory `/home/lmfdb/sage/src'
python -c "from sage_setup.autogen.pari import rebuild; rebuild()"
sys:1: RuntimeWarning: not adding directory '' to sys.path since it's
writable by an untrusted group.
Untrusted users could put files in this directory which might then be
imported by your Python code. As a general precaution from similar
exploits, you should not execute Python code from this directory
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named sage_setup.autogen.pari
make[3]: *** [sage/libs/pari/auto_gen.pxi] Error 1
make[3]: Leaving directory `/home/lmfdb/sage/src'

leif

unread,
Jul 18, 2016, 9:27:06 AM7/18/16
to sage-...@googlegroups.com
John Cremona wrote:
> I have a similar problem, on a machine which has successfully built
> Sage in the past. Version 7.2 (literally commit f76401f).
>
> The last few commainds in history are
>
> make distclean
> ../configure
> make
> make
>
> but each of the last two make's ends with the following, also
> mentioning sage_setup.autogen.pari:
>
>
> make[3]: Entering directory `/home/lmfdb/sage/src'
> python -c "from sage_setup.autogen.pari import rebuild; rebuild()"
> sys:1: RuntimeWarning: not adding directory '' to sys.path since it's
> writable by an untrusted group.
> Untrusted users could put files in this directory which might then be
> imported by your Python code. As a general precaution from similar
> exploits, you should not execute Python code from this directory
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named sage_setup.autogen.pari
> make[3]: *** [sage/libs/pari/auto_gen.pxi] Error 1
> make[3]: Leaving directory `/home/lmfdb/sage/src'

Well, which group owns the folder, and does that group need write access?

As a work-around, either change the group or chmod g-w ...


-leif

leif

unread,
Jul 18, 2016, 9:44:21 AM7/18/16
to sage-...@googlegroups.com
P.S.: W.r.t. what Volker(?) considers an "untrusted group", see

build/pkgs/python2/patches/sys_path_security.patch


-leif


John Cremona

unread,
Jul 18, 2016, 9:57:52 AM7/18/16
to SAGE devel
On 18 July 2016 at 14:26, leif <not.r...@online.de> wrote:
> John Cremona wrote:
>> I have a similar problem, on a machine which has successfully built
>> Sage in the past. Version 7.2 (literally commit f76401f).
>>
>> The last few commainds in history are
>>
>> make distclean
>> ../configure
>> make
>> make
>>
>> but each of the last two make's ends with the following, also
>> mentioning sage_setup.autogen.pari:
>>
>>
>> make[3]: Entering directory `/home/lmfdb/sage/src'
>> python -c "from sage_setup.autogen.pari import rebuild; rebuild()"
>> sys:1: RuntimeWarning: not adding directory '' to sys.path since it's
>> writable by an untrusted group.
>> Untrusted users could put files in this directory which might then be
>> imported by your Python code. As a general precaution from similar
>> exploits, you should not execute Python code from this directory
>> Traceback (most recent call last):
>> File "<string>", line 1, in <module>
>> ImportError: No module named sage_setup.autogen.pari
>> make[3]: *** [sage/libs/pari/auto_gen.pxi] Error 1
>> make[3]: Leaving directory `/home/lmfdb/sage/src'
>
> Well, which group owns the folder, and does that group need write access?

Nothing unusual. The directory and all under it are owned by the user
doing the build (me) and the group ownership is the same. The
permissions are only for the user, not the group -- all this is
exactly as on all other machines where I build Sage often.

>
> As a work-around, either change the group or chmod g-w ...

OK -- I did a recursive g-w on the whole directory and that seems to
have done the trick. I have no idea how the group access got to be so
lenient in this instance.

Now the build continues.

Thanks, Leif!

John

Jeroen Demeyer

unread,
Jul 18, 2016, 11:51:14 AM7/18/16
to sage-...@googlegroups.com
On 2016-07-18 14:48, 'Paul Mercat' via sage-devel wrote:
> But this command doesn't work even if I don't make any change in the
> source code.

Note that changing git branches counts as changing source code. So
I bet that you *did* make changes to the Sage source code since the last
time you ran "make" successfully.

Anyway, when in doubt: run "make" (or "make build" to skip the
documentation) instead of "sage -b".

leif

unread,
Jul 18, 2016, 12:54:00 PM7/18/16
to sage-...@googlegroups.com
Indeed, this was added with the last PARI update. (I was really
wondering how he managed to get that error.)

git diff 6ef822df61a926d6be0fb7a420fed4d644641ef7
src/sage_setup/autogen/pari/doc.py
diff --git a/src/sage_setup/autogen/pari/doc.py
b/src/sage_setup/autogen/pari/doc.py
index def4efe..59e2635 100644
--- a/src/sage_setup/autogen/pari/doc.py
+++ b/src/sage_setup/autogen/pari/doc.py
@@ -107,6 +107,7 @@ def raw_to_rest(doc):
doc = doc.replace("@[pm]", "±")
doc = doc.replace("@[nbrk]", unichr(0xa0))
doc = doc.replace("@[agrave]", "à")
+ doc = doc.replace("@[aacute]", "á")
doc = doc.replace("@[eacute]", "é")
doc = doc.replace("@[ouml]", "ö")
doc = doc.replace("@[uuml]", "ü")



-leif


Reply all
Reply to author
Forward
0 new messages