ungoogled-software / ungoogled-chromium-archlinux

Arch Linux packaging for ungoogled-chromium
BSD 3-Clause "New" or "Revised" License
339 stars 36 forks source link

`makepkg` for ungoogled-chromium failed #209

Closed playgithub closed 1 year ago

playgithub commented 1 year ago

Env

Manjaro updated on 2022-12-07 Linux 6.0.8

Problem

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().
    Aborting...
$ 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'

Question

Why and how to solve it?

jstkdng commented 1 year ago

you could be running out of ram while building

playgithub commented 1 year ago

you could be running out of ram while building

CPU 8 cores 16 threads RAM 16G

-j 8 failed, it never failed before version 108

PF4Public commented 1 year ago
clang version 14.0.6

You need either clang-15 or a patch. Look here

playgithub commented 1 year ago

As a note, the patch works.