V8 v11.8.172.15 fails building on macOS

17 views
Skip to first unread message

Angelo Dell'Aera

unread,
Oct 24, 2023, 10:16:56 AM10/24/23
to v8-dev
Hi all,
I recently tried building V8 on macOS 13.6 and got this error

In file included from ../../src/inspector/v8-string-conversions.cc:5:
../../src/inspector/v8-string-conversions.h:8:10: fatal error: 'uchar.h' file not found
8 | #include <uchar.h>
| ^~~~~~~~~
1 error generated.

Apparently this issue was already discussed and fixed (see https://groups.google.com/g/v8-dev/c/nsbshwlmP3c) but it seems like the include was removed at that time and this was enough to fix the issue. Apparently it was reintroduced in the branch 11.8. Is it a mistake?

~/development/v8 (main) $ git diff 11.7.439.21 11.8.172.15 src/inspector/v8-string-conversions.h
diff --git a/src/inspector/v8-string-conversions.h b/src/inspector/v8-string-conversions.h
index eb33c6816a5..1126255dac2 100644
--- a/src/inspector/v8-string-conversions.h
+++ b/src/inspector/v8-string-conversions.h
@@ -5,14 +5,16 @@
#ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
#define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_

+#include <uchar.h>
+
#include <cstdint>
#include <string>

// Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may
// want to use string-16.h directly rather than these.
namespace v8_inspector {
-std::basic_string<uint16_t> UTF8ToUTF16(const char* stringStart, size_t length);
-std::string UTF16ToUTF8(const uint16_t* stringStart, size_t length);
+std::basic_string<char16_t> UTF8ToUTF16(const char* stringStart, size_t length);
+std::string UTF16ToUTF8(const char16_t* stringStart, size_t length);
} // namespace v8_inspector

#endif // V8_INSPECTOR_V8_STRING_CONVERSIONS_H_

Thanks and regards,
Angelo
Reply all
Reply to author
Forward
0 new messages