electron/node

Errors attempting to build node by itself; cannot find v8.h on Arch Linux

Closed this issue · 1 comments

Hi,

I am operating on Arch Linux (version info is irrelevant as it follows a rolling release model), and trying to build this package by itself. That is, this is without Electron (i.e., I am not building this package in the vendor/node subfolder of the Electron source tree), as I just need some of its files for a custom Electron package, the rest of the files in this Electron package will be provided by the binary archive (i.e., .zip files for Linux) releases of Electron. As I am working on Arch Linux I have to use a little trick I found in an issue on the official nodejs/node repository (URL: nodejs/node#2735) in order to get the build to use Python 2 instead of the default, Python 3. Namely I run (where $srcdir is /home/fusion809/GitHub/mine/packaging/electron/src):

if ! [[ -d $srcdir/bin ]]; then
  mkdir $srcdir/bin  
  ln -sf /usr/bin/python2 $srcdir/bin/python
fi
export PATH=$srcdir/bin:$PATH
./configure --prefix=/usr
make

and I get the error:

  LD_LIBRARY_PATH=/home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/lib.host:/home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p /home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj/gen; python tools/js2c.py "/home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj/gen/node_natives.h" lib/internal/bootstrap_node.js lib/_debug_agent.js lib/_debugger.js lib/assert.js lib/buffer.js lib/child_process.js lib/console.js lib/constants.js lib/crypto.js lib/cluster.js lib/dgram.js lib/dns.js lib/domain.js lib/events.js lib/fs.js lib/http.js lib/_http_agent.js lib/_http_client.js lib/_http_common.js lib/_http_incoming.js lib/_http_outgoing.js lib/_http_server.js lib/https.js lib/_linklist.js lib/module.js lib/net.js lib/os.js lib/path.js lib/process.js lib/punycode.js lib/querystring.js lib/readline.js lib/repl.js lib/stream.js lib/_stream_readable.js lib/_stream_writable.js lib/_stream_duplex.js lib/_stream_transform.js lib/_stream_passthrough.js lib/_stream_wrap.js lib/string_decoder.js lib/sys.js lib/timers.js lib/tls.js lib/_tls_common.js lib/_tls_legacy.js lib/_tls_wrap.js lib/tty.js lib/url.js lib/util.js lib/v8.js lib/vm.js lib/zlib.js lib/internal/child_process.js lib/internal/cluster.js lib/internal/freelist.js lib/internal/linkedlist.js lib/internal/net.js lib/internal/module.js lib/internal/process/next_tick.js lib/internal/process/promises.js lib/internal/process/stdio.js lib/internal/process/warning.js lib/internal/process.js lib/internal/readline.js lib/internal/repl.js lib/internal/socket_list.js lib/internal/util.js lib/internal/v8_prof_polyfill.js lib/internal/v8_prof_processor.js lib/internal/streams/lazy_transform.js deps/v8/tools/splaytree.js deps/v8/tools/codemap.js deps/v8/tools/consarray.js deps/v8/tools/csvparser.js deps/v8/tools/profile.js deps/v8/tools/profile_view.js deps/v8/tools/logreader.js deps/v8/tools/tickprocessor.js deps/v8/tools/SourceMap.js deps/v8/tools/tickprocessor-driver.js ./config.gypi src/notrace_macros.py src/nolttng_macros.py src/perfctr_macros.py
  g++ '-DNODE_ARCH="x64"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DHAVE_OPENSSL=1' '-D__POSIX__' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' -I../src -I../tools/msvs/genfiles -I../deps/uv/src/ares -I/home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj/gen -I../deps/openssl/openssl/include -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/.deps//home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj.target/node/src/debug-agent.o.d.raw -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -c -o /home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj.target/node/src/debug-agent.o ../src/debug-agent.cc
In file included from ../src/debug-agent.h:26:0,
                 from ../src/debug-agent.cc:22:
../src/util.h:4:16: fatal error: v8.h: No such file or directory
 #include "v8.h"
                ^
compilation terminated.
make[1]: *** [node.target.mk:150: /home/fusion809/GitHub/mine/packaging/electron/src/node/out/Release/obj.target/node/src/debug-agent.o] Error 1
make[1]: Leaving directory '/home/fusion809/GitHub/mine/packaging/electron/src/node/out'
make: *** [Makefile:66: node] Error 2

I am quite stuck as to how to fix this error. I am building from the master branch of this repo.

Thanks for your time,
Brenton

@fusion809 This repository is not designed to be built in isolation, if you wish to build node in isolation please visit the core nodejs repository