Hi all,
I am trying to upgrade from V8 6.5 to V8 6.7 (6.7.288.51) but on linux(I
tried on both Ubuntu 14.04 and Amazon Linux) it fails to compile googletest
with the following errors:
CXX obj/third_party/googletest/gtest/gtest-filepath.o
>
> FAILED: obj/third_party/googletest/gtest/gtest-filepath.o
>
> ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF
> obj/third_party/googletest/gtest/gtest-filepath.o.d
> -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1
> -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
> -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -DCR_CLANG_REVISION=\"328716-2\" -DNDEBUG -DNVALGRIND
> -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGTEST_API_= -DGTEST_HAS_POSIX_RE=0
> -DGTEST_LANG_CXX11=1 -DGTEST_HAS_STD_TUPLE=1
> -I../../third_party/googletest/src/googletest -I../.. -Igen
> -I../../third_party/googletest/custom
> -I../../third_party/googletest/src/googletest/include -fno-strict-aliasing
> -fmerge-all-constants --param=ssp-buffer-size=4 -fstack-protector
> -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__=
> -funwind-tables -fPIC -pipe
> -B../../third_party/binutils/Linux_x64/Release/bin -pthread
> -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0
> -no-canonical-prefixes -m64 -march=x86-64 -O2 -fno-ident -fdata-sections
> -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Xclang
> -load -Xclang
> ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
> -Xclang -add-plugin -Xclang find-bad-constructs -Xclang
> -plugin-arg-find-bad-constructs -Xclang no-realpath -Xclang
> -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene
> -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall
> -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter
> -Wno-c++11-narrowing -Wno-covered-switch-default
> -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override
> -Wno-undefined-var-template -Wno-nonportable-include-path
> -Wno-address-of-packed-member -Wno-unused-lambda-capture
> -Wno-user-defined-warnings -Wno-enum-compare-switch
> -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -std=gnu++14
> -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc -o
> obj/third_party/googletest/gtest/gtest-filepath.o
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:5:
>
> **error: **declaration conflicts with target of using declaration already
> in scope*
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tuple:556:11:
> **note: *target of using declaration
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *using declaration
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:164:20:
>
> **error: **explicit specialization of non-template class 'tuple'*
>
> template<> class tuple<> { };
>
> * ^ ~~*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:168:11:
>
> **error: **explicit specialization of non-template class 'tuple'*
>
> class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
>
> * ^ ~~~~~~~~~~*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:230:31:
>
> **error: **reference to 'tuple' is ambiguous*
>
> struct tuple_element<__i, tuple<_Head, _Tail...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:11:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:230:37:
>
> **error: **'_Head' does not refer to a value*
>
> struct tuple_element<__i, tuple<_Head, _Tail...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:229:30:
>
> **note: *declared here
>
> template<int __i, typename _Head, typename... _Tail>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:231:35:
>
> **error: **expected ';' at end of declaration*
>
> : tuple_element<__i - 1, tuple<_Tail...> > { };
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:231:35:
>
> **error: **expected unqualified-id*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:237:29:
>
> **error: **reference to 'tuple' is ambiguous*
>
> struct tuple_element<0, tuple<_Head, _Tail...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:11:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:237:35:
>
> **error: **'_Head' does not refer to a value*
>
> struct tuple_element<0, tuple<_Head, _Tail...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:236:21:
>
> **note: *declared here
>
> template<typename _Head, typename... _Tail>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:248:23:
>
> **error: **reference to 'tuple' is ambiguous*
>
> struct tuple_size<tuple<_Elements...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:11:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:248:29:
>
> **error: **'_Elements' does not refer to a value*
>
> struct tuple_size<tuple<_Elements...> >
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:247:24:
>
> **note: *declared here
>
> template<typename... _Elements>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:254:26:
>
> **error: **reference to 'tuple' is ambiguous*
>
> const int tuple_size<tuple<_Elements...> >::value;
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:11:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:254:32:
>
> **error: **'_Elements' does not refer to a value*
>
> const int tuple_size<tuple<_Elements...> >::value;
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:253:24:
>
> **note: *declared here
>
> template<typename... _Elements>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:254:46:
>
> **error: **expected unqualified-id*
>
> const int tuple_size<tuple<_Elements...> >::value;
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:274:51:
>
> **error: **reference to 'tuple' is ambiguous*
>
> typename tuple_element<__i, tuple<_Elements...>
> >::type
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:130:11:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> class tuple : public _Tuple_impl<0, _Elements...>
>
> * ^*
>
> *../../third_party/googletest/custom/gtest/internal/custom/gtest-port.h:21:12:
>
> **note: *candidate found by name lookup is 'std::tr1::tuple'
>
> using std::tuple;
>
> * ^*
>
> In file included from
> ../../third_party/googletest/src/googletest/src/gtest-filepath.cc:30:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-filepath.h:42:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h:52:
>
> In file included from
> ../../third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h:750:
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:274:57:
>
> **error: **'_Elements' does not refer to a value*
>
> typename tuple_element<__i, tuple<_Elements...>
> >::type
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:272:33:
>
> **note: *declared here
>
> template<int __i, typename... _Elements>
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:274:71:
>
> **error: **expected a type*
>
> typename tuple_element<__i, tuple<_Elements...>
> >::type
>
> * ^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:274:74:
>
> **error: **definition or redeclaration of 'type' cannot name the global
> scope*
>
> typename tuple_element<__i, tuple<_Elements...>
> >::type
>
> *
> ~~^*
>
> */usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/tr1/tuple:274:74:
>
> **error: **no member named 'type' in the global namespace*
>
> typename tuple_element<__i, tuple<_Elements...>
> >::type
>
> *
> ~~^*
>
> *fatal error: *too many errors emitted, stopping now [-ferror-limit=]
>
> 20 errors generated.
>
I tried patching
third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h
to force
#define GTEST_HAS_TR1_TUPLE 0
> #define DGTEST_USE_OWN_TR1_TUPLE 0
which felt wrong but led to a successful compilation of v8. But then my app
would error liking to libv8_base.a with error
../lib/v8/Linux/libv8_base.a: error adding symbols: Malformed archive
> collect2: error: ld returned 1 exit status
Could someone give me a pointer on how to get around the error and produce
a linkable static lib?
Btw gcc version is gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
--
--
v8-users mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.