Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198626 - net-libs/rb_libtorrent-0.12 won't compile with GCC 4.2.2 (replaced atomicity.h since GCC 4.2.2 blocks compile)
Summary: net-libs/rb_libtorrent-0.12 won't compile with GCC 4.2.2 (replaced atomicity....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Raúl Porcel (RETIRED)
URL:
Whiteboard:
Keywords:
: 206951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-10 08:18 UTC by Jan K
Modified: 2008-01-21 23:10 UTC (History)
4 users (show)

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


Attachments
result of "emerge --info" command on my computer (emergeinfo,3.34 KB, text/plain)
2007-11-10 22:02 UTC, Jan K
Details
the whole emerge log, run using command "emerge rb_libtorrent" (emerge-rb_lintorrent,20.94 KB, text/plain)
2007-11-10 22:03 UTC, Jan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan K 2007-11-10 08:18:08 UTC
Since in GCC v. 4.2.2 some libs are replaced, a header file from package dev-libs/boost is trying to include while compiling net-libs/rb_libtorrent an unexisting file bits/atomicity.h

=========== Emerge faliure Code =================
In file included from /usr/include/boost/detail/atomic_count.hpp:97,
                 from ../include/libtorrent/peer_connection.hpp:55,
                 from bandwidth_manager.cpp:35:
/usr/include/boost/detail/atomic_count_gcc.hpp:20:28: error: bits/atomicity.h: No such file or directory
In file included from /usr/include/boost/detail/atomic_count.hpp:97,
                 from ../include/libtorrent/peer_connection.hpp:55,
                 from allocate_resources.cpp:53:
=================================================

I located the atomicly.h header, and now it is located in ext/atomicity.h instead of bits/atomicity.h.
A temporary, simple and working solution for that is sym-linking the library, that is:
------- Solution (GCC 4.2.2 only)-------
cd /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include/g++-v4/
ln -s ./ext/atomicity.h ./bits/atomicity.h
----------------------------------------

I think the package QBitTorrent needs to be re-emerged at every update of curl (as my needed), and the error also appears if you try to emerge it.

I don't know weather some other apps are affectes as well, but they may be as if they also use the header.

Bug 177345 may also have some connection with this problem.


================================================
I wtore about GCC v. 4.2.2 (it's ~x86, i think) but some problems are as well for other versions:

I got  "gcc-config -l"
 [1] i686-pc-linux-gnu-3.3.6
 [2] i686-pc-linux-gnu-4.1.2
 [3] i686-pc-linux-gnu-4.2.2 *
profiles, and both 3.3.6 and 4.1.2 have the atomicity.h file in correct folder.

Under i686-pc-linux-gnu-4.1.2 whiel ./configure I got error
configure: error: Unable to find Boost.DateTime library, currently this is required.
do this version of GCC also can't compile it proprtly for me, though I have the boost compiled correctly, and GCC4.2.2 sees the file. (and I think this is problem with my comp only, but somebody could check it as well)

The application doesn't support GCC v.3, so also emerging using the profile fails.

Reproducible: Always

Steps to Reproduce:
1.Use GCC 4.2.2
2.Emerge rb_libtorrent
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2007-11-10 12:58:14 UTC
hmm, it works fine here.  could you post your emerge --info and the full build log?
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2007-11-10 13:03:34 UTC
actually, try building boost with GCC 4.2.2 first and see if that does the trick.
Comment 3 Jan K 2007-11-10 22:02:03 UTC
Created attachment 135679 [details]
result of "emerge --info" command on my computer
Comment 4 Jan K 2007-11-10 22:03:20 UTC
Created attachment 135681 [details]
the whole emerge log, run using command "emerge rb_libtorrent"
Comment 5 Jan K 2007-11-10 22:12:16 UTC
>actually, try building boost with GCC 4.2.2 first and see if that does the
>trick.

It doesn't help, and I already recompiled boost about 3 times (changed use flags etc.) with GCC 4.2.2 so it's not that problem.
And I think that "error: Unable to find Boost.DateTime library" while using gcc 4.1.2 may be caused exactly beacuse I emerged boost using gcc 4.2.2

I add both attachments (build log and emerge --info)

And I did some two weeks ago emerge -D world on gcc 4.2.2, so it can have some connection to updating the system, what's more, after a longer break. But everything else works.  
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2007-11-13 03:57:47 UTC
This works for me as well:

/usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.2/include/g++-v4/ext/atomicity.h

Do you have that file (replace lib64 if appropriate)?
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2007-11-13 04:01:48 UTC
Nevermind, I can't read.  What version of boost?  dev-libs/boost-1.34.1 has something that fixes this:

#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
# include <ext/atomicity.h>
#else
# include <bits/atomicity.h>
#endif
Comment 8 Jan K 2007-11-14 22:16:01 UTC
"4.2.2/include/g++-v4/ext/atomicity.h  Do you have that file" - yes, and my 'temporary' solution was to symlink it to a right place

"What version of boost?  dev-libs/boost-1.34.1 has
something that fixes this:"
↑ This is the very problem!

The stable package:
*  dev-libs/boost  Latest version available: 1.33.1-r1

The unstable package (ACCEPT_KEYWORDS="~x86" emerge -s boost):
*  dev-libs/boost
      Latest version available: 1.34.1
      Latest version installed: 1.33.1-r1

So I think this bug appears only if you have unstable GCC (v. 4.2), stable boost and you are trying to merge stable rb_libtorrent. (I know that that is a very strange set of apps.)

The solution? Emerge the unstable boost.

So I'm closing the bug, even if somebody will have the same problem, he'll find the solution here.
Thanks for help!
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2007-11-14 22:28:24 UTC
Tiziano, is boost 1.34.0-r1 or later ready for stabilization?
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2008-01-21 23:10:40 UTC
*** Bug 206951 has been marked as a duplicate of this bug. ***