Issue 13186 in v8: wee8 on macOS

80 views
Skip to first unread message

imuw… via monorail

unread,
Aug 13, 2022, 12:39:03 AM8/13/22
to v8-re...@googlegroups.com
Status: Untriaged
Owner: ----
Type: Bug

New issue 13186 by imuw...@gmail.com: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186

Version: ab6bf0ce546d82faa10769560eccf5a237dbaf3c
OS: macOS 12.4
Architecture: x64

What steps will reproduce the problem?
1. fetch v8
2. tools/dev/gm.py x64.release.wee8
3. mkdir /tmp/xx && ./tools/run-wasm-api-tests.py out/x64.release /tmp/xx hello c gcc

What is the expected output?

test runs successfully

What do you see instead?

two problems i noticed.

1. libwee8.a is huge. is this normal?

spacetanuki% ls -lh out/x64.release/obj/*.a
-rw-r--r-- 1 yamamoto staff 2.9M Aug 13 12:34 out/x64.release/obj/libv8_libbase.a
-rw-r--r-- 1 yamamoto staff 2.3M Aug 13 12:34 out/x64.release/obj/libv8_libplatform.a
-rw-r--r-- 1 yamamoto staff 2.8G Aug 13 12:59 out/x64.release/obj/libwee8.a
spacetanuki%

2. link errors starting with:

Undefined symbols for architecture x86_64:
"std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::copy(char*, unsigned long, unsigned long) const", referenced from:
v8::internal::wasm::AsmJsParser::CopyCurrentIdentifierString() in libwee8.a(asm-parser.o)
v8::internal::wasm::AsmJsParser::ValidateFunction() in libwee8.a(asm-parser.o)
v8::internal::wasm::AsmJsParser::ValidateExport() in libwee8.a(asm-parser.o)
v8::internal::wasm::AsmJsParser::ValidateModuleVarImport(v8::internal::wasm::AsmJsParser::VarInfo*, bool) in libwee8.a(asm-parser.o)
"std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::find(char, unsigned long) const", referenced from:
v8::internal::Intl::StringLocaleConvertCase(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, bool, v8::internal::Handle<v8::internal::Object>) in libwee8.a(intl-objects.o)
"std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::rfind(char, unsigned long) const", referenced from:
v8::internal::(anonymous namespace)::BestAvailableLocale(std::Cr::set<std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >, std::Cr::less<std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > >, std::Cr::allocator<std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > > > const&, std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > const&) in libwee8.a(intl-objects.o)
"std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::compare(char const*) const", referenced from:
v8::internal::LogFile::CreateOutputHandle(std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >) in libwee8.a(log-file.o)
v8::internal::LogFile::IsLoggingToConsole(std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >) in libwee8.a(log-file.o)
v8::internal::LogFile::IsLoggingToTemporaryFile(std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >) in libwee8.a(log-file.o)
"std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const", referenced from:
std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<int, int>(int, int, char const*) in libwee8.a(logging.o)

Please use labels and text to provide additional information.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

imuw… via monorail

unread,
Aug 15, 2022, 2:34:01 AM8/15/22
to v8-re...@googlegroups.com

Comment #1 on issue 13186 by imuw...@gmail.com: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c1

well, actually i'm not sure if this is related to macOS at all because i haven't tried to build it for other platforms.

ish… via monorail

unread,
Aug 17, 2022, 7:53:49 AM8/17/22
to v8-re...@googlegroups.com

Comment #2 on issue 13186 by ish...@chromium.org: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c2

Just in case, could you please share the contents of your args.gn file?

I see similar sizes on linux when I build an x64.release with symbol_level = 2:
39K Aug 17 13:41 out/x64.release/obj/libv8_libbase.a
27K Aug 17 13:41 out/x64.release/obj/libv8_libplatform.a
1.8G Aug 17 13:43 out/x64.release/obj/libwee8.a

While with default configuration I get these sizes:
39K Aug 17 13:37 out/x64.release-xx/obj/libv8_libbase.a
27K Aug 17 13:37 out/x64.release-xx/obj/libv8_libplatform.a
73M Aug 17 13:38 out/x64.release-xx/obj/libwee8.a

imuw… via monorail

unread,
Aug 18, 2022, 12:04:07 AM8/18/22
to v8-re...@googlegroups.com

Comment #3 on issue 13186 by imuw...@gmail.com: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c3


> Just in case, could you please share the contents of your args.gn file?

here it is:

spacetanuki% cat ./out/x64.release/args.gn
is_component_build = false
is_debug = false
target_cpu = "x64"
use_goma = false
v8_enable_backtrace = true
v8_enable_disassembler = true
v8_enable_object_print = true
v8_enable_verify_heap = true
dcheck_always_on = false
spacetanuki%

ecmzi… via monorail

unread,
Aug 22, 2022, 11:59:26 AM8/22/22
to v8-re...@googlegroups.com
Updates:
Cc: jkum...@chromium.org
Components: Build WebAssembly
Labels: Priority-2

Comment #4 on issue 13186 by ecmzi...@chromium.org: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c4

(No comment was entered for this change.)

jkumm… via monorail

unread,
Aug 22, 2022, 1:06:57 PM8/22/22
to v8-re...@googlegroups.com

Comment #5 on issue 13186 by jkum...@chromium.org: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c5

Works for me.

Try adding `use_custom_libcxx = false` to your GN args, as the documentation [1] recommends.

[1] https://docs.google.com/document/d/1oFPHyNb_eXg6NzrE6xJDNPdJrHMZvx0LqsD6wpbd9vY/edit#

imuw… via monorail

unread,
Aug 23, 2022, 12:20:52 AM8/23/22
to v8-re...@googlegroups.com

Comment #6 on issue 13186 by imuw...@gmail.com: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c6


> Try adding `use_custom_libcxx = false` to your GN args, as the documentation [1] recommends.

it worked for me. thank you. i was not aware of the document.

imuw… via monorail

unread,
Aug 23, 2022, 12:21:52 AM8/23/22
to v8-re...@googlegroups.com

Comment #7 on issue 13186 by imuw...@gmail.com: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c7

symbol_level=1 produced a library with more reasonable size.

-rw-r--r-- 1 yamamoto staff 127M Aug 23 13:16 out/wee8/obj/libwee8.a

jkumm… via monorail

unread,
Aug 23, 2022, 4:17:22 AM8/23/22
to v8-re...@googlegroups.com
Updates:
Status: WontFix

Comment #8 on issue 13186 by jkum...@chromium.org: wee8 on macOS
https://bugs.chromium.org/p/v8/issues/detail?id=13186#c8

OK, thanks for reporting back.
Reply all
Reply to author
Forward
0 new messages