6

Per Atom text editor build instructions for freeBSD:

pkg install node
pkg install npm
pkg install libgnome-keyring
npm config set python /usr/local/bin/python2 -g

Then:

git clone https://github.com/atom/atom
cd atom
script/build

This is on a vbox guest with Guest Additions using FreeBSD-11.1-RELEASE-amd64-disc1.iso that runs Gnome 3.18.2. Win 10 host.

When I:

script/build

I get:

  Node: v8.8.1
  Npm:  v5.3.0
  Installing script dependencies
  prebuild-install info begin Prebuild-install version 2.3.0
  prebuild-install info looking for local prebuild @ prebuilds/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install info looking for cached prebuild @ ~/.npm/_prebuilds/https-github.com-level-leveldown-releases-download-v1.9.0-leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install http request GET https://github.com/level/leveldown/releases/download/v1.9.0/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install http 404 https://github.com/level/leveldown/releases/download/v1.9.0/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install WARN install No prebuilt binaries found (target=8.8.1 runtime=node arch=x64 platform=freebsd)
  In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5:
  In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8:
  In file included from ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:
  In file included from /usr/include/c++/v1/string:469:
  /usr/include/c++/v1/__config:73:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported.        use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
  #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
   ^
  1 error generated.
  gmake: *** [deps/leveldb/leveldb.target.mk:150: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1
  gyp ERR! build error 
  gyp ERR! stack Error: `gmake` failed with exit code: 2
  gyp ERR! stack     at ChildProcess.onExit (~/atom/script/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
  gyp ERR! stack     at emitTwo (events.js:125:13)
  gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  gyp ERR! System FreeBSD 11.1-RELEASE
  gyp ERR! command "/usr/local/bin/node" "~/atom/script/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd ~/atom/script/node_modules/electron-link/node_modules/leveldown
  gyp ERR! node -v v8.8.1
  gyp ERR! node-gyp -v v3.6.2
  gyp ERR! not ok 
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! leveldown@1.9.0 install: `prebuild-install || node-gyp rebuild`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the leveldown@1.9.0 install 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!     ~/.npm/_logs/2017-11-09T22_00_42_308Z-debug.log
  child_process.js:621
   throw err;
   ^

  Error: Command failed: ~/atom/script/node_modules/.bin/npm --loglevel=error install
  prebuild-install info begin Prebuild-install version 2.3.0
  prebuild-install info looking for local prebuild @ prebuilds/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install info looking for cached prebuild @ ~/.npm/_prebuilds/https-github.com-level-leveldown-releases-download-v1.9.0-leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install http request GET https://github.com/level/leveldown/releases/download/v1.9.0/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install http 404 https://github.com/level/leveldown/releases/download/v1.9.0/leveldown-v1.9.0-node-v57-freebsd-x64.tar.gz
  prebuild-install WARN install No prebuilt binaries found (target=8.8.1 runtime=node arch=x64 platform=freebsd)
  In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:5:
  In file included from ../deps/leveldb/leveldb-1.20/db/builder.h:8:
  In file included from ../deps/leveldb/leveldb-1.20/include/leveldb/status.h:16:
  In file included from /usr/include/c++/v1/string:469:
  /usr/include/c++/v1/__config:73:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported.        use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
  #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
   ^
  1 error generated.
  gmake: *** [deps/leveldb/leveldb.target.mk:150: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o] Error 1
  gyp ERR! build error 
  gyp ERR! stack Error: `gmake` failed with exit code: 2
  gyp ERR! stack     at ChildProcess.onExit (~/atom/script/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
  gyp ERR! stack     at emitTwo (events.js:125:13)
  gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  gyp ERR! System FreeBSD 11.1-RELEASE
  gyp ERR! command "/usr/local/bin/node" "~/atom/script/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd ~/atom/script/node_modules/electron-link/node_modules/leveldown
  gyp ERR! node -v v8.8.1
  gyp ERR! node-gyp -v v3.6.2
  gyp ERR! not ok 
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! leveldown@1.9.0 install: `prebuild-install || node-gyp rebuild`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the leveldown@1.9.0 install 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!     ~/.npm/_logs/2017-11-09T22_00_42_308Z-debug.log

   at checkExecSyncError (child_process.js:598:13)
at Object.execFileSync (child_process.js:618:13)
at module.exports (~/atom/script/lib/install-script-dependencies.js:9:16)
at Object.<anonymous> (~/atom/script/bootstrap:28:1)
at Module._compile (module.js:612:30)
at Object.Module._extensions..js (module.js:623:10)
at Module.load (module.js:531:32)
at tryModuleLoad (module.js:494:12)
at Function.Module._load (module.js:486:3)
at Module.require (module.js:556:17)

The error log :

~/.npm/_logs/2017-11-09T22_00_42_308Z-debug.log

I figured I would start at what I imagined as the top and tried:

npm install leveldown

No luck.

I tried:

npm install leveldown --llvm-version=5.0

That worked per Level/leveldown/fails to build on freebsd 11.1 #390

However, Atom still doesn't build ... same output. Perhaps this has already been addressed somewhere else but I have not had a chance to see it.

While this wasn't a port a party there is a port bug as mentioned at lovell/sharp/Cannot build for FreeBSD 11, _LIBCPP_TRIVIAL_PAIR_COPY_CTOR is no longer supported #873

I ran across atom/atom/Atom fails to build on FreeBSD 11.0 x86_32 #6035 but I am not literate enough to parse if the issues are similar enough. I don't see them as explicitly similar enough.

I am imagining that leveldown is the 1st error. Following that imagination I am guessing that leveldb is the next error merely by the order of the output. I haven't stumbled close enough to leveldb yet.

I tried:

npm install ~/atom/script leveldown --llvm-version=5.0

Still nothing.

leveldown-prebuilt

Worse. Erred faster.

Is Atom not working to build on freeBSD? Am I following the right path to sort out the errors? I noticed the output refs leveldown v. 1.9.

atom/script/package.json

says:

"leveldown": "^2.0.0",

but leveldown seems to be on v. 1.5. I don't see that as making much difference but who am I to say ...?

How do I proceed from here to build and run Atom on freeBSD-11.1?

Thank you for your comments, assistance, and patience.

0

Fixed by patch in "Bug 222153 - www/node: detect clang version at run time".

Source: "Bug 220983 - www/node: Incorrectly patching common.gypi":

Reported: 2017-07-24 23:28 UTC by Randy

The ports install for www/node is patching common.gypi which includes the following lines.

In file included from /usr/include/c++/v1/cstdlib:85: /usr/include/c++/v1/__config:73:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead

#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ ^

1 error generated.

Max Khon freebsd_committer 2018-01-26 16:47:45 UTC

Bug 222153 contains the patch that fixes this

  • Thanks for making time for a suggestion. I gave a look to see what was what because this hasn't been a priority. What I found was: We do not state that Atom supports FreeBSD. ... Unfortunately, Electron ... doesn't support FreeBSD ... support in Atom is out ... until that changes. But, there's this post you can find FreeBSD port to build/install on FreeBSD – rob Aug 23 '18 at 14:50
  • @rob - When I follow the first link from your comment there is another link to "Add FreeBSD support to electron #3797" - The comment there: "Prash-wghats commented on Oct 12, 2016 - Was able to build electron and VSCode in freebsd11RC1. the build instruction is posted in: Notes for Building Electron and VSCode in FreeBSD11", to which "yonas commented on Dec 26, 2017 - Thanks prash-wghats !! Atom finally runs on FreeBSD" as did "ararslan commented on Dec 26, 2017". – Rob Aug 23 '18 at 16:27
  • 1
    Thanks for your follow up comment. I deleted/reposted my orig comment to you a couple of times to get the links correct. As I commented earlier, this post points to this FreeBSD port which is heavily based on @prash-wghats work which is derived from the github acct for the gist you linked to. – rob Aug 23 '18 at 17:10
  • With that in mind I am not clear what you're saying with your second comment. Your comment seems to paraphrase my comment's links but points to a gist that is potentially behind what seems like a more recent attempt at an Electron pull request by yzgyyang. Thanks for your time you have spent to make your comments. – rob Aug 23 '18 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.