Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657472 - www-client/chromium-68.0.3438.3: compilation errors with gcc-6.4.0
Summary: www-client/chromium-68.0.3438.3: compilation errors with gcc-6.4.0
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
: 662524 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-06 17:36 UTC by Marcus Comstedt
Modified: 2018-09-22 17:06 UTC (History)
8 users (show)

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


Attachments
Output from emerge --info (emerge.info,5.59 KB, text/plain)
2018-06-06 17:37 UTC, Marcus Comstedt
Details
Patch for first compilation error (size_t-declaration.patch,307 bytes, patch)
2018-06-06 17:38 UTC, Marcus Comstedt
Details | Diff
Patch for second compilation error, based on upstreams fix (C++-17-move-insert.patch,1.13 KB, patch)
2018-06-06 17:39 UTC, Marcus Comstedt
Details | Diff
emerge --info (emerge_info.out.xz,7.95 KB, application/octet-stream)
2018-06-19 10:16 UTC, Tamas Jantvik
Details
emerge --info (emerge.info,5.55 KB, text/plain)
2018-06-19 17:07 UTC, Norman Shulman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2018-06-06 17:36:03 UTC
When compiling chromium-68.0.3438.3 on aarch64 with gcc 6.4.0, two different
issues were encountered:

#1 The header file media/base/subsample_entry.h uses the C type "size_t" without
   including a header file which is guaranteed to define it.  This results in
   the following compilation failure

In file included from ../../media/base/subsample_entry.cc:5:
../../media/base/subsample_entry.h:38:5: error: unknown type name 'size_t'; did you mean '__gnu_cxx::size_t'?
    size_t input_size);
    ^~~~~~
    __gnu_cxx::size_t
/usr/lib/gcc/aarch64-unknown-linux-gnu/6.4.0/include/g++-v6/ext/new_allocator.h:44:14: note: '__gnu_cxx::size_t' declared here
  using std::size_t;
             ^

#2 In two files, content/renderer/input/input_event_prediction.cc and
   content/browser/background_fetch/background_fetch_context.cc, a C++-17
   API is used (despite the code being compiled with -std=gnu++14!) which
   was not implemented in libstdc++ before gcc 7.3.  (In upstreams the code
   has been fixed to not use the new API.)  The compilation error is along the
   lines of

120:23: error: call to implicitly-deleted copy constructor of 'std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<content::BackgroundFetchJobController, std::default_delete<content::BackgroundFetchJobController> > >'



Reproducible: Always

Steps to Reproduce:
Build chromium-68.0.3438.3.ebuild using gcc 6.4 (and possibly glibc-2.26-r7)

Actual Results:  
FTBFS

Expected Results:  
Successful compilation
Comment 1 Marcus Comstedt 2018-06-06 17:37:02 UTC
Created attachment 535034 [details]
Output from emerge --info
Comment 2 Marcus Comstedt 2018-06-06 17:38:56 UTC
Created attachment 535036 [details, diff]
Patch for first compilation error
Comment 3 Marcus Comstedt 2018-06-06 17:39:43 UTC
Created attachment 535038 [details, diff]
Patch for second compilation error, based on upstreams fix
Comment 4 Mike Gilbert gentoo-dev 2018-06-06 18:45:00 UTC
Please submit your first patch upstream if you have not already done so.
Comment 5 Marcus Comstedt 2018-06-08 09:45:53 UTC
Hi.  It looks like the first fix has already been applied by upstreams, in 69.0.3445.0 and later.
Comment 6 Thomas Bettler 2018-06-16 09:02:41 UTC
+1 confirm bug happens with chromium-68.0.3440.25
+1 these 2 patches solve the bug
Comment 7 Tamas Jantvik 2018-06-19 10:14:55 UTC
With the patches I for one get past those errors, even with www-client/chromium-68.0.3440.25. But it chokes later on:

[19713/20753] python "../../build/toolchain/gcc_link_wrapper.py" --output="./torque" -- x86_64-pc-linux-gnu-clang++ -pie -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -Wl,-rpath-link=. -Wl,--disable-new-dtags -Wl,-O1 -Wl,--as-needed -o "./torque" -Wl,--start-group @"./torque.rsp"  -Wl,--end-group   -latomic -ldl -lpthread -lrt
FAILED: torque
python "../../build/toolchain/gcc_link_wrapper.py" --output="./torque" -- x86_64-pc-linux-gnu-clang++ -pie -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -Wl,-rpath-link=. -Wl,--disable-new-dtags -Wl,-O1 -Wl,--as-needed -o "./torque" -Wl,--start-group @"./torque.rsp"  -Wl,--end-group   -latomic -ldl -lpthread -lrt
obj/v8/torque/TorqueLexer.o:TorqueLexer.cpp:function TorqueLexer::TorqueLexer(antlr4::CharStream*): error: undefined reference to '_Unwind_Resume'
obj/v8/torque/TorqueLexer.o:TorqueLexer.cpp:function TorqueLexer::Initializer::Initializer(): error: undefined reference to '_Unwind_Resume'
obj/v8/torque/TorqueLexer.o:TorqueLexer.cpp:function TorqueLexer::Initializer::Initializer(): error: undefined reference to '_Unwind_Resume'
obj/v8/torque/TorqueLexer.o:TorqueLexer.cpp:function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* std::__uninitialized_copy<false>::__uninit_copy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*): error: undefined reference to '_Unwind_Resume'
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

