Issue 120854

Summary: Module sc fails to build
Product: Calc Reporter: SET <nmset>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Critical    
Priority: P1 (highest) CC: arielch, cdlxuxin, leiw, nmset
Version: 4.0.0-dev   
Target Milestone: 4.0.0   
Hardware: PC   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121359, 121372    
Attachments:
Description Flags
Build env none

Description SET 2012-09-07 20:30:24 UTC
Building after SVN update breaks in module sc with the following error during linking :


Making:    libsc.so
../unxlngx6.pro/slo/column3.o: In function `ScColumn::FillDPCache(ScDPTableDataCache*, long, int, int)':
column3.cxx:(.text+0x211e): undefined reference to `unsigned char ScDPTableDataCache::AddData<false>(long, ScDPItemData*)'
collect2: error: ld returned 1 exit status
dmake:  Error code 1, while making '../unxlngx6.pro/lib/libsc.so'



../unxlngx6.pro/slo/column3.o is present.

Using gcc 4.7.1 on Arch x86_64.

Thanks for considering.
Comment 1 Ariel Constenla-Haile 2012-09-08 02:47:13 UTC
Confirmed in the build boot 
http://ci.apache.org/projects/openoffice/buildlogs/linux32/main/sc/unxlngi6.pro/misc/logs/util.txt

Build breakers are P1

See bug 120847 and revision 1381946
Comment 2 Wang Lei 2012-09-08 03:21:23 UTC
Can you describe your linux build env. We can successfully build in our Linux system
Comment 3 Ariel Constenla-Haile 2012-09-08 07:11:12 UTC
(In reply to comment #0)
> Building after SVN update breaks in module sc with the following error
> during linking :
> 
> 
> Making:    libsc.so
> ../unxlngx6.pro/slo/column3.o: In function
> `ScColumn::FillDPCache(ScDPTableDataCache*, long, int, int)':
> column3.cxx:(.text+0x211e): undefined reference to `unsigned char
> ScDPTableDataCache::AddData<false>(long, ScDPItemData*)'
> collect2: error: ld returned 1 exit status
> dmake:  Error code 1, while making '../unxlngx6.pro/lib/libsc.so'
> 
> 
> 
> ../unxlngx6.pro/slo/column3.o is present.
> 
> Using gcc 4.7.1 on Arch x86_64.

I couldn't reproduce it on Fedora 64 bits with g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)

@SET: did you perform a clean build?

Strangely, the 32 bits build boot breakes with the same error, and the build seemed to be cleaned, it checked out the whole source tree before building: http://ci.apache.org/builders/openoffice-linux32-nightly/builds/241/steps/svn/logs/stdio
Comment 4 SET 2012-09-08 08:02:11 UTC
Created attachment 79357 [details]
Build env
Comment 5 SET 2012-09-08 08:06:00 UTC
Same error occurs with clean build.

# uname -a
Linux --- 3.4.2-hp #11 SMP Fri Jul 20 22:13:18 CEST 2012 x86_64 GNU/Linux

# gcc --version
gcc (GCC) 4.7.1 20120721 (prerelease)

# ldconfig --version
ldconfig (GNU libc) 2.16

autoconf --version
autoconf (GNU Autoconf) 2.69
Comment 6 SET 2012-09-08 09:50:28 UTC
Forgot to post the configure options :

./configure --disable-debug --without-junit --with-lang=fr --with-package-format=installed --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz --with-ant-home=/usr/local/netbeans/java/ant --enable-category-b --enable-gstreamer --enable-opengl --enable-presenter-extra-ui --enable-beanshell --enable-hyphen --enable-hunspell --enable-minimizer --enable-presenter-console --enable-pdfimport --enable-wiki-publisher --enable-graphite
Comment 7 SET 2012-09-08 16:22:15 UTC
If it may be of relevance, exactly the same failure when building for ARM using gcc 4.7.1 (Arch Linux ARM).
Comment 8 Ariel Constenla-Haile 2012-09-10 01:27:55 UTC
The Linux 32 bits build bot keeps breaking with this error.

@SET: your build flags look ok. Important is that you're not building with system boost. What linker are you using, ld or ld.gold?
Comment 9 Simon Xu 2012-09-10 02:05:41 UTC
Build passed in below 32 bit linux environment. For you reference:
# uname -a
Linux *** 2.6.32.59-0.3-pae #1 SMP 2012-04-27 11:14:44 +0200 i686 i686 i386 GNU/Linux

# cat /etc/issue
Welcome to SUSE Linux Enterprise Desktop 11 SP1  (i586) - Kernel \r (\l).

# gcc --version
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]

