#16919: mistake in sage/src/bin/sage-bdist, OSX app is always built 32-bit
-------------------------------------+-------------------------------------
Reporter: dfriedan | Owner:
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-6.4
Component: build | Resolution:
Keywords: OSX, sage-bdist | Merged in:
Authors: Daniel Friedan | Reviewers: Dmitrii Pasechnik,
Report Upstream: N/A | Karl-Dieter Crisman, Ivan Andrus,
Branch: | Frédéric Chapoton
public/ticket/16919 | Work issues:
Dependencies: | Commit:
| a6896adfca7be8e63f6e2a6c9da7f5791bb3965f
| Stopgaps:
-------------------------------------+-------------------------------------
Changes (by dimpase):
* status: needs_work => needs_review
Old description:
> The file sage/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 in the OS X 10.9 app version currently
> being distributed officially by running the unix command
> $ file /Applications/Sage-6.3.app/Contents/MacOS/Sage
> which returns
> /Applications/sage-6.3.app/Contents/MacOS/Sage: Mach-O executable i386
>
> This mistake is probably not terribly significant for running sage code,
> since all the files in sage/local/{bin,lib}/ are 64-bit.
>
> (2) There is a second, more obscure mistake in sage-bdist. sage-bdist
> uses `uname -m` to determine the target architecture. Some 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' on these machines, so sage-bdist uses 'i386' as
> the target architecture.
>
> Attached is modified version of sage-bdist which corrects both mistakes.
> See below for a description of my modifications.
>
> I am NOT going to submit this via 'git trac'. As a neophyte, I don't
> want the responsibility of modifying the build script.
>
> changes in the attached version of sage-bdist:
>
> (1) 'ARCHES' -> 'ARCHS'
>
> (2) I added an environment variable SAGE_APP_TARGET_ARCH to override
> `uname -m`. If one is building Sage on an older 64-bit OSX machine that
> boots into a 32-bit system, one would do
> $ export SAGE_APP_TARGET_ARCH=x86_64
> $ ./sage-bdist
>
> (3) I also added some code to append '-app' to the name
> of the .dmg file produced by sage-bdist. At present, this has to be done
> by hand.
>
> (4) I also added an environment variable (SAGE_APP_GZ=no) to prevent
> the final compression stage, to save time during debugging
> sage-bdist. One would do
> $ export SAGE_APP_GZ=no
> $ export SAGE_APP_DMG=no
> $ ./sage-bdist
> in order to skip the final compression.
New description:
The file sage/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 in the OS X 10.9 app version currently
being distributed officially by running the unix command
$ `file /Applications/Sage-6.3.app/Contents/MacOS/Sage`
which returns
/Applications/sage-6.3.app/Contents/MacOS/Sage: Mach-O executable i386
This mistake is probably not terribly significant for running sage code,
since all the files in sage/local/{bin,lib}/ are 64-bit.
(2) There is a second, more obscure mistake in sage-bdist. sage-bdist
uses `uname -m` to determine the target architecture. Some 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' on these machines, so sage-bdist uses 'i386' as
the target architecture.
Attached is modified version of sage-bdist which corrects both mistakes.
See below for a description of my modifications.
I am NOT going to submit this via 'git trac'. As a neophyte, I don't want
the responsibility of modifying the build script.
changes in the attached version of sage-bdist:
(1) 'ARCHES' -> 'ARCHS'
(2) I added an environment variable SAGE_APP_TARGET_ARCH to override
`uname -m`. If one is building Sage on an older 64-bit OSX machine that
boots into a 32-bit system, one would do
$ export SAGE_APP_TARGET_ARCH=x86_64
$ ./sage-bdist
(3) I also added some code to append '-app' to the name
of the .dmg file produced by sage-bdist. At present, this has to be done
by hand.
(4) I also added an environment variable (SAGE_APP_GZ=no) to prevent
the final compression stage, to save time during debugging
sage-bdist. One would do
$ export SAGE_APP_GZ=no
$ export SAGE_APP_DMG=no
$ ./sage-bdist
in order to skip the final compression.
--
Comment:
done. apparently `SAGE_APP_BUNDLE` existed before, but wasn't documented
either.
--
Ticket URL: <http://trac.sagemath.org/ticket/16919#comment:16>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.