I see that the ebuild forces clang, so even if I don't explicitly set it it's used (clang++ when explicitly set, and x86_64-pc-linux-gnu-clang++ when not). I've only got clang 6.0.0-r1 installed now, but iirc it choked when I had both 5.0.2 and 6.0.0-r1.
Comment 8 Tamas Jantvik 2018-06-19 10:16:54 UTC
Created attachment 536316 [details]
emerge --info
Comment 9 Norman Shulman 2018-06-19 17:06:53 UTC
With these patches and sys-devel/clang-5.0.2 I get

[31429/31683] python "../../build/toolchain/gcc_link_wrapper.py" --output="./mksnapshot" -- x86_64-pc-linux-gnu-clang++ -pie -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -Wl,-rpath-link=. -Wl,--disable-new-dtags -Wl,-O1 -Wl,--as-needed -o "./mksnapshot" -Wl,--start-group @"./mksnapshot.rsp"  -Wl,--end-group   -latomic -ldl -lpthread -lrt -licui18n -licuuc -licudata 
[31430/31683] python ../../v8/tools/run.py ./mksnapshot --turbo_instruction_scheduling --random-seed 314159265 --startup_blob snapshot_blob.bin
FAILED: snapshot_blob.bin 
python ../../v8/tools/run.py ./mksnapshot --turbo_instruction_scheduling --random-seed 314159265 --startup_blob snapshot_blob.bin


#
# Fatal error in , line 0
# Check failed: SetPermissions(protect_start, protect_size, PageAllocator::kReadExecute).
#
#
#
#FailureMessage Object: 0x3fdbb5cecb0
==== C stack trace ===============================

    ./mksnapshot(+0x9686a3) [0x1ced49f6a3]
    ./mksnapshot(+0x96324b) [0x1ced49a24b]
    ./mksnapshot(+0x95d142) [0x1ced494142]
    ./mksnapshot(+0x49de99) [0x1cecfd4e99]
    ./mksnapshot(+0x4478ca) [0x1cecf7e8ca]
    ./mksnapshot(+0x42bf8d) [0x1cecf62f8d]
    ./mksnapshot(+0x8ef833) [0x1ced426833]
    ./mksnapshot(+0x8efde9) [0x1ced426de9]
    ./mksnapshot(+0x50122a) [0x1ced03822a]
    ./mksnapshot(+0xa6775) [0x1cecbdd775]
    ./mksnapshot(+0x9dfcb) [0x1cecbd4fcb]
    /lib64/libc.so.6(__libc_start_main+0xfd) [0x3f8d86500dd]
    ./mksnapshot(+0x9dd8a) [0x1cecbd4d8a]
ninja: build stopped: subcommand failed.
 * ERROR: www-client/chromium-68.0.3440.25::gentoo failed (compile phase):
Comment 10 Norman Shulman 2018-06-19 17:07:42 UTC
Created attachment 536430 [details]
emerge --info
Comment 11 Mike Gilbert gentoo-dev 2018-06-19 18:09:48 UTC
(In reply to Norman Shulman from comment #9)

It looks like you are running a PaX kernel. I am not going to support that moving forward.
Comment 12 Mike Gilbert gentoo-dev 2018-06-19 18:11:53 UTC
Also, this bug report is not a dumping ground for any compile issue you have with chromium-68. Unless you have something to contribute to the original error reported here, create a new bug please.
Comment 13 Armitage 2018-07-31 12:09:32 UTC
The patch attached in the comment:2 (the size_t compilation error) is also needed for chromium-68.0.3440.75.

I'm compiling the patched chromium in order to check if the patch attached in the comment:3 is also needed for chromium-68.0.3440.75.
Comment 14 Armitage 2018-07-31 15:16:36 UTC
I can confirm that the patch attached on the comment#3 is also needed for chromium-68.0.3440.75.
Comment 15 Mike Gilbert gentoo-dev 2018-07-31 17:21:35 UTC
*** Bug 662524 has been marked as a duplicate of this bug. ***
Comment 16 Pistos 2018-08-08 17:23:14 UTC
For what it's worth, when I updated my system to use gcc-7.x, I was able to compile Chromium.  I did get the same issue as OP, though, when still using gcc 6.4.0.
Comment 17 yves.caniou 2018-08-14 08:47:19 UTC
For what it's worth, compiling hromium-68.0.3440.75 with gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0 gives again the error:

In file included from ../../media/base/subsample_entry.cc:5:
../../media/base/subsample_entry.h:38:5: error: unknown type name 'size_t'; did you mean '__gnu_cxx::size_t'?
    size_t input_size);
    ^~~~~~
    __gnu_cxx::size_t
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/ext/new_allocator.h:44:14: note: '__gnu_cxx::size_t' declared here
  using std::size_t;
             ^
1 error generated.

Will update to gcc-7.3
Comment 18 Mike Gilbert gentoo-dev 2018-09-22 17:06:59 UTC
I'm not supporting GCC6 at this point. Please upgrade to GCC7 or better.