Re: [sage-support] Re: Error building gcc

152 views
Skip to first unread message

Dima Pasechnik

unread,
Jul 28, 2012, 5:55:08 AM7/28/12
to sage-s...@googlegroups.com, sage-devel


On Saturday, 28 July 2012 15:52:19 UTC+8, kfiz wrote:
System Software Overview shows '64-bit Kernel and Extensions: Yes'. 
As I said I used to run it with 32-bit but I changed that with a keyboard combination. In contrast to the other guys from the link you posted I've successfully installed the 64-bit dmg. But building sage 5.1 from source code somehow doesn't work for me..

are you installing Xcode from the official place 
(page 5 out of 9, to be precise) ?

If yes, it looks as if you are hitting a bug (of sorts) described here:
(symptom: "/usr/bin/ranlib: archive member: libbackend.a(ude) size too large")

Basically, a static library cannot be bigger that 4GB on your toolchain.
A workaround is to not to build "universal" libraries, i.. anything that works on 
32 as well as on 64 bit (i.e x86 and x86_64) systems.

I cc to sage-devel. Let's continue talking there.


  

 
Am Samstag, 28. Juli 2012 05:00:58 UTC+2 schrieb Dima Pasechnik:


On Saturday, 28 July 2012 01:55:13 UTC+8, kfiz wrote:
Hmmh, I have a macbook pro mid 2009, Core 2 Duo. Some Core 2 Duos mis-represent themselves as 64 bit? How could I check wether my machine does that? It used to run under 32-bit, but than I switched it to 64-bit via an official apple command. The systemprofiler states 64-bit...
What does System Software Overview show for you? I suppose that you see

64-bit Kernel and Extensions: No

This was discussed here and on sage-devel a little while ago, as it is indeed confusing: the processor is 64-bit, but the kernel is 32 bit. While some(?) 64-bit executables can be still run, it is still a 32-bit kernel... See

https://groups.google.com/d/msg/sage-support/IfJCisKo7Ao/nlQyZeB8DgAJ 

