Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663004 - www-client/chromium-70.0.3510.0 fails to compile with "error: no template named 'unique_ptr' in namespace 'std'"
Summary: www-client/chromium-70.0.3510.0 fails to compile with "error: no template nam...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 2 votes (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-07 08:07 UTC by Stefan Radermacher
Modified: 2020-07-07 17:20 UTC (History)
5 users (show)

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


Attachments
compressed build log (build.log.tar.xz,468.50 KB, application/x-xz)
2018-08-07 08:08 UTC, Stefan Radermacher
Details
Environment from the build directory (environment,193.19 KB, text/plain)
2018-08-07 08:09 UTC, Stefan Radermacher
Details
emerge --info output (emerge.info,6.30 KB, text/plain)
2018-08-07 08:09 UTC, Stefan Radermacher
Details
chromium-70.0.3521.2-unique-ptr.patch (chromium-70.0.3521.2-unique-ptr.patch,1017 bytes, patch)
2018-09-10 14:31 UTC, Nick
Details | Diff
chromium-70.0.3521.2.ebuild (chromium-70.0.3521.2.ebuild,20.33 KB, text/plain)
2018-09-10 14:33 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Radermacher 2018-08-07 08:07:10 UTC
Compilation fails with this error:

In file included from ../../extensions/browser/verified_contents.cc:5:
../../extensions/browser/verified_contents.h:34:15: error: no template named 'unique_ptr' in namespace 'std'

Reproducible: Always

Steps to Reproduce:
1. unmask package
2. emerge package
Comment 1 Stefan Radermacher 2018-08-07 08:08:57 UTC
Created attachment 542656 [details]
compressed build log
Comment 2 Stefan Radermacher 2018-08-07 08:09:27 UTC
Created attachment 542658 [details]
Environment from the build directory
Comment 3 Stefan Radermacher 2018-08-07 08:09:44 UTC
Created attachment 542660 [details]
emerge --info output
Comment 4 Mike Lothian 2018-08-08 14:34:59 UTC
After looking at https://stackoverflow.com/questions/31655462/no-type-named-unique-ptr-in-namespace-std-when-compiling-under-llvm-clang I thought I'd try libcxx and adding -stdlib=libc++ to my CXXFLAGS

I'll let you know how I get on
Comment 5 Mike Lothian 2018-08-08 20:07:26 UTC
With that passed in to CXXFLAGS and LDFLAGS it got right to the end before erroring on:

[33048/33048] python "../../build/toolchain/gcc_link_wrapper.py" --output="./chrome" -- clang++ -pie -Wl,--version-script=../../build/linux/chrome.map -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -rdynamic -Wl,-rpath-link=. -Wl,--disable-new-dtags -O3 -pipe -flto=thin -march=native -stdlib=libc++ -o "./chrome" -Wl,--start-group @"./chrome.rsp"  -Wl,--end-group   -latomic -ldl -lpthread -lrt -lX11 -lX11-xcb -lxcb -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lXtst -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lcups -lz -lm -lcrypt -lxml2 -lexpat -lfontconfig -ldbus-1 -lXss -lpng16 -lwebpdemux -lwebpmux -lwebp -lfreetype -ljpeg -lharfbuzz -ldrm -lXrandr -lresolv -lgio-2.0 -lre2 -lsnappy -lpci -lasound -lpangocairo-1.0 -lpango-1.0 -lcairo -latk-1.0 -latk-bridge-2.0 -lminizip -lFLAC -lopenh264 -lgtk-3 -lgdk-3 -lcairo-gobject -lgdk_pixbuf-2.0 -lxslt 
FAILED: chrome 
python "../../build/toolchain/gcc_link_wrapper.py" --output="./chrome" -- clang++ -pie -Wl,--version-script=../../build/linux/chrome.map -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -rdynamic -Wl,-rpath-link=. -Wl,--disable-new-dtags -O3 -pipe -flto=thin -march=native -stdlib=libc++ -o "./chrome" -Wl,--start-group @"./chrome.rsp"  -Wl,--end-group   -latomic -ldl -lpthread -lrt -lX11 -lX11-xcb -lxcb -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lXtst -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lcups -lz -lm -lcrypt -lxml2 -lexpat -lfontconfig -ldbus-1 -lXss -lpng16 -lwebpdemux -lwebpmux -lwebp -lfreetype -ljpeg -lharfbuzz -ldrm -lXrandr -lresolv -lgio-2.0 -lre2 -lsnappy -lpci -lasound -lpangocairo-1.0 -lpango-1.0 -lcairo -latk-1.0 -latk-bridge-2.0 -lminizip -lFLAC -lopenh264 -lgtk-3 -lgdk-3 -lcairo-gobject -lgdk_pixbuf-2.0 -lxslt 
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-6aaa18.o:gpu_control_list.cc:function gpu::(anonymous namespace)::StringMismatch(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*): error: undefined reference to 're2::RE2::RE2(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-cfe644.o:schema.cc:function policy::Schema::InternalStorage::CompileRegex(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const: error: undefined reference to 're2::RE2::RE2(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-1f426a.o:webrequest_action.cc:function extensions::WebRequestRedirectByRegExAction::CreateDelta(extensions::WebRequestData const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, base::Time const&) const: error: undefined reference to 're2::RE2::Replace(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, re2::RE2 const&, re2::StringPiece const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-37a367.o:form_data_parser.cc:function extensions::FormDataParser::CreateFromContentTypeHeader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*): error: undefined reference to 're2::RE2::RE2(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-37a367.o:form_data_parser.cc:function base::LazyInstance<extensions::(anonymous namespace)::Patterns, base::internal::LeakyLazyInstanceTraits<extensions::(anonymous namespace)::Patterns> >::Pointer(): error: undefined reference to 're2::RE2::RE2(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-1ca153.o:local_files_ntp_source.cc:function local_ntp::FlattenLocalInclude(base::RepeatingCallback<void (scoped_refptr<base::RefCountedMemory>)> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, scoped_refptr<base::RefCountedMemory>): error: undefined reference to 're2::RE2::Replace(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, re2::RE2 const&, re2::StringPiece const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-cc4ab1.o:regex_set_matcher.cc:function url_matcher::RegexSetMatcher::RebuildMatcher(): error: undefined reference to 're2::FilteredRE2::Compile(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-cc4ab1.o:regex_set_matcher.cc:function url_matcher::RegexSetMatcher::Match(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::set<int, std::__1::less<int>, std::__1::allocator<int> >*) const: error: undefined reference to 're2::FilteredRE2::AllMatches(re2::StringPiece const&, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> >*) const'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-d04159.o:address_rewriter.cc:function autofill::AddressRewriter::Rewrite(std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&) const: error: undefined reference to 're2::RE2::GlobalReplace(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, re2::RE2 const&, re2::StringPiece const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-d59a0c.o:login_database.cc:function password_manager::LoginDatabase::GetLoginsForSameOrganizationName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<std::__1::unique_ptr<autofill::PasswordForm, std::__1::default_delete<autofill::PasswordForm> >, std::__1::allocator<std::__1::unique_ptr<autofill::PasswordForm, std::__1::default_delete<autofill::PasswordForm> > > >*) const: error: undefined reference to 're2::RE2::QuoteMeta(re2::StringPiece const&)'
/var/tmp/portage/www-client/chromium-70.0.3510.0/temp/lto-llvm-e21125.o:page_passwords_analyser.cc:function autofill::PagePasswordsAnalyser::AnalyseDocumentDOM(blink::WebLocalFrame*, autofill::PageFormAnalyserLogger*): error: undefined reference to 're2::RE2::GlobalReplace(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, re2::RE2 const&, re2::StringPiece const&)'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Comment 6 Nick 2018-08-28 14:41:53 UTC
Looks like the same as the issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=871078
Comment 7 Christian 2018-09-09 17:52:59 UTC
Hi Folks,

today i build successfully: www-client/chromium-70.0.3521.2

The changes are:

1. Add the Line

#include <memory>

to the files in the build Directory:

ui/message_center/views/message_popup_collection.h
extensions/browser/verified_contents.h

2. Because the Chromium Bug throws some re2 Symbol Bugs, i updated to

  dev-libs/re2-0.2018.04.01

That was all. I did not change libstdc++ to something else.

I build it with the ebuild steps:

- # ebuild chromium-70.0.3521.2.ebuild unpack
- Change the files in working directory.
- # ebuild chromium-70.0.3521.2.ebuild compile
- # ebuild chromium-70.0.3521.2.ebuild install
- # ebuild chromium-70.0.3521.2.ebuild qmerge

The Browser behave as expected.
Comment 8 Nick 2018-09-10 14:31:10 UTC
Created attachment 546488 [details, diff]
chromium-70.0.3521.2-unique-ptr.patch
Comment 9 Nick 2018-09-10 14:33:12 UTC
Created attachment 546490 [details]
chromium-70.0.3521.2.ebuild

Adds >=dev-libs/re2-0.2018.04.01 dependency
Comment 10 Nick 2018-09-10 14:34:23 UTC
Builds for me with the modified ebuild and patch I attached (based on Christian's comment)
Comment 11 Stephan Hartmann (RETIRED) gentoo-dev 2020-07-07 17:20:11 UTC
Fixed long time ago.