Download it now!
Bug 32224 - sc fails to link on alpha
Summary: sc fails to link on alpha
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Alpha Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 02:45 UTC by Rene Engelhard
Modified: 2011-02-22 11:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2010-12-08 02:45:26 UTC
[...]
Making:    libscll.so
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteImportDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>)':
(.text+0x1134): relocation truncated to fit: GPREL16 against symbol `com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::DataImportMode const*)::the_type' defined in .sbss._ZZN3com3sun4star5sheet22cppu_detail_getUnoTypeEPKNS2_14DataImportModeEE8the_type[com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::DataImportMode const*)::the_type] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteImportDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>)':
(.text+0x1164): relocation truncated to fit: GPREL16 against symbol `com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::DataImportMode const*)::the_type' defined in .sbss._ZZN3com3sun4star5sheet22cppu_detail_getUnoTypeEPKNS2_14DataImportModeEE8the_type[com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::DataImportMode const*)::the_type] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x12ac): relocation truncated to fit: GPREL16 against symbol `com::sun::star::container::cppu_detail_getUnoType(com::sun::star::container::XIndexAccess const*)::the_type' defined in .sbss._ZZN3com3sun4star9container22cppu_detail_getUnoTypeEPKNS2_12XIndexAccessEE8the_type[com::sun::star::container::cppu_detail_getUnoType(com::sun::star::container::XIndexAccess const*)::the_type] section in ../unxlngaxp.pro/slo/docuno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x12f4): relocation truncated to fit: GPREL16 against symbol `com::sun::star::container::cppu_detail_getUnoType(com::sun::star::container::XIndexAccess const*)::the_type' defined in .sbss._ZZN3com3sun4star9container22cppu_detail_getUnoTypeEPKNS2_12XIndexAccessEE8the_type[com::sun::star::container::cppu_detail_getUnoType(com::sun::star::container::XIndexAccess const*)::the_type] section in ../unxlngaxp.pro/slo/docuno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x136c): relocation truncated to fit: GPREL16 against symbol `com::sun::star::beans::cppu_detail_getUnoType(com::sun::star::beans::XPropertySet const*)::the_type' defined in .sbss._ZZN3com3sun4star5beans22cppu_detail_getUnoTypeEPKNS2_12XPropertySetEE8the_type[com::sun::star::beans::cppu_detail_getUnoType(com::sun::star::beans::XPropertySet const*)::the_type] section in ../unxlngaxp.pro/slo/drwtrans.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x1388): relocation truncated to fit: GPREL16 against symbol `com::sun::star::beans::cppu_detail_getUnoType(com::sun::star::beans::XPropertySet const*)::the_type' defined in .sbss._ZZN3com3sun4star5beans22cppu_detail_getUnoTypeEPKNS2_12XPropertySetEE8the_type[com::sun::star::beans::cppu_detail_getUnoType(com::sun::star::beans::XPropertySet const*)::the_type] section in ../unxlngaxp.pro/slo/drwtrans.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x16c4): relocation truncated to fit: GPREL16 against symbol `com::sun::star::uno::Sequence<com::sun::star::sheet::SubTotalColumn>::s_pType' defined in .sbss._ZN3com3sun4star3uno8SequenceINS1_5sheet14SubTotalColumnEE7s_pTypeE[com::sun::star::uno::Sequence<com::sun::star::sheet::SubTotalColumn>::s_pType] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x1734): relocation truncated to fit: GPREL16 against symbol `com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::XSubTotalField const*)::the_type' defined in .sbss._ZZN3com3sun4star5sheet22cppu_detail_getUnoTypeEPKNS2_14XSubTotalFieldEE8the_type[com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::XSubTotalField const*)::the_type] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x1750): relocation truncated to fit: GPREL16 against symbol `com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::XSubTotalField const*)::the_type' defined in .sbss._ZZN3com3sun4star5sheet22cppu_detail_getUnoTypeEPKNS2_14XSubTotalFieldEE8the_type[com::sun::star::sheet::cppu_detail_getUnoType(com::sun::star::sheet::XSubTotalField const*)::the_type] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x189c): relocation truncated to fit: GPREL16 against symbol `com::sun::star::uno::Sequence<com::sun::star::sheet::SubTotalColumn>::s_pType' defined in .sbss._ZN3com3sun4star3uno8SequenceINS1_5sheet14SubTotalColumnEE7s_pTypeE[com::sun::star::uno::Sequence<com::sun::star::sheet::SubTotalColumn>::s_pType] section in ../unxlngaxp.pro/slo/datauno.o
../unxlngaxp.pro/slo/XMLExportDatabaseRanges.o: In function `ScXMLExportDatabaseRanges::WriteSubTotalDescriptor(com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor>, rtl::OUString)':
(.text+0x1a60): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
dmake:  Error code 1, while making '../unxlngaxp.pro/lib/libscll.so'

-----------------------------------------------------------------------
        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
            http://wiki.documentfoundation.org/Development

 it seems that the error is inside 'sc', please re-run build
 inside this module to isolate the error and/or test your fix:
-----------------------------------------------------------------------

/bin/bash
cd /build/buildd-libreoffice_3.3.0~rc1-1-alpha-BFqLZJ/libreoffice-3.3.0~rc1/libreoffice-build-3-3-0-1/build/libreoffice-3.3.0.1
source ./LinuxAlphaEnv.Set.sh
cd sc
build

