背景:jquery
JavaScript コード (jQuery オブジェクトを使用) をテストするために使用していnodeunit
ます。jqueryの場合、オブジェクトjsdom
を提供する必要がありwindow
ます。contextify
64 ビット Debian ではビルドされないが必要なため、jsdom のビルドは失敗します。標準のUbuntuとDebianエディションの両方のLinux Mintでテストしましたが、同じ結果でした。
問題: node.js はどちらの場合も 0.11.11 リリースであり、git リポジトリからビルドされています。time
、 、it_interval
、およびその他多くのものを構築するときは不完全です。なんで?
完全なビルド ログはここにあります: http://pastebin.com/iTq75435次で始まります:
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
> contextify@0.1.6 install /tmp/node_modules/contextify
> node-gyp rebuild
make: Entering directory `/tmp/node_modules/contextify/build'
CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from /home/sie/.node-gyp/0.11.11/src/node.h:61:0,
from ../src/contextify.cc:1:
/home/sie/.node-gyp/0.11.11/deps/v8/include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
/home/sie/.node-gyp/0.11.11/deps/v8/include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
typedef internal::Internals I;
^
In file included from /usr/include/x86_64-linux-gnu/bits/time.h:86:0,
from /usr/include/time.h:41,
from /usr/include/pthread.h:24,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr.h:148,
from /usr/include/c++/4.8/ext/atomicity.h:35,
from /usr/include/c++/4.8/bits/basic_string.h:39,
from /usr/include/c++/4.8/string:52,
from ../src/contextify.cc:3:
/usr/include/x86_64-linux-gnu/bits/timex.h: At global scope:
/usr/include/x86_64-linux-gnu/bits/timex.h:36:18: error: field ‘time’ has incomplete type
struct timeval time; /* (read only) */
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr.h:148,
from /usr/include/c++/4.8/ext/atomicity.h:35,
from /usr/include/c++/4.8/bits/basic_string.h:39,
from /usr/include/c++/4.8/string:52,
from ../src/contextify.cc:3:
/usr/include/time.h:163:21: error: field ‘it_interval’ has incomplete type
struct timespec it_interval;
^
/usr/include/time.h:164:21: error: field ‘it_value’ has incomplete type
struct timespec it_value;
^
/usr/include/time.h:189:8: error: ‘clock_t’ does not name a type
extern clock_t clock (void) __THROW;
^
/usr/include/time.h:192:8: error: ‘time_t’ does not name a type
extern time_t time (time_t *__timer) __THROW;
^
/usr/include/time.h:195:25: error: ‘time_t’ was not declared in this scope
extern double difftime (time_t __time1, time_t __time0)