I've now opened a trac ticket: #16919 <http://trac.sagemath.org/ticket/16919> new <http://trac.sagemath.org/query?status=new> defect <http://trac.sagemath.org/query?status=%21closed&type=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: > > Did you open a trac ticket to fix the sage-bdist script? > > > On Monday, September 1, 2014 2:17:57 PM UTC+1, Daniel Friedan wrote: >> >> 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 >> >> -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.