when the problem is isolated and fixed exit and re-run 'make' from the top-level
sometimes (sadly) it is necessary to rm -Rf unxlngaxp.pro in a module.
make[1]: *** [stamp/build] Error 1
make[1]: Leaving directory `/build/buildd-libreoffice_3.3.0~rc1-1-alpha-BFqLZJ/libreoffice-3.3.0~rc1/libreoffice-build-3-3-0-1'

The full buildlog is at:
https://buildd.debian.org/fetch.cgi?&pkg=libreoffice&ver=1%3A3.3.0~rc1-1&arch=alpha&stamp=1291768367&file=log (rc1, but happened also in beta2 and beta3)

From the buildlog:
Kernel: Linux 2.6.32-bpo.5-alpha-generic alpha (alpha)
Toolchain package versions: libc6.1-dev_2.11.2-7 dpkg-dev_1.15.8.5 linux-libc-dev_2.6.32-27 gcc-4.4_4.4.5-10 g++-4.4_4.4.5-10 binutils_2.20.1-15 libstdc++6-4.4-dev_4.4.5-10 libstdc++6_4.4.5-10
Comment 1 Matt Turner 2011-01-04 19:10:07 UTC
I don't know a thing about Libre/OpenOffice and have never tried to use it on Alpha, but I can tell you that 'relocation truncated to fit: GPREL16 against symbol' is usually caused by using gcc's -msmall-data or -msmall-text flags, documented here [1].

-msmall-* isn't the default, so it must be enabled somehow on your compilation. The gcc doc says "When generating code for shared libraries, -fpic implies -msmall-data and -fPIC implies -mlarge-data." so perhaps you can replace the -fpic flag with -fPIC, that is if -fpic is being used?

[1] http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html

Other information that may help:

What distribution are you using? What version of gcc? glibc? binutils? What JDK and version?
Comment 2 Matt Turner 2011-01-23 18:26:58 UTC
Just a fire-and-forget bug report? What gives?
Comment 3 Rene Engelhard 2011-01-23 19:19:48 UTC
nah, just no time to follow-up on this (especially as alpha isn't a release-critical arch anymore and thus failures on it are not critical anymore).

Will try later the week when I hopefully will have time to look.

So far:

> What distribution are you using?

Debian sid (+ libwpd/g/s from experimental)

> What version of gcc? glibc? binutils? What JDK and version?

See the buildlog :). From the attempted rc4 build:

Toolchain package versions: libc6.1-dev_2.11.2-7 dpkg-dev_1.15.8.6 linux-libc-dev_2.6.32-28 gcc-4.4_4.4.5-10 g++-4.4_4.4.5-10 binutils_2.20.1-15 libstdc++6-4.4-dev_4.4.5-10 libstdc++6_4.4.5-10
Package versions: [...] openjdk-6-jdk_6b18-1.8.3-2 openjdk-6-jre_6b18-1.8.3-2 openjdk-6-jre-headless_6b18-1.8.3-2 openjdk-6-jre-lib_6b18-1.8.3-2 [...]
Comment 4 Rene Engelhard 2011-01-23 19:38:08 UTC
... and it uses -fPIC
Comment 5 Michael Cree 2011-01-25 22:50:30 UTC
(In reply to comment #4)
> ... and it uses -fPIC

Maybe try adding --no-relax to LDFLAGS.

Cheers
Michael.
Comment 6 Michael Cree 2011-02-21 11:31:18 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > ... and it uses -fPIC
> 
> Maybe try adding --no-relax to LDFLAGS.

Yeah, that's it.  Apparently there is a bug in the code optimiser of the linker that only rears its ugly head on the vary rare occasion.  I am told that using --no-relax turns off the optimiser thus avoiding the possibility of the bug.

I have built libreoffice from Debian 3.3.0-2 sources on Alpha.  It bombed out twice while linking in package sc and once in package sw and all were fixed by manually running the link command with -Wl,--no-relax added, and then continuing the build.

I now have a working libreoffice on my Alpha running an up-to-date Debian sid.

Cheers
Michael.
Comment 7 Rene Engelhard 2011-02-21 11:51:29 UTC
thanks, will verify with

--- solenv/inc/unxlngaxp.mk
+++ solenv/inc/unxlngaxp.mk
@@ -29,6 +29,6 @@
 
 PICSWITCH:=-fPIC
 .INCLUDE : unxlng.mk
-CFLAGS+=-DAXP
+CFLAGS+=-DAXP -Wl,--no-relax
 DLLPOSTFIX=ll
 BUILD64=1
Comment 8 Rene Engelhard 2011-02-21 12:02:20 UTC
committed to master fwiw
Comment 9 Rene Engelhard 2011-02-21 15:33:54 UTC
eh, no, actually the patch is stupid (no bussiness adding it to CFLAGS). This is better:

--- solenv/inc/unxlngaxp.mk
+++ solenv/inc/unxlngaxp.mk
@@ -29,6 +29,7 @@

 PICSWITCH:=-fPIC
 .INCLUDE : unxlng.mk
 CFLAGS+=-DAXP
+LINKFLAGS+=-Wl,--no-relax
 DLLPOSTFIX=ll
 BUILD64=1
Comment 10 Rene Engelhard 2011-02-22 11:20:08 UTC
-> FIXED