无法生成node.js ubuntu 13.10

时间:2014-02-04 04:30:48

标签: linux node.js ubuntu g++ makefile

我正在尝试安装node.js,所以我克隆了repo和./configure它。然而,当我运行make时,我得到了这个荒谬的无限循环错误:

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/ubuntu/nodejs/node/out'
  g++ '-DOPENSSL_NO_SSL2=1' '-DV8_TARGET_ARCH_X64' '-DENABLE_DEBUGGER_SUPPORT' -I../deps/v8/src  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -MMD -MF /home/ubuntu/nodejs/node/out/Release/.deps//home/ubuntu/nodejs/node/out/Release/obj.target/v8_base.x64/deps/v8/src/runtime.o.d.raw  -c -o /home/ubuntu/nodejs/node/out/Release/obj.target/v8_base.x64/deps/v8/src/runtime.o ../deps/v8/src/runtime.cc
In file included from ../deps/v8/src/v8.h:52:0,
                 from ../deps/v8/src/runtime.cc:31:
../deps/v8/src/../include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
../deps/v8/src/../include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
   typedef internal::Internals I;
                               ^
In file included from ../deps/v8/src/v8globals.h:32:0,
                 from ../deps/v8/src/v8.h:53,
                 from ../deps/v8/src/runtime.cc:31:
../deps/v8/src/v8utils.h: In function ‘void v8::internal::CopyWords(T*, const T*, size_t)’:
../deps/v8/src/checks.h:271:22: warning: typedef ‘__StaticAssertTypedef__131’ locally defined but not used [-Wunused-local-typedefs]
     SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
                      ^
../deps/v8/src/checks.h:261:39: note: in definition of macro ‘SEMI_STATIC_JOIN_HELPER’
 #define SEMI_STATIC_JOIN_HELPER(a, b) a##b
                                       ^
../deps/v8/src/checks.h:271:5: note: in expansion of macro ‘SEMI_STATIC_JOIN’
     SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
     ^
../deps/v8/src/checks.h:319:30: note: in expansion of macro ‘STATIC_CHECK’
 #define STATIC_ASSERT(test)  STATIC_CHECK(test)

这似乎是一个错误,但我有g++4.8.1 gcc-4.8.1这是我所知道的最新版本。请让我知道如何解决这个问题。感谢。

2 个答案:

答案 0 :(得分:4)

有一种比使用旧的g ++更简单的方法,如V8错误报告讨论中所述: http://code.google.com/p/v8/issues/detail?id=2149

您可以在使用make之前为g ++设置其他标志:

export CXX="g++ -Wno-unused-local-typedefs"

答案 1 :(得分:2)

我遇到了g ++ 4.8编译v8(Node使用的)以及其他一些东西的问题,所以我使用了4.7。首先使用apt-get安装g ++ - 4.7(我相信你知道该怎么做),然后:

CXX=g++-4.7 make [... etc...]