`makepkg` for ungoogled-chromium failed


Linux 6.0.8
Updated on 2022-12-07


With version 108.0.5359.71 and version 108.0.5359.94

$ makepkg
[34056/51944] LINK ./chromedriver
FAILED: chromedriver 
python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./chromedriver" -- clang++ -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin -Wl,--thinlto-jobs=all -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=30 -fwhole-program-vtables -Wl,--no-call-graph-profile-sort -m64 -no-canonical-prefixes -Wl,-O2 -Wl,--gc-sections -rdynamic -Wl,-z,defs -Wl,--as-needed -Wl,--lto-O0 -fsanitize=cfi-vcall -fsanitize=cfi-icall -pie -Wl,--disable-new-dtags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o "./chromedriver" -Wl,--start-group @"./chromedriver.rsp"  -Wl,--end-group  -latomic -ldl -lpthread -lrt -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -ljsoncpp -licui18n -licuuc -licudata -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lresolv -lgio-2.0 -lbrotlidec -lz -ljpeg -lm -lopus -lavcodec -lavformat -lavutil -laom -ldav1d -lX11 -lXcomposite -lXdamage -lXext -lXfixes -lXrender -lXrandr -lXtst -lgbm -lEGL -lminizip -lfontconfig -lpng16 -lwebpdemux -lwebpmux -lwebp -lfreetype -lexpat -lharfbuzz-subset -lharfbuzz -ldrm -lxcb -lxkbcommon -ldbus-1 -lre2
ld.lld: error: undefined symbol: void std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t> >::_M_construct<char16_t const*>(char16_t const*, char16_t const*, std::forward_iterator_tag)
>>> referenced by http_handler.cc
>>>               thinlto-cache/llvmcache-E87E9AC0F4A46E99DBB38B191B584346B1877971:(internal::MatchesCommand(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&, CommandMapping const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, base::DictionaryValue*))
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
$ clang++ --version
clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

With version 107.0.5304.87, makepkg succeeds by default.

More Info

Edit CXXFLAGS in PKGBUILD as below, but still failed.

CXXFLAGS+=' -Wno-builtin-macro-redefined -std=c++11 -stdlib=libc++ -lc++ -lc++abi'


Why and how to solve it?

Unless you actually need to build it yourself (because you make changes to the build) have you tried ungoogled-chromium-bin?

It’s the same software, it was just compiled for you, so the installation process should only take a few seconds, compared to hours.


I tried bin several times before, all failed.

It needs clang-15 or a patch (Update to Chromium 108.0.5359.71/72 by Ahrotahn · Pull Request #2148 · ungoogled-software/ungoogled-chromium · GitHub)

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.