New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update PolyBoRi to newest upstream release #8192
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Burcin and I prepared the Package: http://sage.math.washington.edu/home/dreyer/spkg/polybori-0.6.4.spkg Regards, |
Author: PolyBoRi,burcin |
Changed author from PolyBoRi,burcin to Alexander Dreyer, Burcin Erocal |
comment:6
Looks good. |
comment:7
Do you know why the spkg is so small?
I'm not complaining, but I'm curious. |
comment:8
Indeed, the polybori-0-6-3*spkg's contain a clone of PolyBoRi's mercurial repository as well a a mercurial repository of the Sage-related patches, The polybori-0-6-4.spkg only has the patch repo. What is Sage's policy here? Best regards, |
comment:9
I don't think there is a policy, but it seems to be okay to delete an upstream mercurial repository like this. |
Reviewer: Martin Albrecht |
comment:10
This does not build on Cygwin due to missing libpng12 and libz. I've posted an spkg which fixes this at http://sage.math.washington.edu/home/mhansen/cygwin_port/polybori-0.6.4.spkg Could someone review my changes? Otherwise, I can make a new ticket for this. |
comment:11
Hi Mike, I'm afraid your SPKG will need a new ticket since this one was merged in 4.4 already. Your SPKG builds fine on sage.math, however I get
which is likely unrelated to your SPKG? I will build a fresh 4.4 to check. |
comment:12
Okay, I'll open a new ticket. Shouldn't this ticket have been closed when it was merged into 4.4? |
comment:13
Argh, I mixed it up. No it isn't merged, so no new ticket needed. |
comment:14
SPKG looks good, the bug reported above had nothing to do with the SPKG. Running doctests now, if they pass this should be a positive review. |
comment:15
Thanks! |
comment:16
Mhh, can you try your SPKG on sage.math? It seems it does produce a fair amount of segfaults. |
comment:17
Sure. |
comment:18
given the report of segfaults above, I'm changing this to needs work! |
comment:19
Replying to @williamstein:
Or you could merge the package which got a positive review and we move the Cygwin problems to a different ticket. http://sage.math.washington.edu/home/dreyer/spkg/polybori-0.6.4.spkg |
comment:20
Yep, I think using that one would be fine for now. I'll look into these segfaults and make a new ticket. |
Merged: 4.4.1.alpha1 |
comment:23
Both the 0.6.4.spkgs here give those crashes reported above, but only once in every 10-15 runs. Valgrind shows invalid reads/writes on exit pointing to polybori:
|
comment:24
Hi Willem Jan, The crashes are probably caused by the fact that I disabled the code that statically links polybori in the new package. IIRC, we were doing that exactly because of these double free errors. We tested the new package on different platforms, and didn't see the crashes, so we assumed the problem was fixed. I don't have time to reproduce the problem, or test new packages at the moment. Can you try enabling the static build and try again? From the diff of the changes (of an earlier version of the package in Alexander Dreyer's home dir), this looks like the relevant change:
BTW, this also looks suspect to me:
Many thanks for looking into this. |
comment:25
Hi Burcin, I think, we removed the call of Regards, Alexander Dreyer |
comment:26
I agree, that this wrong and should be reverted (we really want the external M4RI) |
comment:27
Hi malb, right, but this is only the inital value of an internal variable. Later in the Sconstruct file, external_m4ri will be set to True, if the library is found. Regards, Alexander Dreyer |
comment:28
I don't have time to extensively test right now, so I tried both reverting the patch that Burcin gave above and reintroducing remove_dylib at the same time. That fixed the problems. So you're definitely on the right track, but I'll leave it to you to figure out what exactly needs to be changed for a new spkg :-) |
comment:29
Hi Willem Jan, I changed than remove_dynlib only at: !http://sage.math.washington.edu/home/dreyer/spkg/polybori-0.6.4-p1.spkg Is this enough to fix the problem? Since I was not able to reproduce the problem: Can you test it? (How do you run it?) Best regards, Alexander Dreyer |
comment:30
Hi Alexander, Yes, I don't get the errors anymore with that package. (After renaming the spkg to polybori-0.6.4.p1.spkg and the directory inside it to match the spkg filename.) I test it by running sage through valgrind and seeing if there are any errors on exit in polybori files, since the actual crashes happen here only once every 10-15 runs or so. Still I can't help but wonder if there's something subtle going wrong with sage's interface to polybori or in polybori itself on exit to require static linking. Maybe something like multiple libraries sharing a global memory manager and each of them trying to clean up global structures on quit or something similar... Thanks! |
comment:31
From sage-devel: Sage 4.4.1.alpha2 contains two PolyBoRi spkg's:
I think polybori-0.6.4.spkg is the newer one, so I deleted the other one from [mvngu@sage mvngu]$ diff -Naur polybori-0.6.3-20091028/spkg-install polybori-0.6.4.p0/spkg-install
--- polybori-0.6.3-20091028/spkg-install 2009-05-17 10:31:16.000000000 -0700
+++ polybori-0.6.4.p0/spkg-install 2010-04-29 07:10:46.000000000 -0700
@@ -6,14 +6,14 @@
exit 1
fi
-PBDIR=polybori-0.6
+PBDIR=polybori-0.6.4
WORKDIR=${PWD}/src
SCONS=scons
# For some strange reason the installed boost in $SAGE_LOCAL causes
# make install failures, so copy it over.
-mkdir src/boost_1_34_1.cropped
-cp -r $SAGE_LOCAL/include/boost src/boost_1_34_1.cropped
+#mkdir src/boost_1_34_1.cropped
+#cp -r $SAGE_LOCAL/include/boost src/boost_1_34_1.cropped
BOOSTDIR=boost_1_34_1.cropped
patch()
@@ -26,9 +26,6 @@
cp patches/SConstruct src/${PBDIR}/SConstruct
cp patches/PyPolyBoRi.py src/${PBDIR}/pyroot/polybori
-
- # workaround so will build on cygwin
- cp patches/cpu_stats.c src/${PBDIR}/Cudd/util/cpu_stats.c
}
@@ -68,7 +65,7 @@
remove_dylib()
{
- # linking dynmic libraries causes segfaults at exit (see #2822)
+ # linking dynamic libraries causes segfaults at exit (see #2822)
if [ `uname` = "Darwin" ]; then
rm -f $SAGE_LOCAL/lib/libpolybori.dylib
rm -f $SAGE_LOCAL/lib/libpboriCudd.dylib
@@ -101,9 +98,3 @@
echo "Removing dynamic libraries..."
remove_dylib
echo "Done removing dynamic libraries."
-
-# force a rebuild of the PolyBoRi extension
-if [ -f $SAGE_ROOT/devel/sage/sage/rings/polynomial/pbori.pyx ]; then
- touch $SAGE_ROOT/devel/sage/sage/rings/polynomial/pbori.pyx
-fi
- I replaced polybori-0.6.4.spkg with http://sage.math.washington.edu/home/mvngu/spkg/standard/polybori/polybori-0.6.4.p0.spkg The latter spkg restores the command "remove_dynlib". I then built Sage 4.4.1.alpha2 from scratch on sage.math with polybori-0.6.4.p0.spkg. Doctesting resulted in the following failure: [mvngu@sage sage-4.4.1.alpha2]$ ./sage -t -long local/lib/python2.6/site-packages/sagenb-0.8-py2.6.egg/sagenb/misc/misc.py
sage -t -long "local/lib/python2.6/site-packages/sagenb-0.8-py2.6.egg/sagenb/misc/misc.py"
**********************************************************************
File "/dev/shm/mvngu/sandbox/sage-4.4.1.alpha2/local/lib/python2.6/site-packages/sagenb-0.8-py2.6.egg/sagenb/misc/misc.py", line 109:
sage: print "ignore this"; sage.server.misc.find_next_available_port('', 9000, verbose=False) # random output -- depends on network
Exception raised:
Traceback (most recent call last):
File "/dev/shm/mvngu/sandbox/sage-4.4.1.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/dev/shm/mvngu/sandbox/sage-4.4.1.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/dev/shm/mvngu/sandbox/sage-4.4.1.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_2[2]>", line 1, in <module>
print "ignore this"; sage.server.misc.find_next_available_port('', Integer(9000), verbose=False) # random output -- depends on network###line 109:
sage: print "ignore this"; sage.server.misc.find_next_available_port('', 9000, verbose=False) # random output -- depends on network
File "/dev/shm/mvngu/sandbox/sage-4.4.1.alpha2/local/lib/python/site-packages/sage/server/misc.py", line 105, in find_next_available_port
for port in range(start, start+max_tries+1):
File "element.pyx", line 1271, in sage.structure.element.RingElement.__add__ (sage/structure/element.c:10830)
File "coerce.pyx", line 765, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:6966)
TypeError: unsupported operand parent(s) for '+': '<type 'str'>' and 'Integer Ring' I have wrapped up a sage.math binary of this patched version of Sage 4.4.1.alpha2. You can find it at I removed the directory
and wrapped up a source distribution, which can be found at http://sage.math.washington.edu/home/mvngu/sage-src/sage-4.4.1.alpha2-patched.tar |
comment:32
I'm wondering if we should create a new ticket for this new polybori p0 spkg. |
comment:33
I created ticket #8830 for the p0 spkg. |
Changed merged from 4.4.1.alpha1 to sage-4.4.1.alpha1 |
minimalElements
->minimal_elements
lead/lex_lead/lead_deg/lex_lead_deg
also for Variable/MonomialBOOST_LIBRARY
,SHCFLAGS
,SHCCFLAGS
, andSHCXXFLAGS
pwd.h
)This should be relatively straight forward then.
CC: @sagetrac-PolyBoRi @burcin
Component: packages: standard
Author: Alexander Dreyer, Burcin Erocal
Reviewer: Martin Albrecht
Merged: sage-4.4.1.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/8192
The text was updated successfully, but these errors were encountered: