New issue
Advanced search Search tips

Issue 859785 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 9
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Build error when complile base_unittests on Loongson

Reported by wangqing...@loongson.cn, Jul 3

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3189.0 Safari/537.36

Steps to reproduce the problem:
1.  ninja -C out/Release base_unittests

What is the expected behavior?
build success.

What went wrong?
mips64el-linux-gnu-g++ -MMD -MF obj/base/base_unittests/partition_alloc_unittest.o.d -DMALLOC_WRAPPER_LIB=\"libmalloc_wrapper.so\" -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_MIPS_ARCH_LOONGSON -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=332543 -DCR_LIBCXXABI_REVISION=331450 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGTEST_API_= -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DUNIT_TEST -I../.. -Igen -I../../third_party/googletest/custom -I../../third_party/googletest/src/googletest/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/googletest/custom -I../../third_party/googletest/src/googlemock/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -EL -mabi=64 -march=loongson3a -mno-branch-likely -Wa,-march=loongson3a -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-builtin-abs -fvisibility=hidden -isystem../../../../../../../usr/include/glib-2.0 -isystem../../../../../../../usr/lib64/glib-2.0/include -std=gnu++14 -Wno-narrowing -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../base/allocator/partition_allocator/partition_alloc_unittest.cc -o obj/base/base_unittests/partition_alloc_unittest.o
../../base/allocator/partition_allocator/partition_alloc_unittest.cc: In member function ‘base::internal::PartitionPage* base::internal::PartitionAllocTest::GetFullPage(size_t)’:
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:144:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
     if (bucket->num_system_pages_per_slot_span ==
        ^
../../base/allocator/partition_allocator/partition_alloc_unittest.cc: In member function ‘void base::internal::PartitionAllocTest::DoReturnNullTest(size_t, bool)’:
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:216:10: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
       if (!i)
          ^
../../base/allocator/partition_allocator/partition_alloc_unittest.cc: In member function ‘virtual void base::internal::PartitionAllocTest_PurgeDiscardable_Test::TestBody()’:
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1905:42: error: ‘PartitionAllocGeneric’ was not declared in this scope
     char* ptr1 = reinterpret_cast<char*>(PartitionAllocGeneric(
                                          ^~~~~~~~~~~~~~~~~~~~~
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1905:42: note: suggested alternative: ‘PartitionAllocatorGeneric’
     char* ptr1 = reinterpret_cast<char*>(PartitionAllocGeneric(
                                          ^~~~~~~~~~~~~~~~~~~~~
                                          PartitionAllocatorGeneric
../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1909:5: error: ‘PartitionFreeGeneric’ was not declared in this scope
     PartitionFreeGeneric(generic_allocator.root(), ptr1);

Did this work before? N/A 

Chrome version: lastest  Channel: n/a
OS Version: fedora 
Flash Version:
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/042e90ea2b3a4f455ef454e470c817e142688903

commit 042e90ea2b3a4f455ef454e470c817e142688903
Author: Wang Qing <wangqing-hf@loongson.cn>
Date: Tue Jul 03 08:51:56 2018

Fix compile error about base_unittests on Loongson.

This CL fixes the build error with the following message:
     ../../base/allocator/partition_allocator/partition_alloc_unittest.cc: In member function ‘virtual void base::internal::PartitionAllocTest_PurgeDiscardable_Test::TestBody()’:
     ../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1905:42: error: ‘PartitionAllocGeneric’ was not declared in this scope
          char* ptr1 = reinterpret_cast<char*>(PartitionAllocGeneric(
                                          ^~~~~~~~~~~~~~~~~~~~~
     ../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1905:42: note: suggested alternative: ‘PartitionAllocatorGeneric’
          char* ptr1 = reinterpret_cast<char*>(PartitionAllocGeneric(
                                          ^~~~~~~~~~~~~~~~~~~~~
                                          PartitionAllocatorGeneric
     ../../base/allocator/partition_allocator/partition_alloc_unittest.cc:1909:5: error: ‘PartitionFreeGeneric’ was not declared in this scope
          PartitionFreeGeneric(generic_allocator.root(), ptr1);

Bug=  859785 

R= haraken@chromium.org

Change-Id: I6e06534ba78fa7a3742ec3585502d60943374b1a
Reviewed-on: https://chromium-review.googlesource.com/1123931
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: 汪 清 <wangqing-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#572150}
[modify] https://crrev.com/042e90ea2b3a4f455ef454e470c817e142688903/base/allocator/partition_allocator/partition_alloc_unittest.cc

Components: -Platform>DevTools Blink>MemoryAllocator
Status: Fixed (was: Unconfirmed)
I think this is the wrong component, but close enough for a fixed bug? :)

Sign in to add a comment