https://groups.google.com/d/msg/sage-support/IfJCisKo7Ao/Z4Vj5TmUimYJ

 PS. Sorry, John, it could be that googlegroups are not as capable of changing the subject as we wish :(



As far as I know, the only way to get a 64-bit kernel for Core 2 Duo is to upgrade to OSX 10.7.




Am Freitag, 27. Juli 2012 07:35:32 UTC+2 schrieb Dima Pasechnik:


On Friday, 27 July 2012 03:56:27 UTC+8, kfiz wrote:
I also use Xcode 3.2.6 (freshly installed) , but building always crashed when gcc 4.6.3 was going to be installed on my machine.
I figured that I could install the gcc package manually,  downloaded it and ran the installation...with the same result.
really don't know what the problem is...

what is the hardware you are using?
On OSX 6, some machines mis-represent themselves as 64-bit, although the system is in fact 32-bit.
(e.g.  Core 2 Duo ones do this)
So if you try to build in a "true" 64-bit mode, it won't work then.

 


Am Donnerstag, 26. Juli 2012 16:13:58 UTC+2 schrieb Dima Pasechnik:


On Thursday, 26 July 2012 14:21:29 UTC+8, kfiz wrote:
Ok, thanks guys. I switched methods and installed with the mac osx binaries.
seems that I have serious issues updating my current gcc compiler.
guess I'll just have to wait until apple updates xcode.


this is strange. I think many people, including several very active Sage developers, 
work on OSX 10.6.8 with XCode, and not having any issues. Provided it is Xcode 3.2.6.

What version of Xcode do you use?



cheers

doro

Am Mittwoch, 25. Juli 2012 13:08:40 UTC+2 schrieb kfiz:
re-installed XCode. this time:

/usr/bin/ranlib: archive member: libbackend.a(ude) size too large (archive member extends past the end of the file)
ar: internal ranlib command failed
make[5]: *** [libbackend.a] Error 1
make[4]: *** [all-stage2-gcc] Error 2
make[3]: *** [stage2-bubble] Error 2
make[2]: *** [all] Error 2

real 56m5.026s
user 50m8.913s
sys 2m44.951s
************************************************************************
Error installing package gcc-4.6.3


Am Mittwoch, 25. Juli 2012 12:08:11 UTC+2 schrieb kfiz:
I have the newest version of command line tools...but I'll re-download XCode and try again, just to check.  

Am Mittwoch, 25. Juli 2012 11:51:37 UTC+2 schrieb Jeroen Demeyer:
On 2012-07-25 11:32, kfiz wrote:
> downloaded the source code from source and tried again, and got this:

Weird, are you sure your XCode setup is up-to-date?

Andrea Lazzarotto

unread,
Jul 28, 2012, 6:07:29 AM7/28/12
to sage-...@googlegroups.com


2012/7/28 Dima Pasechnik <dim...@gmail.com>

A workaround is to not to build "universal" libraries, i.. anything that works on 
32 as well as on 64 bit (i.e x86 and x86_64) systems.

IIRC universal binaries should also include PPC. Am I right?

--
Andrea Lazzarotto - http://andrealazzarotto.com

Dima Pasechnik

unread,
Jul 28, 2012, 6:36:38 AM7/28/12
to sage-...@googlegroups.com
On Saturday, 28 July 2012 18:07:29 UTC+8, Andrea Lazzarotto wrote:


2012/7/28 Dima Pasechnik <dim...@gmail.com>
A workaround is to not to build "universal" libraries, i.. anything that works on 
32 as well as on 64 bit (i.e x86 and x86_64) systems.

IIRC universal binaries should also include PPC. Am I right?

well, it used to be the case. But with Xcode 3.2.6 one has to jump extra hoops, and with Xcode 4 it seems to be impossible, as there is no OSX 10.5 frameworks for Xcode 4.
(Or maybe it's not quite true, as one can reuse Xcode 3 frameworks with Xcode 4, but this is getting more an more unpleasant, AFAIK).

Dima Pasechnik

unread,
Jul 29, 2012, 3:42:49 AM7/29/12
to sage-...@googlegroups.com


On Sunday, 29 July 2012 14:27:22 UTC+8, kfiz wrote:
> Hmmm, that seems to exactly be my bug. Yes, Dima I downloaded  Xcode 3.2.6  from apple devel, but from page 4 of 7..? Are we refering to different download sections?
So, what's the smartest thing to do here..smart meaning without to much effort. ;-).

It could be that Sage is just not tested on your configuration, and you hit a real bug. 
I don't know. Do I get it right that you can't build the gcc that comes with Sage?
 

kfiz

unread,
Jul 29, 2012, 4:54:51 AM7/29/12
to sage-...@googlegroups.com
Yes, that's the case.  
 

Dima Pasechnik

unread,
Jul 29, 2012, 5:04:13 AM7/29/12
to sage-...@googlegroups.com
could you post somewhere the part of your install.log, with the ranlib error on libbackend.a
you mentioned earlier?
One has to see with which flags the complilation/linking of libbackend.a  during the installation of gcc spkg is being done. It would be good to see the actual size of libbackend.a(*) if you still have it somewhere in SAGE_LOCAL/spkg/build/...


 

kfiz

unread,
Jul 29, 2012, 6:11:02 AM7/29/12
to sage-...@googlegroups.com
 deleted everything but I'll just try to build it again, then I'll post the  log.

kfiz

unread,
Jul 29, 2012, 3:08:01 PM7/29/12
to sage-...@googlegroups.com
ok, so hier is part of the log:

rm -rf libbackend.a
ar rc libbackend.a insn-attrtab.o insn-automata.o insn-emit.o insn-extract.o insn-modes.o insn-opinit.o insn-output.o insn-peep.o insn-preds.o insn-recog.o insn-enums.o ggc-page.o alias.o alloc-pool.o auto-inc-dec.o bb-reorder.o bitmap.o bt-load.o builtins.o caller-save.o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfgexpand.o cfghooks.o cfglayout.o cfgloop.o cfgloopanal.o cfgloopmanip.o cfgrtl.o combine.o combine-stack-adj.o compare-elim.o convert.o coverage.o cse.o cselib.o dbxout.o dbgcnt.o dce.o ddg.o debug.o df-core.o df-problems.o df-scan.o dfp.o diagnostic.o dojump.o dominance.o domwalk.o double-int.o dse.o dwarf2asm.o dwarf2out.o ebitmap.o emit-rtl.o et-forest.o except.o explow.o expmed.o expr.o final.o fixed-value.o fold-const.o function.o fwprop.o gcse.o ggc-common.o gimple.o gimple-iterator.o gimple-fold.o gimple-low.o gimple-pretty-print.o gimplify.o godump.o graph.o graphds.o graphite.o graphite-blocking.o graphite-clast-to-gimple.o graphite-cloog-util.o graphite-dependences.o graphite-flattening.o graphite-interchange.o graphite-poly.o graphite-ppl.o graphite-scop-detection.o graphite-sese-to-poly.o gtype-desc.o haifa-sched.o hooks.o hwint.o ifcvt.o implicit-zee.o init-regs.o input.o integrate.o intl.o ira.o ira-build.o ira-costs.o ira-conflicts.o ira-color.o ira-emit.o ira-lives.o jump.o langhooks.o lcm.o lists.o loop-doloop.o loop-init.o loop-invariant.o loop-iv.o loop-unroll.o loop-unswitch.o lower-subreg.o lto-cgraph.o lto-streamer-in.o lto-streamer-out.o lto-section-in.o lto-section-out.o lto-symtab.o lto-opts.o lto-streamer.o lto-compress.o mcf.o mode-switching.o modulo-sched.o omega.o omp-low.o optabs.o options.o opts-common.o opts-global.o opts.o params.o passes.o plugin.o pointer-set.o postreload-gcse.o postreload.o predict.o pretty-print.o print-rtl.o print-tree.o profile.o real.o realmpfr.o recog.o reg-stack.o regcprop.o reginfo.o regmove.o regrename.o regstat.o reload.o reload1.o reorg.o resource.o rtl-error.o rtl.o rtlanal.o rtlhooks.o sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o sel-sched-ir.o sel-sched-dump.o sel-sched.o sese.o simplify-rtx.o sparseset.o sreal.o stack-ptr-mod.o statistics.o stmt.o stor-layout.o store-motion.o stringpool.o target-globals.o targhooks.o timevar.o toplev.o tracer.o tree-affine.o tree-call-cdce.o tree-cfg.o tree-cfgcleanup.o tree-chrec.o tree-complex.o tree-data-ref.o tree-dfa.o tree-diagnostic.o tree-dump.o tree-eh.o tree-emutls.o tree-if-conv.o tree-into-ssa.o tree-iterator.o tree-loop-distribution.o tree-nested.o tree-nrv.o tree-object-size.o tree-optimize.o tree-outof-ssa.o tree-parloops.o tree-phinodes.o tree-predcom.o tree-pretty-print.o tree-profile.o tree-scalar-evolution.o tree-sra.o tree-switch-conversion.o tree-ssa-address.o tree-ssa-alias.o tree-ssa-ccp.o tree-ssa-coalesce.o tree-ssa-copy.o tree-ssa-copyrename.o tree-ssa-dce.o tree-ssa-dom.o tree-ssa-dse.o tree-ssa-forwprop.o tree-ssa-ifcombine.o tree-ssa-live.o tree-ssa-loop-ch.o tree-ssa-loop-im.o tree-ssa-loop-ivcanon.o tree-ssa-loop-ivopts.o tree-ssa-loop-manip.o tree-ssa-loop-niter.o tree-ssa-loop-prefetch.o tree-ssa-loop-unswitch.o tree-ssa-loop.o tree-ssa-math-opts.o tree-ssa-operands.o tree-ssa-phiopt.o tree-ssa-phiprop.o tree-ssa-pre.o tree-ssa-propagate.o tree-ssa-reassoc.o tree-ssa-sccvn.o tree-ssa-sink.o tree-ssa-structalias.o tree-ssa-ter.o tree-ssa-threadedge.o tree-ssa-threadupdate.o tree-ssa-uncprop.o tree-ssa-uninit.o tree-ssa.o tree-ssanames.o tree-stdarg.o tree-tailcall.o tree-vect-generic.o tree-vect-patterns.o tree-vect-data-refs.o tree-vect-stmts.o tree-vect-loop.o tree-vect-loop-manip.o tree-vect-slp.o tree-vectorizer.o tree-vrp.o tree.o value-prof.o var-tracking.o varasm.o vec.o version.o vmsdbgout.o web.o xcoffout.o i386.o darwin.o host-darwin.o host-i386-darwin.o cgraph.o cgraphbuild.o cgraphunit.o cppbuiltin.o cppdefault.o incpath.o ipa-cp.o ipa-split.o ipa-inline.o ipa-prop.o ipa-pure-const.o ipa-reference.o ipa-ref.o ipa-struct-reorg.o ipa-type-escape.o ipa-utils.o ipa.o matrix-reorg.o prefix.o tree-inline.o tree-nomudflap.o varpool.o
/usr/bin/ranlib: archive member: libbackend.a() size too large (archive member extends past the end of the file)
ar: internal ranlib command failed
make[5]: *** [libbackend.a] Error 1
make[4]: *** [all-stage1-gcc] Error 2
make[3]: *** [stage1-bubble] Error 2
make[2]: *** [all] Error 2

real 5m27.725s
user 4m28.845s
sys 0m54.509s
************************************************************************
Error installing package gcc-4.6.3

The size of libbackend.a is 24.3 MB. 

Dima Pasechnik

unread,
Jul 30, 2012, 12:09:52 AM7/30/12
to sage-...@googlegroups.com
sorry, one needs to look at parts before this. That is,  parts where these .o files are produced by the compiler, gcc, and in particular what switches it is using.
It would also help to know the sizes of all these .o files, or at least the maximum size...

kfiz

unread,
Jul 30, 2012, 4:18:13 AM7/30/12
to sage-...@googlegroups.com
Sorry, so here's the whole log. The biggest o'file is 1.7 MB. In total they amount to about 43 MB. 
gcc-4.6.3.log

Dima Pasechnik

unread,
Jul 30, 2012, 10:25:24 AM7/30/12
to sage-...@googlegroups.com
If you look for the 1st Error in the log, you will see
-----------------------------------------------------------------------------------------------
ld: warning: in build/genautomata.o, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[5]: *** [build/genautomata] Error 1
make[4]: *** [all-stage1-gcc] Error 2
make[3]: *** [stage1-bubble] Error 2
make[2]: *** [all] Error 2
-----------------------------------------------------------------------------------------------

IMHO you should set SAGE64=yes and then build.
(i.e. do 
export SAGE64=yes
and then do "make build")

Otherwise it looks like that the compiler builds 32-bit object files.




kfiz

unread,
Jul 30, 2012, 10:38:52 PM7/30/12
to sage-...@googlegroups.com
I think that was the problem! :-) Tried to build, everything worked fine until package 'Maxima'..weird, because except for the final 'Error' message (check the log) everything seems to have worked fine..


maxima-5.26.0.p0.log

Dima Pasechnik

unread,
Jul 31, 2012, 1:37:42 AM7/31/12
to sage-...@googlegroups.com
This log does not say at all why Maxima didn't build.
Could you please cut the relevant (bottom) part of install.log
and post it here?
 

kfiz

unread,
Jul 31, 2012, 2:02:11 AM7/31/12
to sage-...@googlegroups.com
This is the part of install.log that I didn't post before:

make[1]: *** [installed/maxima-5.26.0.p0] Error 1

real 228m36.234s
user 194m48.729s
sys 22m18.712s
Error building Sage.
 
Did you refer to this?
 

Dima Pasechnik

unread,
Jul 31, 2012, 3:56:30 AM7/31/12
to sage-...@googlegroups.com
I meant that maxima-5.26.0.p0.log you posted does not contain the log of maxima build, only the fact that it ended in a failure.
In install.log there should be a part that contains a complete log of maxima build. 
It would start off like this:

Now building Maxima; this takes a few minutes.
Since we're on MacOS X and there is a very weird
bug with buffered output while building Maxima,
you will not be able to see the output of the build
as it occurs.  Don't worry, the build process does
not hang.
g++ -c cf_generator.cc -Wall -fno-implicit-templates -I. -I.. -I. -I/usr/local/src/sage/sage-5.2.rc0/local -I/usr/local/src/sage/sage-5.2.rc0/local/include -DHAVE_CONFIG_H -I/usr/local/src/sage/sage-5.2.rc0/local/include -I/usr/local/src/sage/sage-5.2.rc0/local/include -I/usr/local/src/sage/sage-5.2.rc0/local/include  -O2 -g -fPIC -DLIBSINGULAR -o cf_generator.o
In file included from cf_generator.cc:10:0:
[and lots more stuff here]


 

Dima Pasechnik

unread,
Jul 31, 2012, 5:43:24 AM7/31/12
to sage-...@googlegroups.com
sorry, this is not the place... 
Please disregard the last message.
I'll ask around how to see what can be done to see the errors...

Dima Pasechnik

unread,
Jul 31, 2012, 7:22:47 AM7/31/12
to sage-...@googlegroups.com
please see https://groups.google.com/d/msg/sage-devel/asCra9jDbCk/1BiMU6T_lY0J


On Tuesday, 31 July 2012 14:02:11 UTC+8, kfiz wrote:
Reply all
Reply to author
Forward
0 new messages