Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Build fails on ARMv7 (Raspberry Pi / Debian) #5584

Closed

Description

@pwaring

I'm not sure if this is the same issue as #3783, but as I get a different error message I thought a new issue was more appropriate.

I'm trying to get Atom running on a Raspberry Pi 2 Model B under Raspbian, using a normal user account with sudo only when root is required (i.e. I build everything as non-root). uname -a gives the following output:

Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux

I've installed on the dependencies as per the Linux build instructions, and I've compiled and installed Node.js v0.12.0 from source. Everything runs fine until I get to the following command:

script/build

This produces the following output on the console:

$ ./script/build 
Node: v0.12.0
npm: v1.4.28
Installing build modules...
child_process: customFds option is deprecated, use stdio instead.
gyp: name 'chromeos' is not defined while evaluating condition 'target_arch=="arm" and chromeos==1' in deps/breakpad/breakpad.gyp while loading dependencies of binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/pi/dev/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.18.7-v7+
gyp ERR! command "node" "/home/pi/dev/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/dev/atom/build/node_modules/minidump
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the minidump 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 minidump
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.18.7-v7+
npm ERR! command "node" "/home/pi/dev/atom/build/node_modules/.bin/npm" "--userconfig=/home/pi/dev/atom/.npmrc" "install" "--loglevel" "error"
npm ERR! cwd /home/pi/dev/atom/build
npm ERR! node -v v0.12.0
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Is this a bug with Atom or the minidump package (as suggested in the error log)? I have very little experience with Node and this is the first time I've had to debug a problem related to it.

Activity

  1. added
    linux
    on Feb 17, 2015
  2. AlinaNova21 commented on Feb 17, 2015

    @AlinaNova21

    Same here running Ubuntu 14.04 on the Pi 2
    Linux adamspi 3.18.5-v7+ #225 SMP PREEMPT Fri Jan 30 18:53:55 GMT 2015 armv7l armv7l armv7l GNU/Linux

    Edit:
    Node: v1.1.0 (io.js)
    npm: v2.4.1

  3. matthewd92 commented on Feb 24, 2015

    @matthewd92

    I am getting an error as well but different issue, my output is:

    Node: v0.10.36
    npm: v1.4.28
    Installing build modules...
    Installing apm...
    /bin/sh: 1: /home/pi/atom/build/node_modules/.bin/npm: not found

  4. jbt commented on Feb 24, 2015

    @jbt

    Judging by electron/node-minidump#5 this has already been fixed over on the minidump module, but build/package.json is still requiring ~0.8. Changing that to ~0.9 seems to fix it for me and then I run into #3783.

  5. pwaring commented on Feb 24, 2015

    @pwaring
    Author

    Same here, bumping up minidump to 0.9 gets the build process a bit further but then bombs out with the error in #3783.

  6. jlord commented on Jul 9, 2015

    @jlord

    👋 I've been trying to get Atom up and running on ARM and created an issue with updates linked ☝️

  7. to1sourceuk commented on Oct 20, 2016

    @to1sourceuk

    I am using Raspberry Pi mode 3 Jessie (latest) and running the latest version of node.js(6.9)

    All build looks great. until this part

    Wrote Dependencies Fingerprint: /home/pi/Downloads/atom/node_modules/.dependencies-fingerprint cef7aa06628941107a71c33269fa1c5037092436
    Copying assets to /home/pi/Downloads/atom/out/app
    Transpiling Babel paths in /home/pi/Downloads/atom/out/app
    Transpiling CoffeeScript paths in /home/pi/Downloads/atom/out/app
    Transpiling CSON paths in /home/pi/Downloads/atom/out/app
    Transpiling PEG.js paths in /home/pi/Downloads/atom/out/app
    Generating module cache for /home/pi/Downloads/atom/out/app
    Generating pre-built less cache in /home/pi/Downloads/atom/out/app/less-compile-cache
    Generating metadata for /home/pi/Downloads/atom/out/app/package.json
    Generating API docs at /home/pi/Downloads/atom/docs/output/atom-api.json
    Skipping Chromedriver download because it is used only on macOS
    Dumping symbols in /home/pi/Downloads/atom/out/symbols
    Running electron-packager on /home/pi/Downloads/atom/out/app with app name "atom"
    Downloading electron-v1.3.6-linux-x64.zip
    [============================================>] 100.0% of 42.62 MB (1.72 MB/s)
    Packaging app for platform linux x64 using electron v1.3.6
    Changing permissions for node files in /home/pi/Downloads/atom/out/atom-1.13.0-dev-18609f8-arm
    Error: spawnSync /bin/sh ENOMEM
        at exports._errnoException (util.js:1026:11)
        at spawnSync (child_process.js:461:20)
        at Object.execSync (child_process.js:517:13)
        at chmodNodeFiles (/home/pi/Downloads/atom/script/lib/package-application.js:96:16)
        at runPackager.then (/home/pi/Downloads/atom/script/lib/package-application.js:46:7)
    

    Did it download the wrong version of the electron? electron-v1.3.6-linux-x64.zip?


    It did build the out folder and I found the atom file inside the atom-1.13.0-dev-18609f8-arm folder. And try to execute the file. But I get the following error:

    bash: ./atom: cannot execute binary file: Exec format error
    
    

    So I guess the final stage was not build correctly against the current platform. Is there any flag that I need to set to specify the arm platform?

  8. winstliu commented on Oct 20, 2016

    @winstliu
    Contributor

    Currently the build script only downloads the x64 binary on Linux. There is a PR to fix that at #13001 if people want to test it out.

  9. Regaddi commented on Nov 6, 2016

    @Regaddi

    I have noticed, that the ARM arch "key" has different values, dependent on how it is accessed:

    $ uname -m
    armv7l
    $ node -p process | grep arm
      arch: 'arm',
          { arm_float_abi: 'hard',
            arm_fpu: 'vfpv3',
            arm_thumb: 0,
            arm_version: '7',
            host_arch: 'arm',
            target_arch: 'arm',
    $ node
    > process.arch
    'arm'

    Look at script/lib/package-application.js.

    electron-packager receives the process.arch value, which is 'arm', not 'armv7l'. This was introduced with this PR.
    This leads to a build fail in electron-packager:

    Running electron-packager on /home/maru/atom/out/app with app name "atom"
    Error: Unsupported arch=arm; must be one of: ia32, x64, armv7l
        at Object.validateListFromOptions (/home/maru/atom/script/node_modules/electron-packager/targets.js:29:16)
        at packager (/home/maru/atom/script/node_modules/electron-packager/index.js:234:23)
        at Promise (/home/maru/atom/script/lib/package-application.js:141:5)
        at runPackager (/home/maru/atom/script/lib/package-application.js:140:10)
        at module.exports (/home/maru/atom/script/lib/package-application.js:17:10)
    

    I've opened an issue at electron-packager, but it was closed with the suggestion, that atom should have a better check for the "right" ARM version.

    I've added a quick test for the above stated combination of process.arch and process.config.variables.arm_version and the build passed successfully!
    This might get a bit trickier, when support for ARMv8 is out, but I think this is the right place to add the additional check.

    It doesn't seem to be safe to rely on process.arch only. Nevertheless electron-packager declined adding an additional ARM version check...

  10. lee-dohm commented on Apr 11, 2017

    @lee-dohm
    Contributor

    We don't support Atom on the Raspberry Pi. While we would love to support Atom on all possible platforms, our resources are finite so we have to draw a line somewhere. You can find out more information about Atom on ARM and links to other community efforts on #7822.

  11. lock commented on Apr 2, 2018

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  12. locked and limited conversation to collaborators on Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    build-errorlinux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions