Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386905 - sci-physics/root - lib/libRIO.so: undefined reference to `int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int)'
Summary: sci-physics/root - lib/libRIO.so: undefined reference to `int TStreamerInfo::...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 14:16 UTC by Ruggero Morsucci
Modified: 2012-03-29 18:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sci-physics/root-5.26.00e-r1 build log (sci-physics_root-5.26.00e-r1.build.log.bz2,92.13 KB, application/bzip2)
2011-10-12 14:17 UTC, Ruggero Morsucci
Details
sci-physics/root-5.28.00d build log (sci-physics_root-5.28.00d.build.log.bz2,63.55 KB, application/bzip2)
2011-10-12 14:21 UTC, Ruggero Morsucci
Details
emerge --info (emerge.info,7.61 KB, text/plain)
2011-10-21 14:46 UTC, Ruggero Morsucci
Details
sci-physics/root-5.30.03 build log (sci-physics_root-5.30.03.build.log.bz2,58.05 KB, application/octet-stream)
2011-10-21 14:50 UTC, Ruggero Morsucci
Details
patch for root-5.26.00e-r1.ebuild (root-5.26.00e-r1.ebuild.patch,820 bytes, patch)
2011-10-26 13:02 UTC, Ruggero Morsucci
Details | Diff
A piece of compiletion log (root.log,2.56 KB, text/plain)
2011-12-08 19:23 UTC, Jauhien Piatlicki (RETIRED)
Details
emerge --info (emerge.info,4.62 KB, text/plain)
2011-12-08 19:27 UTC, Jauhien Piatlicki (RETIRED)
Details
root-5.28.00d.ebuild.patch (root-5.28.00d.ebuild.patch,434 bytes, patch)
2011-12-09 07:31 UTC, Jauhien Piatlicki (RETIRED)
Details | Diff
root-5.32.01.ebuild.patch (root-5.32.01.ebuild.patch,287 bytes, patch)
2012-03-08 14:40 UTC, Andrew Savchenko
Details | Diff
root-5.32.01-TStreamerInfo.patch (root-5.32.01-TStreamerInfo.patch,510 bytes, patch)
2012-03-08 17:28 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruggero Morsucci 2011-10-12 14:16:28 UTC
sci-physics/root-5.26.00e-r1 and sci-physics/root-5.28.00d with sys-devel/gcc-4.5.3-r1 exit with error:

lib/libRIO.so: undefined reference to `int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int)'


Reproducible: Always
Comment 1 Ruggero Morsucci 2011-10-12 14:17:51 UTC
Created attachment 289655 [details]
sci-physics/root-5.26.00e-r1 build log
Comment 2 Ruggero Morsucci 2011-10-12 14:21:57 UTC
Created attachment 289657 [details]
sci-physics/root-5.28.00d build log
Comment 3 Andrew Savchenko gentoo-dev 2011-10-21 12:40:54 UTC
Can you, please, provide your emerge --info?
I can't reproduce your problem.

Can you alto try root-5.30.03 from science overlay?
Comment 4 Ruggero Morsucci 2011-10-21 14:46:35 UTC
Created attachment 290455 [details]
emerge --info
Comment 5 Ruggero Morsucci 2011-10-21 14:50:34 UTC
Created attachment 290457 [details]
sci-physics/root-5.30.03 build log

I've disable from command line this use flag: "-X -reflex -math -opengl"
Comment 6 Andrew Savchenko gentoo-dev 2011-10-21 19:11:18 UTC
I tried to build using exactly your use flags, but on ~x86 (I have no amd64 where I can conduct this test): 

"-X -afs -avahi clarens -doc -emacs -examples fftw -fits graphviz kerberos ldap llvm -math mpi mysql ncurses odbc -opengl openmp -oracle postgres -prefix -pythia6 -pythia8 python -qt4 -reflex -ruby ssl xinetd -xft xml xrootd -afs -avahi -emacs ldap llvm odbc openmp -oracle postgres -prefix -ruby xinetd"

And I can't reproduce your problem.

Also looks like a gcc bug:
http://root.cern.ch/phpBB3/viewtopic.php?t=9273
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056

But it is claimed to be fixed in gcc>=4.5.x
Try to disable ccache and build again.
Comment 7 Ruggero Morsucci 2011-10-26 13:02:09 UTC
Created attachment 290875 [details, diff]
patch for root-5.26.00e-r1.ebuild

I try with ccache disabled but problem still remain, i've read about gcc bug in bugzilla and i've try to compile with -O and all work, thanks Andrew Savchenko.

I think this patch fix the issue with amd64 arch, i've only this arch but if someone else have the same problem, we can add to the list.
Comment 8 Jauhien Piatlicki (RETIRED) gentoo-dev 2011-12-08 19:23:38 UTC
Created attachment 295209 [details]
A piece of compiletion log
Comment 9 Jauhien Piatlicki (RETIRED) gentoo-dev 2011-12-08 19:24:44 UTC
So, I have the same problem.
Comment 10 Jauhien Piatlicki (RETIRED) gentoo-dev 2011-12-08 19:27:22 UTC
Created attachment 295213 [details]
emerge --info
Comment 11 Jauhien Piatlicki (RETIRED) gentoo-dev 2011-12-09 07:31:34 UTC
Created attachment 295267 [details, diff]
root-5.28.00d.ebuild.patch

The solution of Ruggero Morsucci suggested by Andrew Savchenko works for me. It seems that problem really is in this gcc bug.
Comment 12 Andrew Savchenko gentoo-dev 2012-02-25 11:49:49 UTC
Please try 5.32.00-r2 and report back if you still have this problem.
Comment 13 Jauhien Piatlicki (RETIRED) gentoo-dev 2012-03-06 20:51:12 UTC
I've tried version 5.32.00-r2 and still had this problem. Above mentioned solution worked for me.
Comment 14 Andrew Savchenko gentoo-dev 2012-03-08 13:52:04 UTC
From all your build logs and emerge --info I see that you are using -O3 flag. Does root builds for you with -O2 ? Also please specify a gcc version you are using.
Comment 15 Andrew Savchenko gentoo-dev 2012-03-08 14:40:09 UTC
Created attachment 304633 [details, diff]
root-5.32.01.ebuild.patch

I can't reproduce the problem while building with -O3, but I was able to reproduce gcc bug 40056 with -O3, but not with -O2.

The problem lies in -fipa-cp-clone option, with -O3 -fno-ipa-cp-clone testcase builds well: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056

Please try the following ebuild patch. For older ebuilds apply the similar change.
Comment 16 Andrew Savchenko gentoo-dev 2012-03-08 14:44:31 UTC
In any case this is a gcc bug and I do not want to disable the whole -O2 optimization for all users as this will hurt performance much.

In the best case this should be fixed in gcc. Removal of some dangerous -O3 optimizing suboptions is also acceptable. If this problem happens only to TStreamerInfoReadBuffer.cxx, -O[23] may be replaced by -O for this file only.

If proposed patch doesn't help you, please try to find out what exact gcc optimization option causes failure to you. List of options behind -O2 and -O3 can be found in gcc manual (this list varies from one gcc version to another). ccache is your friend here.
Comment 17 Andrew Savchenko gentoo-dev 2012-03-08 17:25:44 UTC
After build failure please cd to /var/tmp/portage/sci-physics/root-5.30.03/work/root and run:

x86_64-pc-linux-gnu-g++ -O3 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -c /var/tmp/portage/sci-physics/root-5.30.03/work/root/io/io/src/TStreamerInfoReadBuffer.cxx -E > TStreamerInfoReadBuffer.ii

Then upload TStreamerInfoReadBuffer.ii here.
Comment 18 Andrew Savchenko gentoo-dev 2012-03-08 17:28:42 UTC
Created attachment 304645 [details, diff]
root-5.32.01-TStreamerInfo.patch

Also you may try the following patch. Apply it without previously proposed ebuild patch. But, please, provide TStreamerInfoReadBuffer.ii before applying this patch.
Comment 19 Andrew Savchenko gentoo-dev 2012-03-08 17:29:39 UTC
(In reply to comment #18)
> Created attachment 304645 [details, diff] [details, diff]
> root-5.32.01-TStreamerInfo.patch

This patch may be applied to older version of root of course.
Comment 20 Andrew Savchenko gentoo-dev 2012-03-08 22:25:49 UTC
Forget everything I wrote above.
Real fix was just made by ROOT upstream.
Will bump soon.
Comment 21 Andrew Savchenko gentoo-dev 2012-03-09 01:42:22 UTC
Please try any ebuild from science overlay. Please resync first. Versions updated: 5.32.01, 5.28.00h, 5.26.00g.
Comment 22 Jauhien Piatlicki (RETIRED) gentoo-dev 2012-03-09 19:21:18 UTC
I can not test version 5.32.01 because of Bug 386905, but I've tested 5.28.00h and had no problems during compilation.
Comment 23 Jauhien Piatlicki (RETIRED) gentoo-dev 2012-03-09 19:23:51 UTC
(In reply to comment #22)
> I can not test version 5.32.01 because of Bug 386905, but I've tested
> 5.28.00h and had no problems during compilation.

Sorry, not Bug 386905 but Bug 406817.
Comment 24 Andrew Savchenko gentoo-dev 2012-03-23 00:43:05 UTC
This problem should be fixed now for all supported branches.
Please close this bug.
Comment 25 Sébastien Fabbro (RETIRED) gentoo-dev 2012-03-29 18:22:41 UTC
(In reply to comment #24)
> This problem should be fixed now for all supported branches.

closing.