-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deps/v8/src/objects.h:3263:46: error: invalid use of incomplete type ‘class v8::internal::Heap #10388
Comments
cc @nodejs/v8 |
@octoploid What node version? |
Latest git branch master. |
@octoploid what platform are you on? |
/cc @hashseed |
I'm running Linux. Let me quote the C++ std:
|
|
it should work by including heap.h into natives.h? |
For the record, just including heap.h (or heap.h plus heap-inl.h) into natives.h does not result in a successful build. Example: https://kojipkgs.fedoraproject.org//work/tasks/8811/17888811/build.log (note: this is a transient build and will be reaped in seven days) |
Can someone take a look on this already? |
Some small refactoring to move the code out of objects.h into objects-inl.h should hopefully fix this issue. I'll come up with a patch tomorrow. |
g++ 6.3.1 works okay and I'm not adventurous enough to upgrade my FC25 box to Rawhide. Any suggestions? |
On Fedora 25, you can do: Then you can do:
Inside that chroot, you essentially have Fedora 26/Rawhide (running on the F25 kernel). |
I usually use rawhide docker images. |
mock made it real easy, thanks. The fix: diff --git a/deps/v8/src/objects-body-descriptors.h b/deps/v8/src/objects-body-descriptors.h
index 91cb8883be..a1c3634bd7 100644
--- a/deps/v8/src/objects-body-descriptors.h
+++ b/deps/v8/src/objects-body-descriptors.h
@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
- IterateBody(obj);
+ IterateBody<StaticVisitor>(obj);
}
};
(That method can probably be removed entirely with some more effort.) And another change to silence that very noisy forward declaration warning: diff --git a/deps/v8/src/objects-inl.h b/deps/v8/src/objects-inl.h
index 1a8274cbf1..a237d2b753 100644
--- a/deps/v8/src/objects-inl.h
+++ b/deps/v8/src/objects-inl.h
@@ -39,6 +39,27 @@
namespace v8 {
namespace internal {
+template <typename Derived, typename Shape, typename Key>
+uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
+ if (Shape::UsesSeed) {
+ return Shape::SeededHash(key, GetHeap()->HashSeed());
+ } else {
+ return Shape::Hash(key);
+ }
+}
+
+
+template <typename Derived, typename Shape, typename Key>
+uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
+ Object* object) {
+ if (Shape::UsesSeed) {
+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
+ } else {
+ return Shape::HashForObject(key, object);
+ }
+}
+
+
PropertyDetails::PropertyDetails(Smi* smi) {
value_ = smi->value();
}
diff --git a/deps/v8/src/objects.h b/deps/v8/src/objects.h
index 747a4f0511..b9279640e2 100644
--- a/deps/v8/src/objects.h
+++ b/deps/v8/src/objects.h
@@ -3531,22 +3531,10 @@ class HashTable : public HashTableBase {
public:
typedef Shape ShapeT;
- // Wrapper methods
- inline uint32_t Hash(Key key) {
- if (Shape::UsesSeed) {
- return Shape::SeededHash(key, GetHeap()->HashSeed());
- } else {
- return Shape::Hash(key);
- }
- }
-
- inline uint32_t HashForObject(Key key, Object* object) {
- if (Shape::UsesSeed) {
- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
- } else {
- return Shape::HashForObject(key, object);
- }
- }
+ // Wrapper methods. Defined in src/objects-inl.h
+ // to break a cycle with src/heap/heap.h.
+ inline uint32_t Hash(Key key);
+ inline uint32_t HashForObject(Key key, Object* object);
// Returns a new HashTable object.
MUST_USE_RESULT static Handle<Derived> New( We can float these as patches in v6.x but since the issue also exists in the master branch, I'll upstream them to V8. |
Hello Guys.
../deps/v8/src/builtins.cc:88:68: error: invalid use of incomplete type 'class v8::internal::{anonymous}::BuiltinArguments<v8::internal::BuiltinExtraArguments:: kTarget>'
Handle<S> BuiltinArguments<BuiltinExtraArguments::kTarget>::target() {
^
../deps/v8/src/builtins.cc:35:7: error: declaration of 'class v8::internal::{anonymous}::BuiltinArguments<v8::internal::BuiltinExtraArguments:: kTarget>'
class BuiltinArguments : public Arguments {
$ /opt/gcc/bin/g++ --version
g++ (GCC) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m Any idea? |
@detailyang Try upgrading to gcc 4.8.5 or newer. 4.8.0 has several known bugs that make it impossible to build node. |
Hello. BTW, I think it should be mention on BUILDING.md and I will create a PR to fix this 😁 |
Oh, good point. We recently discussed bumping the base line from 4.8 to 4.8.5 but looks like we didn't actually do it yet. A pull request would be welcome. |
Any reason why this patch isn't applied? It fixes the issue for me. |
#12392 - I didn't get around to upstreaming it; things changed quite a bit upstream and I didn't have time to look into it. It's probably no longer an issue there. |
This is a local patch because upstream fixed it differently by moving large chunks of code out of objects.h. We cannot easily back-port those changes due to their size and invasiveness. Fixes: nodejs#10388 PR-URL: nodejs#12392 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Fixed in 2bbee49, should be in the next v7.x release. |
This is a local patch because upstream fixed it differently by moving large chunks of code out of objects.h. We cannot easily back-port those changes due to their size and invasiveness. Fixes: #10388 PR-URL: #12392 Backport-PR-URL: #13574 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Porting nodejs#12392 to V8 5.9 Ref: nodejs#12392 Fixes: nodejs#10388
Original commit message: Fix GCC 7 build errors BUG=chromium:691681 R=franzih@chromium.org Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9 Reviewed-on: https://chromium-review.googlesource.com/530227 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#46045} PR-URL: nodejs#13517 Fixes: nodejs#10388 Refs: nodejs#12392 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Original commit message: Fix GCC 7 build errors BUG=chromium:691681 R=franzih@chromium.org Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9 Reviewed-on: https://chromium-review.googlesource.com/530227 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#46045} Refs: nodejs#13517 Fixes: nodejs#10388 Refs: nodejs#12392 PR-URL: nodejs#14004 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Original commit message: Fix GCC 7 build errors BUG=chromium:691681 R=franzih@chromium.org Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9 Reviewed-on: https://chromium-review.googlesource.com/530227 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#46045} Refs: #13517 Fixes: #10388 Refs: #12392 PR-URL: #14004 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Original commit message: Fix GCC 7 build errors BUG=chromium:691681 R=franzih@chromium.org Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9 Reviewed-on: https://chromium-review.googlesource.com/530227 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#46045} Refs: #13517 Fixes: #10388 Refs: #12392 Backport-PR-URL: #14574 Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net> Backport-Reviewed-By: Refael Ackermann <refack@gmail.com> PR-URL: #14004 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Compilation fails with gcc-7:
The code is ill formed (no diagnostic required) according the C++ standard.
The text was updated successfully, but these errors were encountered: