On 2012-11-30, Jean-Pierre Flori <jpf...@gmail.com> wrote:
> ------=_Part_1212_10818395.1354274078891
> Content-Type: text/plain; charset=ISO-8859-1
>
> Dear all,
>
> While updating MPIR in #13137, we remarked the old fix for compilation on
> OSX 10.4 (and maybe 10.5) running in 32 bit mode on 64 bit Intel hardware
> was not maintained properly and does not do what it was supposed to do
> anymore.
> This is not so bad because it seems to indicate that the fix is actually
> not needed anymore (or someone would have complained at some point), not
> sure why, maybe now MPIR uses YASM to compile the problematic files on OSX
> (which were renamed but whose content did not change).
>
> Could someone test the updated spkg on the setup mentioned above to check
> our assumption is correct?
> Or does nobody use such a setup anymore?
I imagine that everyone on Intel OSX 10.4/5 upgraded to 10.6 ages ago.
I still have a G4 PPC OSX 10.5 working system lying around.
Not sure if it makes sense to test what you ask for on it, though.
- Greg McWhirter
Unfortunately (for me at least) it is still broken as of this morning. I was unable to compile 4.5.1 or upgrade from 5.0 as a result on 10.5. hat information would be useful for potentially pursuing a fix?- Greg McWhirter
Ah, yes. It was with the older 2.4 (2.4.0.p6). I should have confirmed that it was the same one before replying. Sorry for the potential confusion there.At any rate, the last bits of the log are appended below (and if you need more, let me know). I'd be happy to help test future changes as well, since this machine will likely not be upgraded past 10.5.8 anytime soon.- GregLog snip:/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" /usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo rshift | sed 's/_$//'` -I. -I.. `test -f 'rshift.asm' || echo './'`rshift.asmlibtool: compile: ../mpn/m4-ccas --m4=m4 /usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_rshift -I. -I.. rshift.asm -fno-common -DPIC -o .libs/rshift.om4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_rshift -DPIC rshift.asm >tmp-rshift.s/usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_rshift -I. -I.. tmp-rshift.s -fno-common -DPIC -o .libs/rshift.o/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" /usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo divexact_1 | sed 's/_$//'` -I. -I.. `test -f 'divexact_1.asm' || echo './'`divexact_1.asmlibtool: compile: ../mpn/m4-ccas --m4=m4 /usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_divexact_1 -I. -I.. divexact_1.asm -fno-common -DPIC -o .libs/divexact_1.om4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_divexact_1 -DPIC divexact_1.asm >tmp-divexact_1.s/usr/bin/gcc-4.2 -std=gnu99 -c -DHAVE_CONFIG_H -m32 -O2 -fomit-frame-pointer -mtune=core2 -march=core2 -g -D__GMP_WITHIN_GMP -I.. -DOPERATION_divexact_1 -I. -I.. tmp-divexact_1.s -fno-common -DPIC -o .libs/divexact_1.otmp-divexact_1.s:120:junk `@GOT' after expressionmake[5]: *** [divexact_1.lo] Error 1make[4]: *** [all-recursive] Error 1make[3]: *** [all] Error 2Error building MPIR.
Updated spkg at http://boxen.math.washington.edu/home/jpflori/mpir-2.6.0.p0.spkg removing the files again.
Could you try it again? Hopefully this one should be ok.
Could you provide us the full log (on the 5.4.1 from source install which looks saner than the other one, but having both should not hurt.
Running "sage -i ..." on the new spkg still fails for me. The log files I have put in a dropbox so it doesn't spam the lists with them. The links are below. I have also included dumps of the requested grep command. These are for 5.4.1 source, both with the apple gcc 4.2 and 4.0.1.The result of ./config.guess is "nehalem-apple-darwin9.8.0" after doing (cd '/Users/gmcwhirt/sage-5.4.1/spkg/build/mpir-2.6.0.p0' && '/Users/gmcwhirt/sage-5.4.1/sage' -sh).
To be clear, this is against a sage 5.4.1 source download, not an actual build, in case that matters (I can't successfully "make" 5.4.1 due to this mpir issue in the 2.4 version that sage is currently shipping).
On Monday, December 3, 2012 5:28:02 PM UTC+1, Greg McWhirter wrote:Running "sage -i ..." on the new spkg still fails for me. The log files I have put in a dropbox so it doesn't spam the lists with them. The links are below. I have also included dumps of the requested grep command. These are for 5.4.1 source, both with the apple gcc 4.2 and 4.0.1.The result of ./config.guess is "nehalem-apple-darwin9.8.0" after doing (cd '/Users/gmcwhirt/sage-5.4.1/spkg/build/mpir-2.6.0.p0' && '/Users/gmcwhirt/sage-5.4.1/sage' -sh).Ok that's not really taken into account by MPIR.
Could you go into the MPIR build dir (or untar the spkg), modify the file configure.in around line 1123 to add the above nehalem-... to the list of cases under the 32 bit apple darwin comment, then run autoreconf -i, then then issuing make again?
From or outside a sage shell should not really matter, as mpir does not have dependencies only sage should provide on your system.
If that's complicated, I'll issue a new spkg.
I tried to patch it, but autoreconf failed (too old by default on 10.5.8 it seems):$ autoreconf -iconfigure.in:32: error: Autoconf version 2.68 or higher is requiredconfigure.in:32: the top levelautom4te: /usr/bin/gm4 failed with exit status: 63aclocal: autom4te failed with exit status: 63autoreconf: aclocal failed with exit status: 63$ autoreconf -Vautoreconf (GNU Autoconf) 2.61Copyright (C) 2006 Free Software Foundation, Inc.This is free software. You may redistribute copies of it under the terms ofthe GNU General Public License <http://www.gnu.org/licenses/gpl.html>.There is NO WARRANTY, to the extent permitted by law.Written by David J. MacKenzie and Akim Demaille.I tried grabbing updated autoconf and automake from Homebrew and manually linking them to /usr/local so they are used by default, but then I ran into issues with libtool when running "make". In the install note from trying to grab libtool from homebrew, it said something about needing to add my own build variables, and I wasn't sure where to do that. It also seems that having to rely on things from homebrew is not particularly helpful for testing default builds, so I reverted all the symlinks back to the OS X defaults.I also tried grabbing the .p1 spkg to try, but got a 404 from the server.
I grabbed the .p1 spkg and did:$ tar xf mpir-2.6.0.p1.spkg$ cd mpir-2.6.0.p1/src$ ./configure$ makeand got the same error (about @GOT). However, now running ./config.guess in that directory results in "i386-apple-darwin9.8.0" instead of the nehalem, and I still cant run autoreconf in that directory (same reason -- too old).
On Monday, December 3, 2012 6:57:28 PM UTC+1, Greg McWhirter wrote:I grabbed the .p1 spkg and did:$ tar xf mpir-2.6.0.p1.spkg$ cd mpir-2.6.0.p1/src$ ./configure$ makeand got the same error (about @GOT). However, now running ./config.guess in that directory results in "i386-apple-darwin9.8.0" instead of the nehalem, and I still cant run autoreconf in that directory (same reason -- too old).Ok the discrepancy of config.guess must be because I used a different version of autotools.
And as the result is now different, it is not catched as well...
I'm updating the spkg with *-apple-darwin* to catch everything.
I grabbed the .p1 spkg and did:$ tar xf mpir-2.6.0.p1.spkg$ cd mpir-2.6.0.p1/src$ ./configure$ makeand got the same error (about @GOT). However, now running ./config.guess in that directory results in "i386-apple-darwin9.8.0" instead of the nehalem, and I still cant run autoreconf in that directory (same reason -- too old).
Regrabbed the .p1 spkg and did:export ABI=32tar xf mpir-2.6.0.p1.spkgcd mpir-2.6.0.p1/src./config.guess #=> back to nehalem now
./configuremakeThe result was a successful build (at least no errors). This was with apple's gcc-4.2 (manually set). Trying now with gcc 4.0.1 to make sure it works there too.
It built successfully using gcc 4.0.1 as well. Is there any way to check the functionality of the builds easily?
- Greg
- Greg
New logs are linked below.Doing "grep -A6 '^using ABI' build.log" results in the following on both gcc versions:using ABI="32"CC="gcc -std=gnu99"CFLAGS="-m32 -O2 -fomit-frame-pointer -mtune=nocona -march=nocona"CPPFLAGS=""MPN_PATH=" x86/applenopic generic"checking for ar... archecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -pThe "sage -i" also appears to work correctly.Links to logs:- Greg
"./sage -i ./mpir-2.6.0.p2.spkg" appears to have worked fine. Log is linked below if you need it.- Greg
On Tuesday, December 4, 2012 12:04:33 AM UTC+1, Greg McWhirter wrote:"./sage -i ./mpir-2.6.0.p2.spkg" appears to have worked fine. Log is linked below if you need it.- GregGreat!
Sorry for not asking this earlier but could you try running the test suite?
With Sage, you do
SAGE_CHECK=yes ./sage -i ....
Another option is to add some flag (don't remember which) to tell Sage to keep the build dir, then go there and launch make check by hand.
Thanks. I figured this out after a couple tries. Ended up doing the following:$ ./sage -f -s ./mpir-2.6.0.p2.spkg$ cd spkg/build/mpir-2.6.0.p2$ ../../../sage -sh # (stuff that follows is in the sage shell)$ ./spkg-check | tee -a ./mpir-2.6.0.p2_check.log$ ^D # (end sage shell)This failed in the cxx directory it seemed, but the error message was apparently not in the log. It may have been a weird error due to how I ran things (something about a value being too big for a long or something).I am currently rerunning the tests by:$ cd spkg/build/mpir-2.6.0.p2$ make clean$ export ABI=32$ ./configure && make$ make check | tee -a ./check.logThis appears to have passed 100%.Log links:http://dl.dropbox.com/u/14744151/MPIR%20build%20logs/working/mpir-2.6.0.p2_check.log (first time with ./spkg-check and some extra stuff from more tries)http://dl.dropbox.com/u/14744151/MPIR%20build%20logs/working/mpir-2.6.0.p2_check-2.log (second time with a manual "make check")
Both doing a manual "make check" in the extracted directory (and exporting ABI=32) and doing "make; sage -i -c -s mpir-2.6.0.p0.spkg" from the source root folder failed the tests similarly. My current guess is that the gcc version in OS X 10.5.8 by default doesn't understand "long long". This would seem to be confirmed by the fact that a standard build process tries to build a minimal mpir to compile a more up-to-date gcc for sage to use for the rest of everything (including rebuilding mpir). At least, that is what it appears to be doing from what I can tell. So, I am not sure how big a deal the test failures are.- Greg