# ldconfig --version
ldconfig (GNU libc) 2.11.1

# autoconf --version
autoconf (GNU Autoconf) 2.63

Configure options:
./configure --enable-category-b --enable-bundled-dictionaries --disable-build-mozilla --disable-odk --with-jdk-home=/Sym2.0_Env/vobs/bldenv.vob/jdk1.6.0_31 --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.1.tar.bz2 --with-epm-url=http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz --without-junit --with-ant-home=/Sym2.0_Env/vobs/bldenv.vob/apache-ant-1.7.0
Comment 10 SET 2012-09-10 06:04:04 UTC
There are both ld and ld.gold on the system, don't know which one is being used :

$ ld --version
GNU ld (GNU Binutils) 2.22.0.20120323

ld.gold --version
GNU gold (GNU Binutils 2.22.0.20120323) 1.11
Comment 11 Ariel Constenla-Haile 2012-09-10 06:11:37 UTC
(In reply to comment #10)
> There are both ld and ld.gold on the system, don't know which one is being
> used :
> 
> $ ld --version
> GNU ld (GNU Binutils) 2.22.0.20120323
> 
> ld.gold --version
> GNU gold (GNU Binutils 2.22.0.20120323) 1.11

try to use ls to detect it, for example, on Fedora I get:

[ariel@localhost ~]$ ls -l /usr/bin/ld*
lrwxrwxrwx. 1 root root      20 Jun  4 15:48 /usr/bin/ld -> /etc/alternatives/ld
-rwxr-xr-x. 1 root root  883960 Mar 16 12:49 /usr/bin/ld.bfd
-rwxr-xr-x. 1 root root    5323 Aug 15 13:17 /usr/bin/ldd
-rwxr-xr-x. 1 root root 2745968 Mar 16 12:49 /usr/bin/ld.gold


[ariel@localhost ~]$ ls -l /etc/alternatives/ld
lrwxrwxrwx. 1 root root 15 Jun  4 15:48 /etc/alternatives/ld -> /usr/bin/ld.bfd


So ld is a link to ld.bfd
Comment 12 SET 2012-09-10 06:58:22 UTC
/usr/bin/ld and /usr/bin/ld.gold are not symlinks. /etc/alternatives/ld is missing.

By the way, boost is not installed on the machine.
Comment 13 SET 2012-09-10 08:07:06 UTC
Just tried --with-system-boost, same failure.

The build succeeded a few weeks ago both on x86_64 and ARM.
How can I tweak linker flags ?
Comment 14 Wang Lei 2012-09-10 08:49:45 UTC
I will rollback some codes to make build boot build successfully. We suspect the new gcc version cause the problem. We will deploy a new Linux build env and find the build break reason.
Comment 15 SVN Robot 2012-09-10 08:55:52 UTC
"leiw" committed SVN revision 1382698 into trunk:
#i120854 Module sc fails to build
Comment 16 SET 2012-09-10 11:43:29 UTC
OK, it builds fine on x86_64 with the rollback. ARM build still going on. Thanks.

Should I mark it resolved ?
Comment 17 Wang Lei 2012-09-10 13:22:07 UTC
Yes, you can. 
Since i120847 is reopened, we will it to handle other things
Comment 18 SET 2012-09-10 14:03:45 UTC
Closing. (comment required)
Comment 19 Yan Ji 2012-11-30 05:53:37 UTC
Change defect status to closed.