freeBSD:Atom 文本编辑器

rob*_*rob 6 freebsd virtualbox node.js npm atom-editor

FreeBSD 的每个Atom 文本编辑器构建说明:

pkg install node
pkg install npm
pkg install libgnome-keyring
npm config set python /usr/local/bin/python2 -g
Run Code Online (Sandbox Code Playgroud)

然后:

git clone https://github.com/atom/atom
cd atom
script/build
Run Code Online (Sandbox Code Playgroud)

这是在使用运行 Gnome 3.18.2 的 FreeBSD-11.1-RELEASE-amd64-disc1.iso 的带有 Guest Additions 的 vbox 来宾上。赢得 10 位主机。

当我:

script/build
Run Code Online (Sandbox Code Playgroud)

我得到:

  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)
Run Code Online (Sandbox Code Playgroud)

错误日志:

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

我想我会从我想象的顶部开始并尝试:

npm install leveldown
Run Code Online (Sandbox Code Playgroud)

没运气。

我试过:

npm install leveldown --llvm-version=5.0
Run Code Online (Sandbox Code Playgroud)

在 freebsd 11.1 #390 上按照Level/leveldown/fails 进行构建

但是,Atom 仍然没有构建......相同的输出。也许这已经在其他地方解决了,但我还没有机会看到它。

虽然这不是一个端口派对,但在lovell/sharp/Cannot build for FreeBSD 11 中提到了一个端口错误不再支持 _LIBCPP_TRIVIAL_PAIR_COPY_CTOR #873

我遇到了atom/atom/Atom 无法在 FreeBSD 11.0 x86_32 #6035 上构建的问题,但如果问题足够相似,我的知识不足无法解析。我认为它们不够明显相似。

我想象 leveldown 是第一个错误。按照这种想象,我猜测 leveldb 是仅按输出顺序排列的下一个错误。我还没有足够接近 leveldb。

我试过:

npm install ~/atom/script leveldown --llvm-version=5.0
Run Code Online (Sandbox Code Playgroud)

依然没有。

leveldown-prebuilt
Run Code Online (Sandbox Code Playgroud)

更差。犯错更快。

Atom 不是在 freeBSD 上构建的吗?我是否遵循正确的路径来解决错误?我注意到输出 refs leveldown v. 1.9。

atom/script/package.json
Run Code Online (Sandbox Code Playgroud)

说:

"leveldown": "^2.0.0",
Run Code Online (Sandbox Code Playgroud)

但 leveldown 似乎在 v. 1.5 上。我不认为这有什么不同,但我该说谁......?

我如何从这里开始在 freeBSD-11.1 上构建和运行 Atom?

感谢您的意见、帮助和耐心。

Rob*_*Rob 0

通过“ Bug 222153 - www/node:在运行时检测 clang 版本”中的补丁修复。

来源:“ Bug 220983 - www/node:错误地修补 common.gypi ”:

报告时间:2017-07-24 23:28 UTC 作者:Randy

www/node 的 ports 安装正在修补 common.gypi,其中包括以下几行。

在 /usr/include/c++/v1/cstdlib:85 包含的文件中:/usr/include/c++/v1/__config:73:2:错误:不再支持“_LIBCPP_TRIVIAL_PAIR_COPY_CTOR”。使用 _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR 代替

不再支持#error“_LIBCPP_TRIVIAL_PAIR_COPY_CTOR”。\^

生成 1 个错误。

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

Bug 222153 包含修复此问题的补丁