buddycloud / deprecated-buddycloud-server

A buddycloud server written in Node.
http://buddycloud.org
Apache License 2.0
139 stars 12 forks source link

server build fails when trying to install buddycloud deps. #30

Closed highfellow closed 12 years ago

highfellow commented 12 years ago

I'm having trouble building the current version of the server. build-binary.sh fails with the error:

node-stringprep@0.1.1 install /home/highfellow/lib/node_modules/buddycloud-server/node_modules/node-stringprep ./install.sh

sh: ./install.sh: Permission denied ....

I was using the same PREFIX and TMPDIR as before when I've built it successfully.

I've managed to track this down to this part of the script. I.e. after it's installed node and npm.

deps & coffeescript build

cd $SRCDIR npm i . -g

The last commit in the git log is:

commit 7573d19aaeaf0866ab508e5e78ca05afc3b8bdba Author: Simon Tennant simon@imaginator.com Date: Tue Nov 29 22:50:25 2011 +0100

highfellow commented 12 years ago

I tried reverting to a previous commit, from 22nd Nov, using this command:

git reset --hard 2d11f63546031365a379d42210881d126db47872

(not sure if this is right?)

I'm getting a similar error:

node-stringprep@0.1.1 install /home/highfellow/lib/node_modules/buddycloud-server/node_modules/node-stringprep ./install.sh

jsconfig@0.1.1 preinstall /home/highfellow/lib/node_modules/buddycloud-server/node_modules/jsconfig

preinstall DO NOTHING

sh: ./install.sh: Permission denied

This seems odd, because it built fine the last time I tried it. (which I think was most likely when this commit was the latest one)

highfellow commented 12 years ago

I think the problem is with the node-stringprep install script. When I do this,

[highfellow@web225 buddycloud-server]$ find ~ -iname 'install.sh' | xargs ls -l -rwxr-xr-x 1 highfellow highfellow 1931 Dec 21 1998 /home/highfellow/buddycloud-build/openssl-1.0.0e/util/install.sh -rw-r--r-- 1 highfellow highfellow 7147 Nov 30 23:39 /home/highfellow/lib/node_modules/npm/scripts/install.sh -rw-r--r-- 1 highfellow highfellow 252 Nov 30 23:39 /home/highfellow/.npm/node-stringprep/0.1.1/package/install.sh -rw-r--r-- 1 highfellow highfellow 7147 Nov 30 23:39 /home/highfellow/.npm/npm/1.0.103/package/scripts/install.sh -rw-r--r-- 1 highfellow highfellow 7147 Nov 20 09:07 /home/highfellow/tmp/buddycloud-server-build/npm/scripts/install.sh

it shows install.sh for node-stringprep without execute permissions, which it would need if it was going to run on a linux based system. I think this would explain the error I'm getting.

I don't think I can do much about this myself, because it's installing node-stringprep from elsewhere as a dependency.

highfellow commented 12 years ago

Sorry forgot to say that the above post was referring to the latest version from git. I.e. this version:

commit 7573d19aaeaf0866ab508e5e78ca05afc3b8bdba Author: Simon Tennant simon@imaginator.com Date: Tue Nov 29 22:50:25 2011 +0100

highfellow commented 12 years ago

I've also found that node-stringprep will install OK from the latest git tarball here:

https://github.com/astro/node-stringprep

However it still doesn't work when you do 'npm i . -g' in the buddycloud server dir.

I've been trying to find a way to install node-stringprep separately and then build the server, but not found it yet.

highfellow commented 12 years ago

If you remove the node-stringprep dependency in package.json, then install it manually from a tarball using npm, then do 'npm i . -g' in the server source dir, the server does build and install well enough to run.

It does warn that it can't load node-stringprep bindings when you run it, so this may be breaking something somewhere.

highfellow commented 12 years ago

I tried building the source tree from the 0.1.5 tagged release of buddycloud-server, to see if that worked. I downloaded the tarball from git, unpacked it and ran:

npm i .

in the top directory of the tree. This came up with a similar error about node-stringprep's install script not having the right permissions.

astro commented 12 years ago

node-stringprep 0.1.2 fixed this (it's actually a bug in npm)