Erik Bray wrote: > On Sat, Jul 30, 2016 at 8:25 PM, leif <not.rea...@online.de> wrote: >> leif wrote: >>> Erik Bray wrote: >>>> On Thu, Jul 28, 2016 at 8:03 PM, Erik Bray <erik.m.b...@gmail.com> wrote: >>>>> On Thu, Jul 28, 2016 at 4:32 PM, Erik Bray <erik.m.b...@gmail.com> wrote: >>>>>> ...and in particular, are any omalloc experts watching this list? >>>>>> >>>>>> I ask because my current issue in the Cygwin port of Sage is a >>>>>> segfault that's occurring in Singular during a routine memory >>>>>> deallocation of GMP integers. >>>>>> >>>>>> I'm working on getting a Singular compiled without omalloc to see if >>>>>> that makes any difference. In the meantime I just thought I'd reach >>>>>> out to see what expertise I have to draw on in the community. >>>>> >>>>> Thanks everyone for all the tips. I'm heading out for vacation again >>>>> but will be back in a week and will go through them one by one. >>>>> >>>>> For what it's worth I think I'm close in on the problem: >>>>> >>>>> The way Singular is being built and/or how DLLs are being loaded it's >>>>> ending up with both GMP and MPIR simultaneously, and this causes a >>>>> great deal of confusion, not the least of which that >>>>> mp_set_memory_functions is being called in one but not the other. >>>>> >>>>> The end result is a segfault on a memory address that was allocated >>>>> with the system allocator, but is being freed by omalloc. >>>>> >>>>> Not sure why this is happening but it must be a build issue. >>>> >>>> I just completed a build of Singular where I had forcibly changed all >>>> instances of -lgmp to -lmpir in the makefiles, and it works now, so >>>> that's reassuring. >>> >>> When you're back, you could try building Sage with the optional GMP >>> package*. I'm curious as to whether you'll then get two instances of >>> GMP... ;-) >>> >>> (The optional package is still at 5.1.3 IIRC though, but until then I'll >>> perhaps have upgraded it to GMP 6.1.1.) >> >> Just be warned: Building Sage with its GMP package appears to be broken. >> >> First of all, it's not sufficient to reconfigure with --with-mp=gmp and >> rerun 'make' (which was, AFAIK, supposed to or intended to work). >> >> Running 'make build-clean' and then reconfiguring doesn't work either; >> presumably that doesn't rebuild everything that it should. (Gave >> hundreds of crashes and timeouts in ptestlong IIRC, among them glibc >> detected invalid free()s and realloc()s of python.) >> >> Deleting local/var/lib/sage/installed/* in advance "worked", but gave >> trouble in the build (e.g. gf2x's tuning consistently failed with an >> assertion error). With GCC 6.1. at least, the build finally succeeded >> (is installing sagetex-3.0 with SAGE_CHECK=yes supposed to work?), but >> docbuilding got stuck, leaving 1 to N (-jN) python processes, 1 or N-1 >> running 100% without any progress even after hours. (I also retried a >> couple of times.) >> >> On a similar system, I did build Sage 7.3.rc0 with SAGE_INSTALL_GCC=yes >> and --with-mp=gmp from scratch, which led to a couple of doctest errors, >> most of them "harmless" I think, but also crashes in e.g. libsingular. > > To be honest I'm not even sure how I ended up with GMP in my Sage > install in the first place. I never did --with-mp=gmp. Or is that > what the --enable-gmpcompat flag to MPIR's configure does? Regardless > the end result is two complete copies of the library (I would have > thought just a symlink from mpir to gmp or something). > > Singular links explicitly against "gmp", while many other packages are > linked to "mpir". In the end both are being loaded and some symbols > being resolved to one, while other symbols resolved to the other. > It's very confusing.
We removed any explicit mention of MPIR ('-lmpir', '#include <mpir.h>') a while ago, but a few newer packages may indeed recognize MPIR meanwhile and link to that instead. But I'm not aware of a single one. -leif -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.