gcarq / inox-patchset

Inox patchset tries to provide a minimal Chromium based browser with focus on privacy by disabling data transmission to Google.
BSD 2-Clause "Simplified" License
365 stars 25 forks source link

[ArchLinux][GCC6.3.1] Unable to compile version 57.0.2987.133 #75

Closed hv15 closed 7 years ago

hv15 commented 7 years ago

Hi,

I've been trying to compile inox but keep getting a compilation error about i18n:

[4275/24832] CXX obj/base/i18n/time_formatting.o
FAILED: obj/base/i18n/time_formatting.o
../../../../../../../../../usr/lib/hardening-wrapper/bin/clang++ -MMD -MF obj/base/i18n/time_formatting.o.d -DBASE_I18N_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DUSE_PROPRIETARY_CODECS -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DCR_CLANG_REVISION=289944-2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -I../.. -Igen -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../third_party/ced/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/home/hans/.cache/pacaur/inox/src/chromium-57.0.2987.133=. -m64 -march=x86-64 -pthread -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -O2 -fno-ident -fdata-sections -ffunction-sections -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-delete-null-pointer-checks -fno-rtti -fno-exceptions -c ../../base/i18n/time_formatting.cc -o obj/base/i18n/time_formatting.o
clang-4.0: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
../../base/i18n/time_formatting.cc:30:10: error: no matching constructor for initialization of 'string16' (aka 'basic_string<unsigned short, base::string16_char_traits>')
  return string16(date_string.getBuffer(),
         ^        ~~~~~~~~~~~~~~~~~~~~~~~~

Evidently it has something to do with GCC 6.3.1 C++ header file not having that function/constructor anymore:

/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:464:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'size_type' (aka 'unsigned long') for 1st argument; dereference the argument with *
      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:410:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'const std::__cxx11::basic_string<base::char16, base::string16_char_traits>' for 1st argument
      basic_string(const basic_string& __str, size_type __pos,
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:444:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'const unsigned short *' for 1st argument
      basic_string(const _CharT* __s, size_type __n,
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:454:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'const unsigned short *' for 1st argument
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:503:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'initializer_list<unsigned short>' for 1st argument
      basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:507:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'const std::__cxx11::basic_string<base::char16, base::string16_char_traits>' for 1st argument
      basic_string(const basic_string& __str, const _Alloc& __a)
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:511:7: note: candidate constructor not viable: no known conversion from 'const char16_t *' to 'std::__cxx11::basic_string<base::char16, base::string16_char_traits>' for 1st argument
      basic_string(basic_string&& __str, const _Alloc& __a)
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:549:9: note: candidate template ignored: deduced conflicting
types for parameter '_InputIterator' ('const char16_t *' vs. 'int')
        basic_string(_InputIterator __beg, _InputIterator __end,
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:389:7: note: candidate constructor not viable: requires single argument '__a', but 2 arguments were provided
      basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:397:7: note: candidate constructor not viable: requires single argument '__str', but 2 arguments were provided
      basic_string(const basic_string& __str)
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:476:7: note: candidate constructor not viable: requires single argument '__str', but 2 arguments were provided
      basic_string(basic_string&& __str) noexcept
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:380:7: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
      basic_string()
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/bits/basic_string.h:426:7: note: candidate constructor not viable: requires 4 arguments, but 2 were provided
      basic_string(const basic_string& __str, size_type __pos,
      ^.

The output above is when I used clang-4.0, I get the same error when using GCC 6.3.1. I tried using gcc5 but couldn't figure how to generate the Ninja build system to use the right binaries.

Lourens-Rich commented 7 years ago

And inox-bin don't work with new version of icu (59.1-1)

hv15 commented 7 years ago

I've also tried using gcc5 with my patch for the PKGBUILD, but it fails are the same point. Likely this has to do with what @Lourens-Rich has found, the icu has changed.

Edit: Also my patch allows for using clang to compile instead of GCC. You just need to change the dependency list and arguments to the build system generator.

gcarq commented 7 years ago

Thanks for reporting. Should be fixed with the latest inox version

gcarq commented 7 years ago

I'm closing this issue because inox 58.x is out. If this is still an issue feel free to reopen it.