Compile Error with `use_custom_libcxx=false`

55 views
Skip to first unread message

Immanuel Haffner

unread,
Jun 17, 2020, 3:37:04 AM6/17/20
to v8-users
I am trying to compile V8 in debug with the following build args:

    is_clang=true is_component_build=false v8_monolithic=true treat_warnings_as_errors=false v8_use_external_startup_data=false use_sysroot=false use_custom_libcxx=false clang_use_chrome_plugins=false target_cpu="x64"  is_debug=true use_debug_fission=true

I get the following error:

In file included from ../../../../../third-party/v8/v8/test/unittests/base/template-utils-unittest.cc:5:
../../../../../third-party/v8/v8/src/base/template-utils.h:58:71: error: expected expression
struct has_output_operator<T, decltype(void(std::declval<std::ostream&>()
                                                                      ^
../../../../../third-party/v8/v8/src/base/template-utils.h:58:63: error: no member named 'ostream' in namespace 'std'
struct has_output_operator<T, decltype(void(std::declval<std::ostream&>()
                                                         ~~~~~^

I compile with clang 10.0.0 and the GNU standard library 10.1.0. I suppose the error occurs because in a recent version of the STL, <ostream> is not transitively included anymore. In template-utils.h, the include of <ostream> is indeed missing.

Immanuel Haffner

unread,
Jun 17, 2020, 3:38:43 AM6/17/20
to v8-users
Oh, i forgot to mention the version. I am trying to compile V8 v8.5.183. But the error occurs also in older versions and is likely related to the update of the standard library rather then an update to V8.

Clemens Backes

unread,
Jun 17, 2020, 3:47:38 AM6/17/20
to v8-u...@googlegroups.com
Thanks for reporting this, Immanuel!

I uploaded a fix to include <iosfwd>: https://crrev.com/c/2248196
Can you check whether this also fixes the issue in your configuration?

Thanks,
Clemens

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/71ca971c-fa57-41b5-9d0f-551ed28b0097n%40googlegroups.com.


--

Clemens Backes

Software Engineer

clem...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.


This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Immanuel Haffner

unread,
Jun 17, 2020, 4:41:13 AM6/17/20
to v8-users
Hi Clemens,

the patch is working. Thanks a lot for the quick response :) When will this be available upstream?

Kind regards,
Immanuel

Immanuel Haffner

unread,
Jun 17, 2020, 4:47:46 AM6/17/20
to v8-users

Out of curiosity: wouldn't it make sense to add a CI job for `use_custom_libcxx=false`?

kosit la-orngsri

unread,
Jun 17, 2020, 5:13:57 AM6/17/20
to v8-users


เมื่อ วันพุธที่ 17 มิถุนายน ค.ศ. 2020 14 นาฬิกา 37 นาที 04 วินาที UTC+7, Immanuel Haffner เขียนว่า:

kosit la-orngsri

unread,
Jun 17, 2020, 5:18:05 AM6/17/20
to v8-users
ถ้าไม่ขัดกันกับการเชื่อมโยงมันก็ดี


เมื่อ วันพุธที่ 17 มิถุนายน ค.ศ. 2020 14 นาฬิกา 37 นาที 04 วินาที UTC+7, Immanuel Haffner เขียนว่า:
I am trying to compile V8 in debug with the following build args:

Clemens Backes

unread,
Jun 17, 2020, 5:35:17 AM6/17/20
to v8-u...@googlegroups.com
On Wed, Jun 17, 2020 at 10:41 AM Immanuel Haffner <haffner....@gmail.com> wrote:
Hi Clemens,

the patch is working. Thanks a lot for the quick response :) When will this be available upstream?

The patch was merged to ToT about half an hour ago, so it should be available to you now.
 

Clemens Backes

unread,
Jun 17, 2020, 5:44:04 AM6/17/20
to v8-u...@googlegroups.com
On Wed, Jun 17, 2020 at 10:47 AM Immanuel Haffner <haffner....@gmail.com> wrote:

Out of curiosity: wouldn't it make sense to add a CI job for `use_custom_libcxx=false`?

I guess we wouldn't need one bot for that, but as many as there are combinations of compilers and standard library implementations (in different versions) out there.
The idea of using a bundled clang and libc++ is exactly to avoid relying on tools and libraries installed on the system.

I would say we try to support using custom c++ standard libraries as much as possible, but we can't test them all. We rely on community feedback like yours here.
In the future, you can also upload small fixes like this on your own (see https://v8.dev/docs/contribute).

 
Reply all
Reply to author
Forward
0 new messages