#20892: package polymake 3.0
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.3
      Component:  packages:          |   Resolution:
  optional                           |
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/20892                 |  c4b2b0edba372135bf46b1459a4e5a3d9be7205d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by mkoeppe):

 I solved the problem on Mac OS X with the following patch for Polymake,
 which gets rid of various "-arch" options. The "-arch" options caused the
 above errors "register %rbp is only available in 64-bit mode" etc.

 {{{
 --- /Users/mkoeppe/s/polymake-3.0/support/configure.pl  2016-01-25
 05:34:27.000000000 -0800
 +++ src/support/configure.pl    2016-06-27 16:13:24.000000000 -0700
 @@ -503,7 +503,7 @@
        }
        print "ok\n";
        if ( $NeedsArchFlag ) {
 -         $ARCHFLAGS="-arch $Platform";
 +         $ARCHFLAGS="";
        } else {
           $ARCHFLAGS="";
        }
 @@ -525,7 +525,7 @@
           }
        }
        if ( $NeedsArchFlag ) {
 -         $ARCHFLAGS="-arch $Platform";
 +         $ARCHFLAGS="";
        } else {
           $ARCHFLAGS="";
        }
 @@ -738,7 +738,14 @@
        # We also build a test program for libperl since e.g. on Debian
 based systems the
        # check for Config::Config{libperl} will not detect a missing
 libperl-dev package
        chomp(my $perlldflags = `$PERL -MExtUtils::Embed -e ldopts`);
 -      my $build_error=build_test_program(<<'---', CXXflags => `$PERL
 -MExtUtils::Embed -e ccopts`, LDflags => "$ARCHFLAGS $perlldflags" );
 +
 +      my $allarch=qr/ -arch \s+ \S+ (?: \s+ -arch \s+ \S+)* /x;
 +      $CXXflags =  `$PERL -MExtUtils::Embed -e ccopts` ;
 +      $CXXflags =~ s/$allarch//o;
 +      $LDflags = $perlldflags;
 +      $LDflags =~ s/$allarch//o;
 +
 +      my $build_error=build_test_program(<<'---', CXXflags => $CXXflags ,
 LDflags => $LDflags );
  #include <EXTERN.h>
  #include <perl.h>

 }}}

 And here is a quick change to `spkg-install`.
 {{{
 diff --git a/build/pkgs/polymake/spkg-install b/build/pkgs/polymake/spkg-
 install
 index f8e6145..2198466 100755
 --- a/build/pkgs/polymake/spkg-install
 +++ b/build/pkgs/polymake/spkg-install
 @@ -7,6 +7,7 @@ cd src
              --exec-prefix="$SAGE_LOCAL" \
              --includedir="$SAGE_LOCAL"/include \
              --bindir="$SAGE_LOCAL"/bin \
 -            --libdir="$SAGE_LOCAL"/lib
 +            --libdir="$SAGE_LOCAL"/lib \
 +           --without-fink
  make
  make install
 }}}

 With these changes, Polymake built successfully.

--
Ticket URL: <https://trac.sagemath.org/ticket/20892#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to