Opened 9 years ago
Closed 9 years ago
#12754 closed defect (duplicate)
Fix scoping / name look-up issue in PolyBoRi 0.8.1 and support flags from the environment
Reported by: | AlexanderDreyer | Owned by: | AlexanderDreyer |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | algebra | Keywords: | |
Cc: | leif, PolyBoRi, malb, burcin | Merged in: | |
Authors: | Reviewers: | Alexander Dreyer, Leif Leonhardy, Martin Albrecht, Burcin Erocal | |
Report Upstream: | Reported upstream. Little or no feedback. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #12750 | Stopgaps: |
Description (last modified by )
The following was found out here: http://groups.google.com/group/sage-release/browse_thread/thread/e2a87c73dc1625f2
* PolyBoRi fails to build due to stricter (C++11) scoping / name look-up rules. Unfortunately PolyBoRi doesn't honor CXXFLAGS, so I had to use CXX="g++-4.7.0 -fpermissive" to make the spkg build.
The scoping issue should be fixed here: https://bitbucket.org/brickenstein/polybori/changeset/43b3931ceed7/raw/
Also, we should support CXXFLAGS and CFLAGS (ANd CPPFLAGS?) in the spkg.
We just have to merge the latest changes from polybori-0.8.0.p2 in #12750 :
This fixes building with GCC-4.7.0, see #12751 for the GCC-4.7.0 metaticket as well as building on Solaris and OpenSolaris, see #12655.
Current spkg
Change History (10)
comment:1 Changed 9 years ago by
- Owner changed from AlexGhitza to AlexanderDreyer
comment:2 Changed 9 years ago by
- Description modified (diff)
comment:3 Changed 9 years ago by
- Status changed from new to needs_review
comment:4 Changed 9 years ago by
- Description modified (diff)
comment:5 Changed 9 years ago by
- Dependencies set to #12750
- Reviewers changed from leif, PolyBoRi, malb, burcin to Leif Leonhardy, Martin Albrecht, Burcin Erocal
comment:6 follow-ups: ↓ 7 ↓ 8 Changed 9 years ago by
- Cc leif PolyBoRi malb burcin added
comment:7 in reply to: ↑ 6 Changed 9 years ago by
comment:8 in reply to: ↑ 6 Changed 9 years ago by
For convenience I put the diffs of patchsets here (they arise from merging #12750 into #12655):
-
diff-0.8.1.
old new 1 diff -r f05b48d16bc7 -r 0ff1dee2843eSPKG.txt1 diff -r 82bcfd079628 -r 666438ae9200 SPKG.txt 2 2 --- a/SPKG.txt Mon Mar 12 16:08:02 2012 +0100 3 +++ b/SPKG.txt Thu Mar 22 17:21:37 2012 +01004 @@ -36, 6 +36,10@@3 +++ b/SPKG.txt Mon Mar 26 23:47:06 2012 +0200 4 @@ -36,8 +36,15 @@ 5 5 * png/libpng12 (accomplished because Python and gd depend on it, too) 6 6 * libz (accomplished because e.g. libpng depends on it) 7 7 … … 11 11 + 12 12 == Releases == 13 13 14 +=== polybori-0.8.1.p1 (Alexander Dreyer, March 26th, 2012) === 15 + * Rebased spkg on polybori-0.8.0.p2 16 + 14 17 === polybori-0.8.1.p0 (Alexander Dreyer, March 7th, 2012) === 15 diff -r f05b48d16bc7 -r 0ff1dee2843e custom.py 18 * Updating sources to PolyBoRi's release 0.8.1 19 20 diff -r 82bcfd079628 -r 666438ae9200 custom.py 16 21 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 17 +++ b/custom.py Thu Mar 22 17:21:37 2012 +010018 @@ -0,0 +1, 64@@22 +++ b/custom.py Mon Mar 26 23:47:06 2012 +0200 23 @@ -0,0 +1,73 @@ 19 24 +import os 20 25 +import sys 21 26 + 22 27 +# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the user)? 23 +CCFLAGS=["-O3 -Wno-long-long -Wreturn-type -g -fPIC"] 24 +#CXXFLAGS=CCFLAGS+["-ftemplate-depth-100 -g -fPIC"] 25 +CXXFLAGS=CCFLAGS+["-ftemplate-depth-100"] 28 +# Answer: Should be fixed now. 29 +CCFLAGS += ["-Wno-long-long", "-Wreturn-type"] 30 + 31 +# Note: PolyBoRi still appends DEFAULT_*FLAGS (overwrite those, if necessary) 32 +if 'CFLAGS' in os.environ: 33 + CFLAGS = os.environ['CFLAGS'].split(' ') 34 + 35 +if 'CXXFLAGS' in os.environ: 36 + CXXFLAGS = os.environ['CXXFLAGS'].split(' ') 37 + 38 +if 'CPPFLAGS' in os.environ: 39 + CCFLAGS = os.environ['CPPFLAGS'].split(' ') 26 40 + 27 41 +GD_LIBS+=["png12","z"] 28 42 + … … 80 94 + CXX = os.environ['CXX'] 81 95 +except: 82 96 + pass 83 diff -r f05b48d16bc7 -r 0ff1dee2843epatches/PyPolyBoRi.patch97 diff -r 82bcfd079628 -r 666438ae9200 patches/PyPolyBoRi.patch 84 98 --- a/patches/PyPolyBoRi.patch Mon Mar 12 16:08:02 2012 +0100 85 99 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 86 100 @@ -1,253 +0,0 @@ … … 337 351 -+Polynomial = PolynomialFactory() 338 352 -+Variable = VariableFactory() 339 353 - 340 diff -r f05b48d16bc7 -r 0ff1dee2843epatches/PyPolyBoRi.py354 diff -r 82bcfd079628 -r 666438ae9200 patches/PyPolyBoRi.py 341 355 --- a/patches/PyPolyBoRi.py Mon Mar 12 16:08:02 2012 +0100 342 356 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 343 357 @@ -1,47 +0,0 @@ … … 388 402 -Polynomial = PolynomialFactory() 389 403 -Variable = VariableFactory() 390 404 - 391 diff -r f05b48d16bc7 -r 0ff1dee2843e patches/custom.py 405 diff -r 82bcfd079628 -r 666438ae9200 patches/base_lookup.patch 406 --- a/patches/base_lookup.patch Mon Mar 12 16:08:02 2012 +0100 407 +++ b/patches/base_lookup.patch Mon Mar 26 23:47:06 2012 +0200 408 @@ -8,7 +8,7 @@ 409 diff -r 617ce1a715329d16e5ebde0bfdde9c4d09072451 -r 43b3931ceed7b57c4c5385442de6ff45bd0f477c libpolybori/include/polybori/iterators/CTermStack.h 410 --- a/libpolybori/include/polybori/iterators/CTermStack.h Mon Mar 19 22:53:46 2012 +0100 411 +++ b/libpolybori/include/polybori/iterators/CTermStack.h Wed Mar 21 22:18:37 2012 +0100 412 -@@ -853,7 +853,7 @@ 413 +@@ -854,7 +854,7 @@ 414 PBORI_ASSERT(m_zero.isValid()); 415 PBORI_ASSERT(m_zero.isEmpty()); 416 417 diff -r 82bcfd079628 -r 666438ae9200 patches/custom.py 392 418 --- a/patches/custom.py Mon Mar 12 16:08:02 2012 +0100 393 419 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 394 @@ -1, 64+0,0 @@420 @@ -1,75 +0,0 @@ 395 421 -import os 396 422 -import sys 397 423 - 398 424 -# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the user)? 425 -# Note: there will be better ways in PolyBoRi 0.8.1 399 426 -CCFLAGS=["-O3 -Wno-long-long -Wreturn-type -g -fPIC"] 400 427 -#CXXFLAGS=CCFLAGS+["-ftemplate-depth-100 -g -fPIC"] 401 428 -CXXFLAGS=CCFLAGS+["-ftemplate-depth-100"] 429 -CFLAGS=["-std=c99"] 430 - 431 -if 'CFLAGS' in os.environ: 432 - CFLAGS += os.environ['CFLAGS'].split(' ') 433 - 434 -if 'CXXFLAGS' in os.environ: 435 - CXXFLAGS += os.environ['CXXFLAGS'].split(' ') 436 - 437 -if 'CPPFLAGS' in os.environ: 438 - CCFLAGS += os.environ['CPPFLAGS'].split(' ') 402 439 - 403 440 -GD_LIBS+=["png12","z"] 404 441 - … … 456 493 - CXX = os.environ['CXX'] 457 494 -except: 458 495 - pass 459 diff -r f05b48d16bc7 -r 0ff1dee2843epatches/gbcore.py.patch496 diff -r 82bcfd079628 -r 666438ae9200 patches/gbcore.py.patch 460 497 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 461 +++ b/patches/gbcore.py.patch Thu Mar 22 17:21:37 2012 +0100498 +++ b/patches/gbcore.py.patch Mon Mar 26 23:47:06 2012 +0200 462 499 @@ -0,0 +1,33 @@ 463 500 +# HG changeset patch 464 501 +# User Alexander Dreyer <adreyer@gmx.de> … … 493 530 + ocode=old_ring.get_order_code() 494 531 + try: 495 532 + new_ring = old_ring.clone(ordering=options["switch_to"]) 496 diff -r f05b48d16bc7 -r 0ff1dee2843epatches/ipbori.patch533 diff -r 82bcfd079628 -r 666438ae9200 patches/ipbori.patch 497 534 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 498 +++ b/patches/ipbori.patch Thu Mar 22 17:21:37 2012 +0100535 +++ b/patches/ipbori.patch Mon Mar 26 23:47:06 2012 +0200 499 536 @@ -0,0 +1,24 @@ 500 537 +# HG changeset patch 501 538 +# User Alexander Dreyer <adreyer@gmx.de> … … 521 558 + except: 522 559 + return False 523 560 + 524 diff -r f05b48d16bc7 -r 0ff1dee2843epatches/nf.h.patch561 diff -r 82bcfd079628 -r 666438ae9200 patches/nf.h.patch 525 562 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 526 +++ b/patches/nf.h.patch Thu Mar 22 17:21:37 2012 +0100563 +++ b/patches/nf.h.patch Mon Mar 26 23:47:06 2012 +0200 527 564 @@ -0,0 +1,19 @@ 528 565 +# HG changeset patch 529 566 +# User Alexander Dreyer <adreyer@gmx.de> … … 544 581 + extern "C"{ 545 582 + #include <m4ri/m4ri.h> 546 583 + 547 diff -r f05b48d16bc7 -r 0ff1dee2843espkg-install584 diff -r 82bcfd079628 -r 666438ae9200 spkg-install 548 585 --- a/spkg-install Mon Mar 12 16:08:02 2012 +0100 549 +++ b/spkg-install Thu Mar 22 17:21:37 2012 +0100550 @@ -10, 17+10,30 @@586 +++ b/spkg-install Mon Mar 26 23:47:06 2012 +0200 587 @@ -10,21 +10,30 @@ 551 588 WORKDIR=${PWD}/src 552 589 SCONS=scons 553 590 554 -p atch()591 -prepare() 555 592 +prepare_polybori() 556 593 { 557 594 if [ $UNAME = "CYGWIN" ]; then … … 561 598 - cp patches/custom.py src/${PBDIR} 562 599 - cp patches/PyPolyBoRi.py src/${PBDIR}/pyroot/polybori 563 600 + cd ${PBDIR} 564 + 601 602 - cd ${WORKDIR}/${PBDIR} 603 - patch -p1 < ../../patches/base_lookup.patch 565 604 + # place configuration file 566 605 + cp ../../custom.py . 567 606 + … … 575 614 + fi 576 615 + done 577 616 + 578 +cd ${WORKDIR}617 cd ${WORKDIR} 579 618 } 580 619 581 620 - 582 621 build_polybori() 583 622 { 584 623 cd ${PBDIR} 585 @@ - 57,9+70,9 @@624 @@ -61,8 +70,9 @@ 586 625 rm -rf ${SAGE_LOCAL}/include/cudd 587 626 } 588 627 589 -p atch628 -prepare 590 629 +cd ${WORKDIR} 591 630 592 -cd src593 631 +prepare_polybori 594 595 632 echo "Starting build..." 596 633 634 echo "Removing old PolyBoRi install..."
comment:9 Changed 9 years ago by
- Milestone changed from sage-5.0 to sage-duplicate/invalid/wontfix
- Reviewers changed from Leif Leonhardy, Martin Albrecht, Burcin Erocal to Alexander Dreyer, Leif Leonhardy, Martin Albrecht, Burcin Erocal
- Status changed from needs_review to positive_review
comment:10 Changed 9 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
- Summary changed from Fix scoping / name look-up issue und PolyBoRi 0.8.1 and support flags from the envrionment to Fix scoping / name look-up issue in PolyBoRi 0.8.1 and support flags from the environment
So we now have the same spkgs at #12655 and here?
I've added #12655 as a dependency, as someoneTM should (independently) review the upgrade there, such that we here just have to review that the changes coming from #12750 are properly merged.
(Alternatively, we could just make #12655 depend on #12750, which already has positive review, and probably close this ticket as a duplicate of #12750.)
[Argh, concurrent editing, with a slow connection on my side btw. -- you now already changed the reviewers and added #12750 as a dependency...]