question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[upgrade] Native dependency libsodium "fatal error"

See original GitHub issue

I tried to run pushpin using the upgrade branch and bumped into a libsodium native dep error. I’ve seen this before when upgrading to the latest electron-forge v6 beta. I’m surprised to see it re-appear here since electron-forge only received a minor bump in the upgrade branch.

Possibly related: https://github.com/ssbc/ssb-server/issues/630

$ npm start

> pushpin@1.0.0 start /Users/dujohnson/tmp/pushpin
> electron-forge start

✔ Checking your system
✔ Locating Application
✖ Preparing native dependencies: 1 / 5

An unhandled error has occurred inside Forge:
  CXX(target) Release/obj.target/sodium/binding.o
In file included from ../binding.cc:4:
../libsodium/src/libsodium/include/sodium.h:5:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sodium/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dujohnson/tmp/pushpin/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/Users/dujohnson/.nvm/versions/node/v10.15.3/bin/node" "/Users/dujohnson/tmp/pushpin/node_modules/.bin/node-gyp" "rebuild" "--target=4.0.0" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/dujohnson/tmp/pushpin/node_modules/sodium-native
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
Error:   CXX(target) Release/obj.target/sodium/binding.o
In file included from ../binding.cc:4:
../libsodium/src/libsodium/include/sodium.h:5:10: fatal error: 'sodium/version.h' file not found
#include "sodium/version.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sodium/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/dujohnson/tmp/pushpin/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/Users/dujohnson/.nvm/versions/node/v10.15.3/bin/node" "/Users/dujohnson/tmp/pushpin/node_modules/.bin/node-gyp" "rebuild" "--target=4.0.0" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /Users/dujohnson/tmp/pushpin/node_modules/sodium-native
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/spawn-rx/lib/src/index.js:267:84)
    at SafeSubscriber.__tryOrUnsub (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:156:26)
    at Subscriber._error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:92:26)
    at Subscriber.error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:72:18)
    at SafeSubscriber._next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/spawn-rx/lib/src/index.js:242:65)
    at SafeSubscriber.__tryOrUnsub (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:143:22)
    at Subscriber._next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:89:26)
    at Subscriber.next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:66:18)
    at DefaultIfEmptySubscriber._next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/operators/defaultIfEmpty.js:41:26)
    at DefaultIfEmptySubscriber.Subscriber.next (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:66:18)
    at TakeLastSubscriber._complete (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/operators/takeLast.js:71:29)
    at TakeLastSubscriber.Subscriber.complete (/Users/dujohnson/tmp/pushpin/node_modules/electron-rebuild/node_modules/rxjs/internal/Subscriber.js:78:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pushpin@1.0.0 start: `electron-forge start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pushpin@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dujohnson/.npm/_logs/2019-05-26T17_37_19_419Z-debug.log

Versions:

  • OS: Mac OS X 10.14.5
  • npm: 6.4.1
  • node: 10.15.3
  • electron-forge (from package.json): 5.2.4
  • electron-rebuild (from package-lock.json): 1.7.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pvhcommented, May 26, 2019

I should note that if you’re feeling ambitious, I’m trying to remove all the warnings in the console on startup and I think it’s mostly a simple matter of upgrading the right packages.

0reactions
ralyodiocommented, Jan 18, 2021

how do you get this to build on arch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

libsodium fails to build when cross-compiling to Windows from ...
I currently get this error building libsodium, for master (a960e89) cross-compiling from Debian 10: Building libsodium... make[1]: Entering directory ...
Read more >
Installation - Libsodium documentation - GitBook
The libsodium port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of...
Read more >
Problem installing Sodium package in R on an Ubuntu system
Any idea on how to install this package? I wish installing packages on an Ubuntu R was as error free as doing it...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >
Bug listing with status RESOLVED with resolution TEST ...
Bug:233 - "Emacs segfaults when merged through the sandbox." status:RESOLVED resolution:TEST-REQUEST severity:critical · Bug:3888 - "yenta_socket module not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found