giac pari interface build failure

27 views
Skip to first unread message

Antonio Rojas

unread,
Jan 25, 2017, 3:06:13 AM1/25/17
to sage-packaging
Replying here to http://lists.alioth.debian.org/pipermail/debian-science-sagemath/Week-of-Mon-20170116/000731.html as I'm not subscribed to that list and this could be potentially useful for other distros

/usr/bin/ld: PARI_stack_limit: TLS definition in /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libpari.so section .tbss mismatches non-TLS reference in .libs/pari.o
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libpari.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:521: recipe for target 'libgiac.la' failed
make[3]: *** [libgiac.la] Error 1

This happens if you build pari with pthread support. We are using this patch in Arch:

https://git.archlinux.org/svntogit/community.git/tree/trunk/giac-pari-thread.patch?h=packages/giac

Would be nice if we could all agree to bring these issues to this list (besides the distro-specific ones). Otherwise it's kind of pointless to have it and we end up duplicating work.

Francois Bissey

unread,
Jan 25, 2017, 3:11:05 AM1/25/17
to sage-pa...@googlegroups.com
Thank you. That also explains why I didn’t see it.
Aside from that do you have some proposal about communication of new patch?

François
> --
> You received this message because you are subscribed to the Google Groups "sage-packaging" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-packagin...@googlegroups.com.
> To post to this group, send email to sage-pa...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/ac9575ae-4dd3-4d29-97aa-a3ef785d3509%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jeroen Demeyer

unread,
Jan 25, 2017, 4:11:50 AM1/25/17
to sage-pa...@googlegroups.com
It would be interesting to know why giac needs access to the private
variable PARI_stack_limit. If there is a genuine use case, we could ask
upstream PARI to make it public.

Francois Bissey

unread,
Jan 25, 2017, 4:31:13 AM1/25/17
to sage-pa...@googlegroups.com
Typical use of PARI_stack_limit in giac, there are a few more instance of
similar things:
static gen pari_exec(const string & s,GIAC_CONTEXT){
long av=avma;
void * save_pari_stack_limit = PARI_stack_limit;
PARI_stack_limit=0; // required since the stack changed
#ifdef PARI23
if (setjmp(GP_DATA->env))
#else
cb_pari_err_recover=gp_err_recover;
if (setjmp(env))
#endif
{
#ifdef HAVE_LIBPTHREAD
if (pari_mutex_ptr) pthread_mutex_unlock(pari_mutex_ptr);
#endif
avma = av;
*logptr(contextptr) << gettext("Error in PARI subsystem") << endl;
PARI_stack_limit = save_pari_stack_limit ;
// setsizeerr();
return undef;
}
GEN gres= gp_read_str((char *) s.c_str());
gen res=GEN2gen(gres,vecteur(0));
avma=av;
PARI_stack_limit = save_pari_stack_limit ;
return res;
}

> On 25/01/2017, at 22:11, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
>
> It would be interesting to know why giac needs access to the private variable PARI_stack_limit. If there is a genuine use case, we could ask upstream PARI to make it public.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-packaging" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-packagin...@googlegroups.com.
> To post to this group, send email to sage-pa...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-packaging/58886BD5.8000901%40cage.ugent.be.
> For more options, visit https://groups.google.com/d/optout.


This email may be confidential and subject to legal privilege, it may
not reflect the views of the University of Canterbury, and it is not
guaranteed to be virus free. If you are not an intended recipient,
please notify the sender immediately and erase all copies of the message
and any attachments.

Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
information.

Jeroen Demeyer

unread,
Jan 25, 2017, 4:39:19 AM1/25/17
to sage-pa...@googlegroups.com

Ximin Luo

unread,
Jan 25, 2017, 7:20:24 AM1/25/17
to sage-pa...@googlegroups.com
Antonio Rojas:
Thank you very much! Yes, I'll start doing that.

X

--
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git
Reply all
Reply to author
Forward
0 new messages