volunteering to produce Mac OS X 10.6 .app versions

33 views
Skip to first unread message

Daniel Friedan

unread,
Sep 1, 2014, 9:17:57 AM9/1/14
to sage-s...@googlegroups.com
I believe I've now succeeded in building a Mac OS X 10.6 .app version
of Sage 6.3 (with help recorded in a separate thread).

I had to fix a mistake in the file src/bin/sage-bdist (a mistake
that affects the official OS X .app builds), and I also had to
make a few other changes to that file.  (Details at the end of
this posting.)

I'd be happy to upload
  sage-6.3-x86_64-Darwin-app.dmg
if somebody will tell me how to do it.

I'd also be happy to volunteer to produce future Mac OS X 10.6
.app versions.

I'm a bit unsure that I've done enough to validate the build:
    (1) 'make' finishes with no error message at the end
    (2) './sage -bdist' finishes with "** BUILD SUCCEEDED **"
    (3) the 'file' commands
          $ file Sage-6.3.app/Contents/MacOS/Sage
          $ file Sage-6.3.app/Contents/Resources/sage/local/bin/*
          $ file Sage-6.3.app/Contents/Resources/sage/local/lib/*
        show all architectures are 64-bit.
    (4) Sage-6.3.app runs under OS X 10.6.8
    (5) a sample workbook executes properly

Is there more that one should do to validate the build?

Is there any way to tell from inside Sage that it is running in
64-bit mode?

The output from '$ ./sage -bdist' showed some strange looking command line options:
      -mmacosx-version-min=10.4
and
       setenv MACOSX_DEPLOYMENT_TARGET 10.4
and gave a warning:       
    <built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi

Why do these command line options refer to '10.4'?

==============================================
Procedure for building a Mac OS X 10.6 .app version of Sage 6.3

(1) The file src/bin/sage-bdist contains a mistake:
       'ARCHES' should be 'ARCHS'.
The effect of the mistake is that the OS X application is
always built as 32-bit ('i386').  This can be seen by running
$ file Sage-6.3.app/Contents/MacOS/Sage
in the OS X 10.9 .app version currently being distributed
officially.

(2) sage-bdist uses `uname -m` to determine the target
architecture.  Some of the older 64-bit Macintoshes can only boot into
a 32-bit system.  These machines run 64-bit Sage perfectly well. 
They can make and build 64-bit Sage perfectly well.  The problem is that
`uname -m` returns 'i386'.  I added an environment variable to
override `uname -m` (SAGE_APP_TARGET_ARCH==x86_64).

I also added some code to sage-bdist to append '-app' to the name
of the .dmg file produced.

I also added an environment variable (SAGE_APP_GZ=no) to prevent
the final compression stage, to save time during debugging
sage-bdist.

The procedure that worked for making and building the Mac OS X 10.6 .app
version of Sage 6.3 was:

$ git clone git://github.com/sagemath/sage.git
$ cd sage
$ export MAKE="make -j2"
$ $MAKE
$ cp ../sage-bdist-TARGET_ARCH-app src/bin/sage-bdist
$ git remote add trac git://trac.sagemath.org/sage.git -t master
$ git fetch trac u/iandrus/trac-16796
$ git checkout FETCH_HEAD
$ export SAGE_APP_TARGET_ARCH=x86_64
$ export SAGE_APP_DMG=yes
$ export SAGE_APP_BUNDLE=yes
$ ./sage -bdist

It produced a somewhat smaller version of Sage 6.3 than the
officially distributed OS X 10.6 version.  It looks like the size
difference is due to git stuff.  Starting with a fresh clone
seems worthwhile (cloning is a small fraction of the 'make' time.)

Daniel

Volker Braun

unread,
Sep 1, 2014, 9:24:20 AM9/1/14
to sage-s...@googlegroups.com
Did you open a trac ticket to fix the sage-bdist script?

Daniel Friedan

unread,
Sep 1, 2014, 9:34:57 AM9/1/14
to sage-s...@googlegroups.com
No, I don't have a trac account.  I'm not sure I have the time to satisfy the requirement "Make sure you understand the review process, and the procedures for opening and closing tickets."  I'm already a bit exhausted from debugging the OSX 10.6 build process.

Daniel

Daniel Friedan

unread,
Sep 2, 2014, 6:38:23 AM9/2/14
to sage-s...@googlegroups.com
I've now opened a trac ticket:

#16919 new defect

mistake in sage/src/bin/sage-bdist, OSX app is always built 32-bit


Daniel

On Monday, September 1, 2014 1:24:20 PM UTC, Volker Braun wrote:

kcrisman

unread,
Sep 2, 2014, 9:06:52 AM9/2/14
to sage-s...@googlegroups.com
I believe I've now succeeded in building a Mac OS X 10.6 .app version
of Sage 6.3 (with help recorded in a separate thread).


Great.
Is there any way to tell from inside Sage that it is running in
64-bit mode?

The output from '$ ./sage -bdist' showed some strange looking command line options:
      -mmacosx-version-min=10.4
and
       setenv MACOSX_DEPLOYMENT_TARGET 10.4
and gave a warning:       
    <built-in>:0: warning: Mac OS X version 10.5 or later is needed for use of the new objc abi

Why do these command line options refer to '10.4'?


Just to make sure that we can still (in principle) support that version, though it has not been built for a while (we lost the buildbot for it and I haven't had time to try on one of mine recently).
 
==============================================
Procedure for building a Mac OS X 10.6 .app version of Sage 6.3

(1) The file src/bin/sage-bdist contains a mistake:
       'ARCHES' should be 'ARCHS'.
The effect of the mistake is that the OS X application is
always built as 32-bit ('i386').  This can be seen by running


Nice catch, and I'm surprised we didn't see that before.  Still, I think it's not so bad, though, because the app is a pretty lightweight thing that isn't really going to benefit from the bit.  I assume that the actual Sage binary created (not the app part) is still 64-bit.
Reply all
Reply to author
Forward
0 new messages