Skip to content
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/compiler/graph-visualizer.h:23:1: error: 'FILE' does not name a type #1637

Closed
saper opened this issue May 6, 2015 · 10 comments · Fixed by #1639
Closed

deps/v8/src/compiler/graph-visualizer.h:23:1: error: 'FILE' does not name a type #1637

saper opened this issue May 6, 2015 · 10 comments · Fixed by #1639
Labels
freebsd Issues and PRs related to the FreeBSD platform. v8 engine Issues and PRs related to the V8 dependency.

Comments

@saper
Copy link

saper commented May 6, 2015

This is for 2.0.0, being built with g++ 4.8.4 on FreeBSD 8.4 (both amd64 and i386).
For other versions we are using clang which works fine.
.

  g++48 '-DV8_TARGET_ARCH_X64' '-DENABLE_DISASSEMBLER' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' -I../deps/v8  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -I/usr/local/include -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /wrkdirs/usr/ports/www/iojs44/work/io.js-2.0.0/out/Release/.deps//wrkdirs/usr/ports/www/iojs44/work/io.js-2.0.0/out/Release/obj.target/v8_base/deps/v8/src/compiler/graph-visualizer.o.d.raw -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -c -o /wrkdirs/usr/ports/www/iojs44/work/io.js-2.0.0/out/Release/obj.target/v8_base/deps/v8/src/compiler/graph-visualizer.o ../deps/v8/src/compiler/graph-visualizer.cc
In file included from ../deps/v8/src/compiler/graph-visualizer.cc:5:0:
../deps/v8/src/compiler/graph-visualizer.h:23:1: error: 'FILE' does not name a type
 FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
 ^
deps/v8/tools/gyp/v8_base.target.mk:370: recipe for target '/wrkdirs/usr/ports/www/iojs44/work/io.js-2.0.0/out/Release/obj.target/v8_base/deps/v8/src/compiler/graph-visualizer.o' failed
@saper
Copy link
Author

saper commented May 6, 2015

Upstream report: http://code.google.com/p/v8/issues/detail?id=4079

@bnoordhuis
Copy link
Member

Does the build succeed when you apply this patch?

diff --git a/deps/v8/src/compiler/graph-visualizer.h b/deps/v8/src/compiler/graph-visualizer.h
index 17094c2..0e6a647 100644
--- a/deps/v8/src/compiler/graph-visualizer.h
+++ b/deps/v8/src/compiler/graph-visualizer.h
@@ -5,6 +5,7 @@
 #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_
 #define V8_COMPILER_GRAPH_VISUALIZER_H_

+#include <stdio.h>
 #include <iosfwd>

 namespace v8 {

@bnoordhuis bnoordhuis added the v8 engine Issues and PRs related to the V8 dependency. label May 6, 2015
@saper
Copy link
Author

saper commented May 6, 2015

Yes, it does. Figured out a moment ago :) Both amd64 and i386 build fine. Just playing with my setup to submit this back to v8...

@bnoordhuis
Copy link
Member

Don't worry, I'll upload the patch. It's an arcane process you wouldn't believe...

@saper
Copy link
Author

saper commented May 6, 2015

:) No worries. Did submit a patch to android and gerrit code review, it's actually almost the same...

@bnoordhuis
Copy link
Member

Here's mine FWIW: https://codereview.chromium.org/1128053002/

@bnoordhuis bnoordhuis added the freebsd Issues and PRs related to the FreeBSD platform. label May 6, 2015
@saper
Copy link
Author

saper commented May 6, 2015

I actually wonder why it is FreeBSD specific?

kisg pushed a commit to paul99/v8mips that referenced this issue May 6, 2015
Fix the following build error:

    ../deps/v8/src/compiler/graph-visualizer.h:23:1:
    error: 'FILE' does not name a type

See nodejs/node#1637 for background.

BUG=v8:4079
LOG=N

Review URL: https://codereview.chromium.org/1128053002

Cr-Commit-Position: refs/heads/master@{#28254}
@bnoordhuis
Copy link
Member

I speculate that on most systems (but not FreebSD), iosfwd pulls in stdio.h (where FILE lives, or is supposed to live.)

@saper
Copy link
Author

saper commented May 6, 2015

Yes, it includes <wchar.t> which does not include stdio. I wonder why clang doesn't mind then :)

@brendanashworth
Copy link
Contributor

This should have been fixed in #1639, please reopen if you still have the issue.

john-yan pushed a commit to ibmruntimes/v8z that referenced this issue Aug 18, 2015
Fix the following build error:

    ../deps/v8/src/compiler/graph-visualizer.h:23:1:
    error: 'FILE' does not name a type

See nodejs/node#1637 for background.

BUG=v8:4079
LOG=N

Review URL: https://codereview.chromium.org/1128053002

Cr-Commit-Position: refs/heads/master@{#28254}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freebsd Issues and PRs related to the FreeBSD platform. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants