Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503468 - dev-libs/boost-1.55.0-r1 USE=tools - regression/src/compiler_status.cpp:131:20: error: ‘itr’ does not name a type
Summary: dev-libs/boost-1.55.0-r1 USE=tools - regression/src/compiler_status.cpp:131:2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: C++ Team [disbanded]
URL:
Whiteboard:
Keywords: PATCH
: 504970 506262 506630 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-05 00:45 UTC by Jeremy Murphy
Modified: 2014-04-07 10:06 UTC (History)
21 users (show)

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


Attachments
build.log (build.log,356.14 KB, text/plain)
2014-03-05 00:45 UTC, Jeremy Murphy
Details
c++98.patch (c++98.patch,562 bytes, patch)
2014-03-18 00:33 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Murphy 2014-03-05 00:45:36 UTC
Created attachment 371752 [details]
build.log

Compile error on compiler_status.cpp:

    "x86_64-pc-linux-gnu-g++"  -ftemplate-depth-128 -O2 -pipe -w -march=native -std=gnu++98 -finline-functions -Wno-inline -Wall -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG  -I".." -c -o "regression/build/bin/gcc-4.7/gentoorelease/link-static/pch-off/threading-multi/compiler_status.o" "regression/src/compiler_status.cpp"

regression/src/compiler_status.cpp: In function ‘std::string {anonymous}::revision(const boost::filesystem::path&)’:
regression/src/compiler_status.cpp:131:20: error: ‘itr’ does not name a type
regression/src/compiler_status.cpp:131:41: error: expected ‘;’ before ‘itr’
regression/src/compiler_status.cpp:131:41: error: ‘itr’ was not declared in this scope
Comment 1 Gary E. Miller 2014-03-05 04:55:37 UTC
+1 for me
Comment 2 Erik Zeek 2014-03-05 05:00:01 UTC
The problem is the use of C++11 when C++98 is being forced:

    "x86_64-pc-linux-gnu-g++"  -ftemplate-depth-128 -O2 -pipe -mtune=native -march=native -O2 -std=gnu++98 -finline-functions -Wno-inline -Wall -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_S
YSTEM_STATIC_LINK=1 -DNDEBUG  -I".." -c -o "regression/build/bin/gcc-4.8/gentoorelease/link-static/pch-off/threading-multi/compiler_status.o" "regression/src/compiler_status.cpp"

regression/src/compiler_status.cpp: In function ‘std::string {anonymous}::revision(const boost::filesystem::path&)’:
regression/src/compiler_status.cpp:131:15: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
           for(auto itr = ln.begin()+10; itr != ln.end() && isdigit(*itr); ++itr)
               ^
regression/src/compiler_status.cpp:131:20: error: ‘itr’ does not name a type
           for(auto itr = ln.begin()+10; itr != ln.end() && isdigit(*itr); ++itr)
                    ^
regression/src/compiler_status.cpp:131:41: error: expected ‘;’ before ‘itr’
           for(auto itr = ln.begin()+10; itr != ln.end() && isdigit(*itr); ++itr)
Comment 3 Juergen Rose 2014-03-07 07:39:58 UTC
I have the same issue. Is there any patch?
Comment 4 Eric Grüttefien 2014-03-12 13:24:13 UTC
+1 for me
Comment 5 Taahir Ahmed 2014-03-12 21:59:46 UTC
It seems to be an upstream problem -- it happens when I try to build the tarball from distfiles by itself.  For some reason b2 is wanting to insert the flag requiring c++98.

For now, disabling the tools use flag disables building the broken code.
Comment 6 Ed Catmur 2014-03-18 00:33:06 UTC
boost-1.55.0-r1.ebuild:

        # Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard.
        append-cxxflags -std=gnu++98

Should be easy to make it C++98 compatible though.
Comment 7 Ed Catmur 2014-03-18 00:33:56 UTC
Created attachment 372900 [details, diff]
c++98.patch
Comment 8 Andreas Proteus 2014-03-18 01:53:45 UTC
(In reply to Ed Catmur from comment #7)
Patch works here.
Tools compiled fine.
Thank you.
Comment 9 Alex Xu (Hello71) 2014-03-18 14:58:12 UTC
*** Bug 504970 has been marked as a duplicate of this bug. ***
Comment 10 Daniel Troeder 2014-03-24 13:41:44 UTC
(In reply to Ed Catmur from comment #7)
> Created attachment 372900 [details, diff] [details, diff]
> c++98.patch
Works for me.
Comment 11 Herbert Wantesh 2014-03-24 19:19:47 UTC
(In reply to Ed Catmur from comment #7)
> Created attachment 372900 [details, diff] [details, diff]
> c++98.patch

+1 for me
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-30 22:11:20 UTC
*** Bug 506262 has been marked as a duplicate of this bug. ***
Comment 13 Vladimir Miloserdov 2014-03-31 05:07:14 UTC
Why is it still unconfirmed? There are 11 votes and 2 duplicates.
Comment 14 Marius Caldas 2014-04-02 04:15:26 UTC
I had the same bug and the patch fixed it.
Comment 15 Sergey Popov gentoo-dev 2014-04-04 07:02:24 UTC
*** Bug 506630 has been marked as a duplicate of this bug. ***
Comment 16 Jon Gerdes 2014-04-05 18:10:18 UTC
(In reply to Ed Catmur from comment #7)
> Created attachment 372900 [details, diff] [details, diff]
> c++98.patch

Patch works for me on ~amd64.

The addition of epatch_user would go down well in Boost ...
Comment 17 Sergey Popov gentoo-dev 2014-04-07 10:06:00 UTC
+  07 Apr 2014; Sergey Popov <pinkbyte@gentoo.org> boost-1.55.0-r1.ebuild,
+  +files/boost-1.55.0-tools-c98-compat.patch:
+  Fix building with USE='tools', wrt bug #506064, patch by Ed Catmur <ed AT
+  catmur.co.uk>