Building with GCC

215 views
Skip to first unread message

Jr

unread,
Nov 22, 2021, 7:29:00 PM11/22/21
to Chromium-dev
I am trying to compile chromium with GCC 11.1 and I'm getting a lot of warnings and errors. I've included them below. I'm using the following arguments for gn: is_clang=false treat_warnings_as_errors=false.

Is it currently possible to build chromium with GCC?





../../third_party/skia/src/gpu/GrSubRunAllocator.h:100:9: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ 100 | inline static constexpr int kAllocationAlignment = alignof(std::max_align_t); | ^~~~~~ ../../third_party/skia/src/gpu/GrSubRunAllocator.h:173:5: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ 173 | inline static constexpr bool HasNoDestructor = std::is_trivially_destructible<T>::value; | ^~~~~~ In file included from ../../third_party/skia/src/core/SkBlenderBase.h:15, from ../../third_party/skia/src/core/SkReadBuffer.h:19, from ../../third_party/skia/src/effects/SkLayerDrawLooper.cpp:16: ../../third_party/skia/src/core/SkVM.h: In function ‘skvm::F32 skvm::poly(skvm::F32, F32_or_float, float, Rest ...)’: ../../third_party/skia/src/core/SkVM.h:1344:12: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’ 1344 | if constexpr (sizeof...(rest) == 0) { | ^~~~~~~~~ ../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’: ../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’: ../../third_party/skia/src/core/SkVM.cpp: In member function ‘skvm::I32 skvm::Builder::bit_and(skvm::I32, skvm::I32)’: cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics 1332 | ALWAYS_INLINE void PartitionRoot<thread_safe>::RecommitSystemPagesForData( | ^ ../../base/allocator/partition_allocator/partition_root.h:1351:33: error: expected initializer before ‘<’ token 1351 | ALWAYS_INLINE bool PartitionRoot<thread_safe>::TryRecommitSystemPagesForData( | ^ ../../base/allocator/partition_allocator/partition_root.h:1381:35: error: expected initializer before ‘<’ token 1381 | ALWAYS_INLINE size_t PartitionRoot<thread_safe>::GetUsableSize(void* ptr) { | ^ ../../base/allocator/partition_allocator/partition_root.h:1399:14: error: expected initializer before ‘<’ token 1399 | PartitionRoot<thread_safe>::AllocationCapacityFromPtr(void* ptr) const { | ^ ../../base/allocator/partition_allocator/partition_root.h:1410:14: error: expected initializer before ‘<’ token 1410 | PartitionRoot<thread_safe>::SizeToBucketIndex(size_t size) { | ^ ../../base/allocator/partition_allocator/partition_root.h:1415:34: error: expected initializer before ‘<’ token 1415 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlags( | ^ ../../base/allocator/partition_allocator/partition_root.h:1424:34: error: expected initializer before ‘<’ token 1424 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlagsInternal( | ^ ../../base/allocator/partition_allocator/partition_root.h:1467:34: error: expected initializer before ‘<’ token 1467 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AllocFlagsNoHooks( | ^ ../../base/allocator/partition_allocator/partition_root.h:1655:34: error: expected initializer before ‘<’ token 1655 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::RawAlloc( | ^ ../../base/allocator/partition_allocator/partition_root.h:1668:34: error: expected initializer before ‘<’ token 1668 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::AlignedAllocFlags( | ^ ../../base/allocator/partition_allocator/partition_root.h:1752:34: error: expected initializer before ‘<’ token 1752 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::Alloc(size_t requested_size, | ^ ../../base/allocator/partition_allocator/partition_root.h:1758:34: error: expected initializer before ‘<’ token 1758 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::Realloc(void* ptr, | ^ ../../base/allocator/partition_allocator/partition_root.h:1765:34: error: expected initializer before ‘<’ token 1765 | ALWAYS_INLINE void* PartitionRoot<thread_safe>::TryRealloc( | ^ ../../base/allocator/partition_allocator/partition_root.h:1779:14: error: expected initializer before ‘<’ token 1779 | PartitionRoot<thread_safe>::AllocationCapacityFromRequestedSize( | ^ ../../base/allocator/partition_allocator/partition_root.h:1802:33: error: ‘PartitionRoot’ does not name a type 1802 | using ThreadSafePartitionRoot = PartitionRoot<internal::ThreadSafe>; | ^~~~~~~~~~~~~ ../../base/allocator/partition_allocator/partition_root.h:1803:35: error: ‘PartitionRoot’ does not name a type 1803 | using ThreadUnsafePartitionRoot = PartitionRoot<internal::NotThreadSafe>; | ^~~~~~~~~~~~~ ../../base/allocator/partition_allocator/partition_root.h:1805:1: error: expected declaration before ‘}’ token 1805 | } // namespace base | ^ ../../base/allocator/partition_allocator/partition_root.h:457:29: warning: ‘void base::Free(void*)’ declared ‘static’ but never defined [-Wunused-function] 457 | ALWAYS_INLINE static void Free(void* ptr); | ^~~~ ../../base/allocator/partition_allocator/partition_root.h:459:29: warning: ‘void base::FreeNoHooks(void*)’ declared ‘static’ but never defined [-Wunused-function] 459 | ALWAYS_INLINE static void FreeNoHooks(void* ptr); | ^~~~~~~~~~~ ../../base/allocator/partition_allocator/partition_root.h:465:31: warning: ‘size_t base::GetUsableSize(void*)’ declared ‘static’ but never defined [-Wunused-function] 465 | ALWAYS_INLINE static size_t GetUsableSize(void* ptr); | ^~~~~~~~~~~~~ ../../base/allocator/partition_allocator/partition_root.h:485:19: warning: ‘uint16_t base::SizeToBucketIndex(size_t)’ declared ‘static’ but never defined [-Wunused-function] 485 | static uint16_t SizeToBucketIndex(size_t size); | ^~~~~~~~~~~~~~~~~ ../../base/allocator/partition_allocator/partition_root.h:370:29: warning: ‘base::IsValidSlotSpan’ defined but not used [-Wunused-variable] 370 | ALWAYS_INLINE static bool IsValidSlotSpan(SlotSpan* slot_span); | ^~~~~~~~~~~~~~~ [13633/54214] CXX obj/components/policy/proto/proto_internal/device_management_backend.pb.o ninja: build stopped: subcommand failed.

Nico Weber

unread,
Nov 23, 2021, 12:06:14 PM11/23/21
to rifki...@gmail.com, Chromium-dev
There are no bots that make sure that building with gcc keeps working, but activity on https://bugs.chromium.org/p/chromium/issues/detail?id=819294 suggests that it's working at least for some people.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/1e7298bb-2fd7-4388-a839-067d4eb1ca39n%40chromium.org.

Jr

unread,
Nov 26, 2021, 7:39:57 PM11/26/21
to Chromium-dev, Nico Weber, Chromium-dev, Jr
Thank you for the link, good to know there is active work on this. I will try fetching without --no-history and running this on a stable release version.
Reply all
Reply to author
Forward
0 new messages