Skip to content
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

Allow Sage to build and run on old Macs on last time #17513

Closed
kcrisman opened this issue Dec 16, 2014 · 14 comments
Closed

Allow Sage to build and run on old Macs on last time #17513

kcrisman opened this issue Dec 16, 2014 · 14 comments

Comments

@kcrisman
Copy link
Member

Modulo gcc 4.9, of course, though in principle one could ask for a message asking to build gcc 4.7 first.

We need the following

  • This is not supported by at least some shells.
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
    sage-cleaner &>/dev/null &
    exec sage-notebook "$@"
fi

including

$ bash --version
GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)
Copyright (C) 2002 Free Software Foundation, Inc.
EXTRA_BLAS=""
if [ $UNAME = "Darwin" ]; then
    # copy cblas headers from gsl
    cp ../patches/gsl_cblas.h cblas.h
    EXTRA_BLAS="--with-cblas=-lgslcblas"
fi

to fix this.

Component: porting

Reviewer: Karl-Dieter Crisman, Jeroen Demeyer

Issue created by migration from https://trac.sagemath.org/ticket/17513

@kcrisman kcrisman added this to the sage-6.5 milestone Dec 16, 2014
@kcrisman
Copy link
Member Author

kcrisman commented Jan 5, 2015

comment:1

Not formal patch for iml, but at least for very old Darwin

 EXTRA_BLAS=""
 if [ $UNAME = "Darwin" ]; then
     # copy cblas headers from gsl
     cp ../patches/gsl_cblas.h cblas.h
-    EXTRA_BLAS="--with-cblas=-lcblas"
+    EXTRA_BLAS="--with-cblas=-lgslcblas"
 fi

@kcrisman
Copy link
Member Author

kcrisman commented Jan 6, 2015

comment:2

Fix from sage-devel:

if [ "${1:0:11}" = "--notebook=" ] || [ "${1:0:10}" = "-notebook=" ] || [ "${1:0:3}" = "-n=" ]; then

@kcrisman
Copy link
Member Author

kcrisman commented Jan 6, 2015

comment:3

For reference

diff --git a/src/bin/sage b/src/bin/sage
index ca07760..a5d2dae 100755
--- a/src/bin/sage
+++ b/src/bin/sage
@@ -641,7 +641,7 @@ build_sage() {
     sage-build "$@" || exit $?
 }
 
-if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
+if [ "${1:0:11}" = "--notebook=" ] || [ "${1:0:10}" = "-notebook=" ] || [ "${1:0:3}" = "-n=" ]; then
     sage-cleaner &>/dev/null &
     exec sage-notebook "$@"
 fi

@kcrisman
Copy link
Member Author

kcrisman commented Jan 6, 2015

comment:4

And

diff --git a/build/pkgs/iml/spkg-install b/build/pkgs/iml/spkg-install
index 7940695..1241f3e 100755
--- a/build/pkgs/iml/spkg-install
+++ b/build/pkgs/iml/spkg-install
@@ -35,7 +35,7 @@ EXTRA_BLAS=""
 if [ $UNAME = "Darwin" ]; then
     # copy cblas headers from gsl
     cp ../patches/gsl_cblas.h cblas.h
-    EXTRA_BLAS="--with-cblas=-lcblas"
+    EXTRA_BLAS="--with-cblas=-lgslcblas"
 fi
 
 ./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" \

@jpflori
Copy link

jpflori commented Jan 13, 2015

comment:5

For old Darwin isn't IML_CONFIGURE="--with-cblas=-lcblas -latlas ok?
(Copying the header should not be necessary.)

@kcrisman
Copy link
Member Author

comment:6

Probably, I was just going for minimal changes to current files for my own ease. It is very, very slow to try this for me because I have to have access to the machines and nothing better to do and then it takes a while to do it because they are old.

@jpflori
Copy link

jpflori commented Jan 14, 2015

comment:7

Oh, maybe -lblas is needed.
See

if conf['PPC?']:   # OSX 10.4 PPC linker needs help to find the accelerate blas
        veclib_dir = '/System/Library/Frameworks/Accelerate.framework/' + \
            'Versions/A/Frameworks/vecLib.framework/Versions/A'
        for lib in [ 'libBLAS.dylib', 'libLAPACK.dylib']:
            ln(os.path.join(veclib_dir, lib),
               os.path.join(conf['SAGE_LOCAL'], 'lib', lib))

in our ATLAS install script.

@jdemeyer
Copy link

jdemeyer commented Sep 8, 2015

comment:8

If anybody going to work on this? Otherwise we might as well close it. This ticket is only becoming more and more obsolete...

@jdemeyer jdemeyer modified the milestones: sage-6.5, sage-6.9 Sep 8, 2015
@kcrisman
Copy link
Member Author

kcrisman commented Sep 8, 2015

comment:9

Still got an eMac sitting in my office waiting for me to fire up again... I had a very busy spring and summer with very little Sage time. With some luck this fall will be different. You are right about the obsolescence but let's just see.

@kcrisman
Copy link
Member Author

comment:10

#17466 suggests maybe there is no fix needed any more on IML. I will check that out.

@kcrisman
Copy link
Member Author

comment:11

I think I have given up. I did make the Sage 6.4.1 binaries and that should make people happy for a while, so I guess one could even say I was partly successful with this ticket.

Everything is still documented here in case someone else wanted to try for a newer Sage, also - I really don't think it would be that hard except for the gcc issue. Apparently #19370 fixes #16044, which is nice. I'm not sure if #17510 is only for this platform or not.

@kcrisman kcrisman removed this from the sage-6.9 milestone Oct 16, 2015
@kcrisman
Copy link
Member Author

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member Author

comment:12

I'll ask for another reviewer on this to confirm the sad closure.

@kcrisman
Copy link
Member Author

Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Jeroen Demeyer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants