5

I've tried getting this working a few different ways:

building from ports (/usr/ports/www/node)
git clone -> ./configure, ./make
git clone -> ./configure, ./gmake

But it always ends up breaking in the end. When using 'make' I simply get one line of output: Error expanding embedded variable.

When using 'gmake' I get some building, and then: Waf: Leaving directory '/usr/home/{user}/node/build Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a}

I did check for a FreeBSD package, but the most recent they have, on ftp2.freebsd.com, is 0.2.6

Does this just not work on 64 bit BSD?

Update:
I've been finding a few posts on the web of people having similar issues with FreeBSD 64 so I figured I'd also try it out on a 32 bit install (on a 32 bit machine, not the 64 being used from my original question)
Same issue with 'make' and the exact same error using 'gmake'

Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}

I'd love to get this working on my FreeBSD64, but I'm beginning to think that node just doesn't work anymore for FreeBSD :(

1
  • I guess this might even be more of a "Can you build V8 on FreeBSD amd64?"...
    – Justin
    Commented Mar 30, 2011 at 19:20

4 Answers 4

4

Got It!!

I first got this working on FreeBSD 32 and after it worked I was then able to get it working on 64.
The only difference between the two processes was for the 32 bit I simply built v8 using

$ scons

and for 64 bit

$ scons os=freebsd arch=x64

Here are the steps I used to get a successful build/install of node on FreeBSD amd64:

  • Checked out clean copies of both v8 and node
  • Within the v8 root

    $ scons os=freebsd arch=x64
    ... build output ...
    $ cp libv8* /usr/local/lib

  • Within the node root

    $ ./configure \
        --prefix=/usr/local \
        --shared-v8 \
        --shared-v8-includes=/home/jr/v8-read-only/include \
        --shared-v8-libpath=/usr/local/lib \
        --shared-v8-libname=v8
    $ gmake
    ... build output ...
    $ gmake install
    $ node --version
    v0.5.0-pre

1
  • The only other thing is that this built v0.5 and the question was for 0.4.2 (which is what I checked out when I originally asked the question, but today github has v0.5. Not sure if that would have resolved any earlier issues)
    – Justin
    Commented Mar 31, 2011 at 18:32
0

You do not really need to check out node separately. Here's what worked for me:

$ sudo portmaster devel/pkg-config devel/libexecinfo devel/cmake devel/scons lang/python27
$ git clone https://github.com/joyent/node.git
$ cd node/deps/v8
$ git checkout v0.4.6
$ scons os=freebsd arch=x64
(takes a while to compile v8)
$ sudo cp libv8* /usr/local/lib
$ cd ~/node
$ ./configure \     
  --prefix=/usr/local \
  --shared-v8 \
  --shared-v8-includes=/home/mikl/node/deps/v8/include \
  --shared-v8-libpath=/usr/local/lib \
  --shared-v8-libname=v8
$ gmake
$ sudo gmake install
0

I could only get v0.5.1 to work. In addition i had some issues with installing ie. the hiredis module, since the v8 headers was missing.

Assuming the following packages are installed:

  • devel/pkg-config
  • devel/libexecinfo
  • devel/cmake
  • devel/gmake
  • devel/scons
  • lang/python27
  • lang/v8

I got it working using the commands:

cd /root/
$ git clone https://github.com/joyent/node.git
$ git checkout v0.5.1
$ cd ~/node
$ ./configure \
  --prefix=/usr/local \
  --shared-v8 \
  --shared-v8-includes=/usr/local/include \
  --shared-v8-libpath=/usr/local/lib \
  --shared-v8-libname=v8
$ gmake
$ gmake install
$ cp /usr/local/include/v8* /usr/local/include/node/

Pretty much the same as above, not the gmake dependency and that I had to copy the headers into the node folder for the hiredis module to compile.

0
cd /usr/ports/www/node && make install clean

Worked fine for me. So it looks like they fixed the problems that port had.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .