Ivan Andrus wrote:
On Jan 5, 2013, at 8:03 PM, leif <not.rea...@online.de> wrote:

Ivan Andrus wrote:
Dear Sagephiles,

Sorry to be so late to the party, but I tried building recently and noticed 
that building MPIR fails with SAGE_DEBUG=yes.  This is before a new gcc has 
been installed.  It compiled fine once I set SAGE_DEBUG to the empty string.

I'm using OS X 10.8.2 with a Mid 2010 MacBook Pro.  The build log is at
http://boxen.math.washington.edu/home/iandrus/mpir-2.4.0.p6.log

Could you also upload MPIR's corresponding config.log 
($SAGE_ROOT/spkg/build/mpir-2.4.0.p6/src/config.log IIRC)?  (That of a /failed/ 
build with Clang of course ;-) )

http://boxen.math.washington.edu/home/iandrus/config.log


Thanks. Although the 'configure' test is supposed to detect something completely different, it fails due to some bug in Clang (or at least an incompatibility to GCC / GNU C).

Unless one specifies '-O2' or higher ('-finline*' doesn't work either), the GNU __inline__ function doesn't get inlined, which is in principle ok, but Clang doesn't emit code for it either, hence the linker error. (FWIW, '-std=gnu*' doesn't seem to make any difference.)

We could tweak the test to use 'extern inline' (although I'm not sure whether that would still trigger the bug the test is meant for), or change

#ifdef  __GNUC__

to

#if     defined(__GNUC__) && !defined(__clang__)

(The latter is IMHO more appropriate, regarding the intent of the test.)


MPIR versions > 2.4 come with the same test, and since I know Bill is keen to fix any Apple toolchain issues (although in this case it's rather just Clang), it's likely we could get that upstream MPIR (cc'ed).

(We're currently preparing to upgrade to 2.6.0 at #13137 [1]).




You may also try setting CC="clang -std=gnu99" or CC="clang -std=c99", but 
probably something's wrong with '-g' (i.e., the debug symbols; wouldn't be the first time with 
Apple's linker…)

Something quite odd happened when I tried

make CC="clang -std=gnu99"

(and also with c99).  I got the following output:


cd spkg && \
        "../spkg/pipestatus" \
                "env SAGE_PARALLEL_SPKG_BUILD='' ./install all 2>&1" \
                "tee -a ../install.log"
Installing GCC because you have clang -std=gnu99 version 4.2.1, which is quite 
old.
make -j2 base
make[2]: warning: -jN forced in submake: disabling jobserver mode.
env SAGE_BUILD_TOOLCHAIN=yes make -j2 toolchain
make[2]: warning: -jN forced in submake: disabling jobserver mode.
/Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/pipestatus "sage-spkg ${SAGE_SPKG_OPTS} mpir-2.4.0.p6 
2>&1" "tee -a /Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/logs/mpir-2.4.0.p6.log"
make[2]: *** [installed/mpir-2.4.0.p6] Error 1
make[1]: *** [all] Error 2
*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***
…
***********************************************
make -j2 base
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: Nothing to be done for `base'.
env SAGE_BUILD_TOOLCHAIN=yes make -j2 toolchain
make[2]: warning: -jN forced in submake: disabling jobserver mode.
/Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/pipestatus "sage-spkg ${SAGE_SPKG_OPTS} mpir-2.4.0.p6 
2>&1" "tee -a /Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/logs/mpir-2.4.0.p6.log"
…
/Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/pipestatus "sage-spkg ${SAGE_SPKG_OPTS} 
sagetex-2.3.3.p2 2>&1" "tee -a 
/Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/logs/sagetex-2.3.3.p2.log"

real    0m1.957s
user    0m1.088s
sys     0m1.265s
Sage build/upgrade complete!

To install small scripts to directly run Sage's versions of GAP,
the PARI/GP interpreter, Maxima, or Singular etc. (by typing e.g.
just 'gap' or 'gp') into a standard 'bin' directory, start Sage
by typing 'sage' (or './sage') and enter something like

     install_scripts('/usr/local/bin')

at the Sage command prompt ('sage:').

If you issued 'make', 'make all', or a similar command, then the
HTML version of the documentation will be built right now.
Otherwise, if you want to (re)build the HTML documentation,
run 'make doc'.  To build the PDF version, run 'make doc-pdf'.

./sage -b
/Users/gvol/SageStuff/sage-5.6.beta2-debug/spkg/bin/sage: line 651: sage-build: 
command not found
make: *** [build] Error 127


No idea what's going on there, but that's certainly a Sage build system issue, presumably rather unrelated to MPIR.


-leif


[1] http://trac.sagemath.org/sage_trac/ticket/13137

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to