On 10 April 2006 at 16:39, Prof Brian Ripley wrote:
| What I get from this is that ppc64 needs -mminimal-toc at least when 
| building a shared libR.so.  pbeta.c has actually been simplified a lot, so 
| I guess this may not actually be related to that but rather to the 
| progress of the linker.

I see, thanks.
 
| Note that the message is about a failed optimization.  I have seen those 
| far too often in gcc 4.0.x (you cannot even compile R on i686 with -O2 on 
| gcc 4.0.[123] on our FC3 system).  As such I don't think it is something 
| we want to hardcode into R's configure, but I will add a note to the 
| manual.
| 
| I presume this the GNU linker.  I suspect that gcc on ppc64 can be used 
| with other linkers (and maybe usually is on AIX and MacOS X), so we would 
| have to apply the flag very specifically.

Ok, in which we will simply do what Andreas' patch already encoded, ie add
the -mminimal-toc flag to builds on powerpc64 (== ppc64) and leave everything
else as is.

Thanks,  Dirk
 
| On Sun, 9 Apr 2006, Dirk Eddelbuettel wrote:
| 
| >
| > [ Ooops, resending, this time with the promised two additional
| >  recipients. --Dirk ]
| >
| > On 9 April 2006 at 07:44, Dirk Eddelbuettel wrote:
| > |
| > | Hi Andreas,
| > |
| > | On 23 April 2006 at 12:07, Andreas Jochens wrote:
| > | | Package: r-base
| > | | Version: 2.2.1.svn37668-1
| > | | Severity: wishlist
| > | | Tags: patch
| > | |
| > | |
| > | | When building 'r-base' on ppc64/unstable, I get the following error:
| > | |
| > | |
| > | | gcc     -I. -I../../src/include -I../../src/include  -DHAVE_CONFIG_H  
-fpic  -std=gnu99 -O2 -pipe -c vfonts.c -o vfonts.o
| > | | gfortran  -fpic  -O2 -pipe -c xxxpr.f -o xxxpr.o
| > | | gcc -shared   -o libR.so Rembedded.o CConverters.o CommandLineArgs.o 
Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o 
bind.o builtin.o character.o coerce.o colors.o complex.o connections.o 
context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o 
dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o 
fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o 
iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o 
memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o 
pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o 
printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o 
saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o 
startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o 
version.o vfonts.o xxxpr.o   `ls ../appl/*.o ../nmath/*.o ../unix/*.o  
2>/dev/nul!
|  l`!
| >   -lgfortran -lm -lgcc_s      -lreadline  -lpcre -lbz2 -lz -ldl -lm
| > | | /usr/bin/ld: ../nmath/pbeta.o(.text+0x40): sibling call optimization to 
`bratio' does not allow automatic multiple TOCs; recompile with -mminimal-toc 
or -fno-optimize-sibling-calls, or make `bratio' extern
| > | | /usr/bin/ld: final link failed: Bad value
| > | | collect2: ld returned 1 exit status
| > | | make[4]: *** [libR.so] Error 1
| > | | make[4]: Leaving directory `/r-base-2.2.1.svn37668/src/main'
| > | |
| > | |
| > | | With the attached patch 'r-base' can be compiled on ppc64.
| > |
| > | Very interesting. So that must have been gcc/gfortan/g++ 4.0.3-3, correct 
?
| > |
| > | | diff -urN ../tmp-orig/r-base-2.2.1.svn37668/debian/rules ./debian/rules
| > | | --- ../tmp-orig/r-base-2.2.1.svn37668/debian/rules      2006-04-09 
08:37:31.000000000 +0000
| > | | +++ ./debian/rules      2006-04-09 07:03:04.000000000 +0000
| > | | @@ -75,6 +75,10 @@
| > | |  cxxcompiler    = g++
| > | |  optimflags     = -O2 -pipe
| > | |
| > | | +ifeq ($(arch),powerpc64)
| > | | +optimflags     += -mminimal-toc
| > | | +endif
| > | | +
| > | |  # edd 04 Sep 2001  default compiler flags, lowered for m68k
| > | |  #compilerflags = -O2
| > | |  # m68k barks when using g77, and when gcc use -O2
| > |
| > | Thanks for the detailed patch. I have applied it to my debian/rules, and 
I am
| > | CCing two of upstream authors as a heads-up.  The option should be 
generally
| > | required and not be Debian specific, correct?  Do you know if other
| > | optimization flags make a difference?  As I recall, pbeta got quite a bit 
of
| > | attention for its algorithmic performance and correctness, so it is
| > | interesting to see the compiler complain.  Could we count on you for some
| > | minimal testing?
| > |
| > | Regards, Dirk
| > |
| > | --
| > | Hell, there are no rules here - we're trying to accomplish something.
| > |                                                   -- Thomas A. Edison
| >
| 
| -- 
| Brian D. Ripley,                  [EMAIL PROTECTED]
| Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
| University of Oxford,             Tel:  +44 1865 272861 (self)
| 1 South Parks Road,                     +44 1865 272866 (PA)
| Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to