Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410883 - =www-client/chromium-18.0.1025.142 - cc1plus: Error: Incorrect key "-Wno-unused-result"
Summary: =www-client/chromium-18.0.1025.142 - cc1plus: Error: Incorrect key "-Wno-unus...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-05 13:07 UTC by Str4nger
Modified: 2015-05-18 05:03 UTC (History)
2 users (show)

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


Attachments
emerge --info output (emerge.info,4.61 KB, text/plain)
2012-04-05 13:07 UTC, Str4nger
Details
Build log (build.log,45.72 KB, text/plain)
2012-04-05 13:09 UTC, Str4nger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Str4nger 2012-04-05 13:07:44 UTC
Created attachment 307895 [details]
emerge --info output

www-client/chromium-18.0.1025.142
Comment 1 Str4nger 2012-04-05 13:09:08 UTC
Created attachment 307897 [details]
Build log

buil fail with:

cc1plus: ошибка: некорректный ключ "-Wno-unused-result"
cc1plus: ошибка: некорректный ключ "-Wno-unused-result"
Comment 2 Agostino Sarubbo gentoo-dev 2012-04-05 13:20:41 UTC
please add a build log compiled with LC_ALL="C"
Comment 3 Mike Gilbert gentoo-dev 2012-04-05 14:27:37 UTC
Updating summary based on Google translation.
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2012-04-05 14:33:29 UTC
@ago, chromium:

translated:

cc1plus: error: incorrect key "-Wno-unused-result"
cc1plus: error: incorrect key "-Wno-unused-result"
make: *** [out/Release/obj.host/protobuf_full_do_not_use/third_party/protobuf/src/google/protobuf/stubs/substitute.o] Error 1
make: ***  Waiting for unfinished jobs....
cc1plus: error: incorrect key "-Wno-unused-result"
make: *** [out/Release/obj.host/protobuf_full_do_not_use/third_party/protobuf/src/google/protobuf/stubs/strutil.o] Error 1
make: *** [out/Release/obj.host/protobuf_full_do_not_use/third_party/protobuf/src/google/protobuf/stubs/structurally_valid.o] Error 1
 [31;01m*[0m ERROR: www-client/chromium-18.0.1025.142 failed (compile phase):
 [31;01m*[0m   emake failed

I think, that will be correct, because i'm understand russian language.

@str4nger, please do not use russian language, because many devs don't speak this language.
Comment 5 Str4nger 2012-04-05 14:45:50 UTC
When I remove crossdev target (crossdev -C i586-linux-gnu) build was successfull.
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-05 14:54:16 UTC
(In reply to comment #5)
> When I remove crossdev target (crossdev -C i586-linux-gnu) build was
> successfull.

Which gcc version are you using with crossdev (can you update it)? -Wno-unused-result comes from build/common.gypi and there is a comment above it that e.g. gcc-4.2 doesn't support that flag.
Comment 7 Str4nger 2012-04-05 15:01:23 UTC
yes, when I update crossdev target i586-gcc-linux, bug chromium build normal.

But why chromium use gcc from crossdev ?

main system gcc (Gentoo 4.5.3-r2 p1.1, pie-0.4.7) 4.5.3
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-05 19:53:05 UTC
(In reply to comment #7)
> yes, when I update crossdev target i586-gcc-linux, bug chromium build normal.
> 
> But why chromium use gcc from crossdev ?
> 
> main system gcc (Gentoo 4.5.3-r2 p1.1, pie-0.4.7) 4.5.3

Not sure. I don't really know crossdev, and your comments seem a bit inconsistent about what you did (first you said "remove", and now "update" about the crossdev "target").

CC-ing crossdev maintainers. Any ideas?
Comment 9 SpanKY gentoo-dev 2012-04-05 20:08:17 UTC
two things here.  chromium is executing `g++` ... is it doing so to create code to run on the build machine, or is it compiling objects for the target ?  if the former, you should make sure to not mix $CFLAGS and $BUILD_CFLAGS.

secondly, you should find out why `g++` isn't your native g++.  PATH should provide /usr/bin *first*, and then all the target paths.  and none of the target paths should have `g++`, only the native ones.

you can look in /usr/$CHOST/*/gcc-bin/*/ to make sure.
Comment 10 Mike Gilbert gentoo-dev 2012-04-05 20:18:39 UTC
(In reply to comment #9)
> two things here.  chromium is executing `g++` ... is it doing so to create
> code to run on the build machine, or is it compiling objects for the target
> ?  if the former, you should make sure to not mix $CFLAGS and $BUILD_CFLAGS.

I think it is using $(CXX.host), which defaults to g++.

This is in the top-level Makefile (generated by gyp):

CC.target ?= $(CC)
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CXXFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
ARFLAGS.target ?= crsT

CC.host ?= gcc
CFLAGS.host ?=
CXX.host ?= g++
CXXFLAGS.host ?=
LINK.host ?= g++
LDFLAGS.host ?=
AR.host ?= ar
ARFLAGS.host := crsT
Comment 11 Mike Gilbert gentoo-dev 2012-04-05 20:25:12 UTC
Also, I think "host" is actually equivalent to "build" in the autotools sense. It looks like it is building a copy of protobuf that will used later in the build process.
Comment 12 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-10 10:54:42 UTC
(In reply to comment #10)
> I think it is using $(CXX.host), which defaults to g++.
> 
> This is in the top-level Makefile (generated by gyp):

Thank you for finding that. Str4nger, could you please test chromium-19.0.1084.15?
Comment 13 Str4nger 2012-04-11 05:37:22 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > I think it is using $(CXX.host), which defaults to g++.
> > 
> > This is in the top-level Makefile (generated by gyp):
> 
> Thank you for finding that. Str4nger, could you please test
> chromium-19.0.1084.15?

Build was successfull, thanks !
Comment 14 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-04-11 06:10:58 UTC
(In reply to comment #13)
> Build was successfull, thanks !

Closing then, thanks for testing.
Comment 15 SpanKY gentoo-dev 2013-02-17 18:55:03 UTC
(In reply to comment #11)

i'm not sure the change that went in is correct.  the ebuild says:
    emake ${make_targets} BUILDTYPE=Release V=1 \
        CC.host="$(tc-getCC)" CFLAGS.host="${CFLAGS}" \
        CXX.host="$(tc-getCXX)" CXXFLAGS.host="${CXXFLAGS}" \
        LINK.host="$(tc-getCXX)" LDFLAGS.host="${LDFLAGS}" \
        AR.host="$(tc-getAR)" || die

pretty sure those should all be tc-getBUILD_XX and BUILD_XXFLAGS

you can use tc-export_build_env to initialize the BUILD_XXX vars:
  tc-export_build_env BUILD_{AR,CC,CXX}
Comment 16 Mike Gilbert gentoo-dev 2013-02-17 18:59:05 UTC
Agreed. I touched on that in comment 10.
Comment 17 Mike Gilbert gentoo-dev 2013-02-17 18:59:50 UTC
Err, I mean comment 11... which you replied to. :P
Comment 18 SpanKY gentoo-dev 2013-02-17 19:05:40 UTC
also, you're running tc-export in pkg_setup.  that doesn't make sense.  it should be in src_configure.
Comment 19 Mike Gilbert gentoo-dev 2013-02-17 20:22:23 UTC
I have updated chromium-26.0.1403.0 and chromium-9999-r1 as suggested.