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
Created attachment 535034 [details] Output from emerge --info
Created attachment 535036 [details, diff] Patch for first compilation error
Created attachment 535038 [details, diff] Patch for second compilation error, based on upstreams fix
Please submit your first patch upstream if you have not already done so.
Hi. It looks like the first fix has already been applied by upstreams, in 69.0.3445.0 and later.
+1 confirm bug happens with chromium-68.0.3440.25 +1 these 2 patches solve the bug
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.
Created attachment 536316 [details] emerge --info
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):
Created attachment 536430 [details] emerge --info
(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.
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.
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.
I can confirm that the patch attached on the comment#3 is also needed for chromium-68.0.3440.75.
*** Bug 662524 has been marked as a duplicate of this bug. ***
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.
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
I'm not supporting GCC6 at this point. Please upgrade to GCC7 or better.