Opened 11 years ago

Closed 11 years ago

#11297 closed defect (fixed)

altivec must be disabled for ECL on PPC OSX 10.5

Reported by: dimpase Owned by: GeorgSWeber
Priority: blocker Milestone: sage-4.7
Component: packages: standard Keywords: PPC, MacOSX 10.5, ECL
Cc: fbissey, kcrisman Merged in: sage-4.7.rc2
Authors: Dmitrii Pasechnik Reviewers: François Bissey
Report Upstream: Reported upstream. Little or no feedback. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by dimpase)

ECL 11.1.1.p0 spkg does not build on MacOSX PPC (G4) running MacOSX 10.5, and using XCode 3.1.4 (the lastest XCode for this platform). Symptoms: a crash half-way the build, at the log point

;;; About to load cmp/load.lsp 
;;; 
;;; Now we are in shape to do something useful. 
;;; End of bare.lsp

it can be:

Internal or unrecoverable error in: 
not a lisp data object 
  [2: No such file or directory] 

or

Detected access to an invalid or protected memory address. 
Available restarts: 
1. (CONTINUE) Ignore signal

or

64 is an illegal index to "Variable in COMMON-LISP package: 
The last-but-one top-level forme". 
No restarts available. 

or perhaps something else like this. This is apparently due to an ECL bug having to do with altivec instructions. Configuring with

./configure CFLAGS="-mno-altivec -mabi=no-altivec"

makes the ECL build OK. See https://groups.google.com/group/sage-devel/browse_thread/thread/55313fb49133b97/8cbd9ac8826ef685#8cbd9ac8826ef685

for more info on this.

The new spkg is at http://boxen.math.washington.edu/home/dima/packages/ecl-11.1.1.p1.spkg

tested OK on MacOSX 10.5 PPC (and on few non-PPC systems just to make sure it's OK). Needs testing on more MacOSX PPC systems.

Change History (11)

comment:1 Changed 11 years ago by dimpase

  • Milestone changed from sage-4.7.1 to sage-4.7

comment:2 Changed 11 years ago by dimpase

so this is the proposed patch for spkg-install in ecl-11.1.1.p0.spkg

diff -r 492613112d08 spkg-install
--- a/spkg-install	Wed Mar 23 10:24:48 2011 +1300
+++ b/spkg-install	Thu May 05 14:08:59 2011 +0800
@@ -83,6 +83,9 @@
    # 2) Intel or AMD CPU 
    # 3) 64-bit build
    ./configure --prefix="$SAGE_LOCAL" --with-dffi=no
+elif [ "`uname -sm`" = "Darwin Power Macintosh" ] ; then
+   # disbaling altivec instructions (trac 11297)
+     ./configure --prefix="$SAGE_LOCAL" CFLAGS="$CFLAGS -mno-altivec -mabi=no-altivec" 
 else
    ./configure --prefix="$SAGE_LOCAL" 
 fi

comment:3 Changed 11 years ago by fbissey

Looks reasonable. I am not I can cut yet another ecl spkg today. Actually work is peaking up so if someone else wants to pick that up it'd be great.

As I noted in the thread this may need to be followed by the addition of the same CFLAGS when you build sage/libs/ecl.pyx. This can be done with platform specific instructions.

I can review if I cannot cut it.

comment:4 follow-up: Changed 11 years ago by jdemeyer

I think having an argument CFLAGS and a conflicting environment variable CFLAGS is asking for touble. Why not simply do

if [ "`uname -sm`" = "Darwin Power Macintosh" ] ; then
    CFLAGS="$CFLAGS -mno-altivec -mabi=no-altivec"
    export CFLAGS
fi

The ticket mentions "Reported upstream. Little or no feedback." How was this reported? Can you put a link to the relevant mailing list post or bug tracker page?

comment:5 Changed 11 years ago by fbissey

I know I never reported it upstream.

comment:6 Changed 11 years ago by dimpase

I reported this on an ECL bug tracker on sourceforge.

comment:7 in reply to: ↑ 4 Changed 11 years ago by dimpase

  • Cc kcrisman added
  • Description modified (diff)
  • Status changed from new to needs_review

Replying to jdemeyer:

I think having an argument CFLAGS and a conflicting environment variable CFLAGS is asking for touble. Why not simply do

if [ "`uname -sm`" = "Darwin Power Macintosh" ] ; then
    CFLAGS="$CFLAGS -mno-altivec -mabi=no-altivec"
    export CFLAGS
fi

OK, I've created an spkg with this patch (link in the ticket description).

comment:8 follow-up: Changed 11 years ago by fbissey

  • Status changed from needs_review to positive_review

I am happy with your change and the spkg is correct and hg committed. I will give this a positive review. As I mentioned on sage-devel the problem with sage/libs/ecl.pyx would only happen with a more recent compiler - none will be shipped by apple and we can only hope that non-apple ones will not have altivec enabled by default.

There will be a small (but not blocking) matter that I have noticed in your build log. If confirmed it will go in another ticket for 4.7.1. Can you confirm whether or not you are using the sage installed boehm_gc or the ecl internal copy with your new spkg? Like I said in the log you posted the internal copy was used. It is not impossible that fixing the flags also solved that but we should check more widely what happens on computers where bohem_gc is not installed as part of the system.

comment:9 in reply to: ↑ 8 Changed 11 years ago by dimpase

Replying to fbissey:

There will be a small (but not blocking) matter that I have noticed in your build log. If confirmed it will go in another ticket for 4.7.1. Can you confirm whether or not you are using the sage installed boehm_gc or the ecl internal copy with your new spkg? Like I said in the log you posted the internal copy was used. It is not impossible that fixing the flags also solved that but we should check more widely what happens on computers where bohem_gc is not installed as part of the system.

it might be you saw a log on a stand-alone compilation attempt (which would certainly use the built0in gc). I certainly did not tweak the flags in the spkg that deal with this, so whatever setting is currently in Sage remains.

comment:10 Changed 11 years ago by jdemeyer

  • Authors set to Dmitrii Pasechnik
  • Component changed from build to packages
  • Reviewers set to François Bissey

comment:11 Changed 11 years ago by jdemeyer

  • Merged in set to sage-4.7.rc2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.