afrog icon indicating copy to clipboard operation
afrog copied to clipboard

Building Atom on 32 bit Ubuntu 15.04: missing dependencies

Open fusion809 opened this issue 11 years ago • 23 comments

Hi, while the deb packages provided by the webup8team ppa are great sometimes they lag a wee bit behind so I'm attempting to figure out how to build Atom on Ubuntu from the GitHub source. I followed the build instructions for Linux but as with my previous attempt issues where encountered at the script/build line. I looked at the package.json file to look for dependencies I might be missing, but many of these packages are either not available on Ubuntu or are differently named in the Ubuntu repositories.

I was wondering if anyone here might know what they are all called on Ubuntu as I suspect that not having all the build dependencies may be why I can't seem to build Atom on Ubuntu from source.

fusion809 avatar Jun 22 '15 23:06 fusion809

What dependencies are you missing? Is this the same issue as the one you linked (#6774)? The dependencies in package.json are unrelated to Ubuntu dependencies. You can find those here.

winstliu avatar Jun 22 '15 23:06 winstliu

OK, well I have all those dependencies but the build still fails. What do you need for me to tell you in order for you or others to help me? Because I assume that more-information-needed tag is meant to get me to give you some info you want.

fusion809 avatar Jun 23 '15 00:06 fusion809

Pasting the exact output you get when the build fails would be helpful.

mnquintana avatar Jun 23 '15 00:06 mnquintana

I get no output (i.e., it skips straight to the next bash input line) at the command line at all, that's why I don't mention it.

fusion809 avatar Jun 23 '15 01:06 fusion809

Both lines script/build and sudo script/grunt install return no output. But if I then run atom from the bash command line I get bash: /usr/bin/atom: No such file or directory.

If relevant I cloned atom in my /tmp directory.

fusion809 avatar Jun 23 '15 01:06 fusion809

I woud suggest these experiments:

  • Try starting node manually to see if REPL starts.
  • Run some simple script (e.g. hello console)
  • Try the same script, but make it executable and put #!/usr/bin/env node at the top.
  • Try running script/build using node script/build.

kubetz avatar Jun 23 '15 21:06 kubetz

By starting node manually do you mean running node from terminal? If so I did and it generates no output, just goes to the next bash input line.

fusion809 avatar Jun 23 '15 21:06 fusion809

Running nodejs takes me into some CLI for nodejs.

fusion809 avatar Jun 23 '15 21:06 fusion809

Running: console.log("Hello World"); in this nodejs CLI gives: Hello World undefined

fusion809 avatar Jun 23 '15 21:06 fusion809

The problem is that node on your system is not node.js and build scripts are trying to use it to execute javascript files.

There are several ways how to solve this - I would go with the way described in atom build instructions here, you can find other ways here.

I personally installed node.js on my Ubuntu 15.04 machine this way and had no issues.

kubetz avatar Jun 23 '15 22:06 kubetz

I did this:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install nodejs

to solve this node problem. But running script/build gives this output:

Node: v0.12.4
npm: v2.10.1
Installing build modules...
Installing apm...
gyp ERR! configure error 
gyp ERR! stack Error: getaddrinfo EAI_AGAIN
gyp ERR! stack     at Object.exports._errnoException (util.js:746:11)
gyp ERR! stack     at errnoException (dns.js:49:15)
gyp ERR! stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
gyp ERR! System Linux 3.19.0-21-generic
gyp ERR! command "node" "/home/fusion809/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/fusion809/atom/apm/node_modules/atom-package-manager/node_modules/keytar
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
child_process: customFds option is deprecated, use stdio instead.
child_process: customFds option is deprecated, use stdio instead.
npm ERR! Linux 3.19.0-21-generic
npm ERR! argv "node" "/home/fusion809/atom/build/node_modules/.bin/npm" "--userconfig=/home/fusion809/atom/build/.npmrc" "--target=0.10.35" "install" "--loglevel" "error"
npm ERR! node v0.12.4
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the keytar package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls keytar
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/fusion809/atom/apm/npm-debug.log

npm-debug.log is here

If I ignore it and run sudo script/grunt install I get:

Loading "compile-packages-slug-task.coffee" tasks...ERROR
>> Error: Cannot find module 'season'
Loading "generate-module-cache-task.coffee" tasks...ERROR
>> Error: Cannot find module 'semver'
Loading "prebuild-less-task.coffee" tasks...ERROR
>> Error: Cannot find module 'less-cache'
ERROR
>> Error: ENOENT, no such file or directory 'node_modules'

Running "install" task
Aborted due to warnings.

I am grateful for your attempted solution, it's the greatest step forward in solving this problem yet.

fusion809 avatar Jun 23 '15 23:06 fusion809

If relevant I gitted atom into my home directory, /home/fusion809.

fusion809 avatar Jun 23 '15 23:06 fusion809

To build keytar you need to have g++ and gnome-keyring installed:

sudo apt-get install g++ libgnome-keyring-dev

Also make sure you have python2.

kubetz avatar Jun 23 '15 23:06 kubetz

@fusion809 It seems like you didn't actually follow the build instructions – rather than presuming you have all of the dependencies, you should actually run the install command the build instructions prescribe and follow the instructions for installing Node.js they link to. We can't really help you unless you follow the build instructions first.

mnquintana avatar Jun 23 '15 23:06 mnquintana

@mnquintana This Ubuntu machine of mine has been wiped and reinstalled over and over, I had run the sudo command for installing the dependencies before the last reinstall, so I had unintentionally assumed it was already installed. I had experienced the same error I started this discussion with (where script/build produced no output) before when I had installed the dependencies before attempting the build, so the major problem has been node which kubetz has figured out for me. So I suggest that the developers of Atom add the line:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install nodejs

to the building of dependencies section of linux.md. Plus a minor point, as it doesn't seem to stop me from successfully building atom I keep getting:

child_process: customFds option is deprecated, use stdio instead.

output at the Installing apm... stage. I'm guessing there's a line of code in the Atom source code where customFds is being used when stdio should be used instead.

@kubetz Installation successfully complete, thanks a million kubetz.

fusion809 avatar Jun 24 '15 01:06 fusion809

Glad to read that you were able to build atom yourself, great job! :+1:

That child_process ... messages you are getting are popping because you are using node.js v0.12 where customFds is deprecated. Don't worry about it.

kubetz avatar Jun 24 '15 01:06 kubetz

@kubetz Oh and one more thing how do I update this source installation? As it's from git I'd assume that something like running git submodule init && git submodule update from the atom directory on my PC (i.e. ~/atom) where I ran the script/build command and such, would update the directory and then I'd just re-run script/build and sudo script/grunt install from there?

fusion809 avatar Jun 24 '15 02:06 fusion809

If you want to get up-to-date sources of atom and you cloned directly from https://github.com/atom/atom use git pull and then script/build, sudo script/grunt install.

If you forked the repository and cloned your fork read this.

kubetz avatar Jun 24 '15 03:06 kubetz

@kubetz I ran git pull from the directory (which I did in fact clone from the master repo, i.e., https://github.com/atom/atom) to receive the error: Cannot pull with rebase: You have unstaged changes. Please commit or stash them.

fusion809 avatar Jun 25 '15 00:06 fusion809

If you google the messages git throws at you there is a very high chance you will something useful :+1: .

http://stackoverflow.com/a/23517643/1011582

kubetz avatar Jun 25 '15 00:06 kubetz