Confused with Linuxulator

Need support for GhostBSD. Ask here if your question does not fit elsewhere.

Confused with Linuxulator

Postby zezollo » Tue Jul 04, 2017 2:37 am

Hello,

Trying to install atom (text editor) via rpm:

Code: Select all
[root@mayahuel /usr/home/nico]# cd /compat/linux/
[root@mayahuel /compat/linux]# rpm2cpio < /home/nico/Téléchargements/atom.x86_64.rpm | cpio -id
./usr/share/icons/hicolor: Cannot extract through symlink usr/share/icons/hicolor
./usr/share/icons/hicolor/1024x1024: Cannot extract through symlink usr/share/icons/hicolor/1024x1024
./usr/share/icons/hicolor/1024x1024/apps: Cannot extract through symlink usr/share/icons/hicolor/1024x1024/apps
./usr/share/icons/hicolor/1024x1024/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/1024x1024/apps/atom.png
./usr/share/icons/hicolor/128x128: Cannot extract through symlink usr/share/icons/hicolor/128x128
./usr/share/icons/hicolor/128x128/apps: Cannot extract through symlink usr/share/icons/hicolor/128x128/apps
./usr/share/icons/hicolor/128x128/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/128x128/apps/atom.png
./usr/share/icons/hicolor/16x16: Cannot extract through symlink usr/share/icons/hicolor/16x16
./usr/share/icons/hicolor/16x16/apps: Cannot extract through symlink usr/share/icons/hicolor/16x16/apps
./usr/share/icons/hicolor/16x16/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/16x16/apps/atom.png
./usr/share/icons/hicolor/24x24: Cannot extract through symlink usr/share/icons/hicolor/24x24
./usr/share/icons/hicolor/24x24/apps: Cannot extract through symlink usr/share/icons/hicolor/24x24/apps
./usr/share/icons/hicolor/24x24/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/24x24/apps/atom.png
./usr/share/icons/hicolor/256x256: Cannot extract through symlink usr/share/icons/hicolor/256x256
./usr/share/icons/hicolor/256x256/apps: Cannot extract through symlink usr/share/icons/hicolor/256x256/apps
./usr/share/icons/hicolor/256x256/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/256x256/apps/atom.png
./usr/share/icons/hicolor/32x32: Cannot extract through symlink usr/share/icons/hicolor/32x32
./usr/share/icons/hicolor/32x32/apps: Cannot extract through symlink usr/share/icons/hicolor/32x32/apps
./usr/share/icons/hicolor/32x32/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/32x32/apps/atom.png
./usr/share/icons/hicolor/48x48: Cannot extract through symlink usr/share/icons/hicolor/48x48
./usr/share/icons/hicolor/48x48/apps: Cannot extract through symlink usr/share/icons/hicolor/48x48/apps
./usr/share/icons/hicolor/48x48/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/48x48/apps/atom.png
./usr/share/icons/hicolor/512x512: Cannot extract through symlink usr/share/icons/hicolor/512x512
./usr/share/icons/hicolor/512x512/apps: Cannot extract through symlink usr/share/icons/hicolor/512x512/apps
./usr/share/icons/hicolor/512x512/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/512x512/apps/atom.png
./usr/share/icons/hicolor/64x64: Cannot extract through symlink usr/share/icons/hicolor/64x64
./usr/share/icons/hicolor/64x64/apps: Cannot extract through symlink usr/share/icons/hicolor/64x64/apps
./usr/share/icons/hicolor/64x64/apps/atom.png: Cannot extract through symlink usr/share/icons/hicolor/64x64/apps/atom.png
865731 blocks
[root@mayahuel /compat/linux]#


I think these errors might be corrected and anyway shouldn't prevent atom to start, at least.

(Background: linux.ko and linux64.ko are loaded, as expected, and I installed the c6 base from octopkg).

Now I'm at a loss to know how to actually start it.

I've tried this:

Code: Select all
[root@mayahuel /compat/linux]# bash -x ./usr/bin/atom


but as this script actually starts with a test based on uname to decide whether the OS is supported or not, and as it only accepts Linux or Mac, it ends up displaying:
Code: Select all
Your platform (FreeBSD [...]  amd64) is not supported.


though it also shows a fair bunch of syntax errors (I guess originating from differences between FreeBSD's and Linux's bashes?)

So.

What should I do next?

I see several ways:

1. try to hack this script to let it accept FreeBSD and see what happens (looks like a random attempt...).

2. find a way to correctly start this rpm-installed software (Should I chroot before I run it? Is there at all a way to let it think it's actually running under Linux, something similar to a jail environment?)

3. abandon the linuxulator way and investigate the wine way?
zezollo
 
Posts: 8
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 1 time
Been thanked: 0 time

Confused with Linuxulator


Re: Confused with Linuxulator

Postby NevilleGoddard » Tue Jul 04, 2017 8:45 am

NevilleGoddard
Developer
 
Posts: 319
Joined: Thu Dec 22, 2016 10:30 pm
Has thanked: 70 times
Been thanked: 38 times

Re: Confused with Linuxulator

Postby NevilleGoddard » Tue Jul 04, 2017 8:47 am

NevilleGoddard
Developer
 
Posts: 319
Joined: Thu Dec 22, 2016 10:30 pm
Has thanked: 70 times
Been thanked: 38 times

Re: Confused with Linuxulator

Postby zezollo » Tue Jul 04, 2017 9:53 am

The one from github I tried some months ago, it didn't work anymore (support of electron has been dropped).
It ended up this way: https://www.bountysource.com/issues/290 ... o-electron
I give it a try again, right now, and still does not work, though I see the issue seems different than before.

Code: Select all
$ script/build
Node:   v8.1.3
Npm:   v5.0.4
Installing script dependencies
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2798, in Load
    RemoveLinkDependenciesFromNoneTargets(targets)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1513, in RemoveLinkDependenciesFromNoneTargets
    if targets[t].get('variables', {}).get('link_dependency', 0):
KeyError: 'deps/breakpad/breakpad.gyp:dump_syms#target'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
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:197:12)
gyp ERR! System FreeBSD 10.3-RELEASE-p18
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/nico/dev/atom/script/node_modules/minidump
gyp ERR! node -v v8.1.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! minidump@0.9.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the minidump@0.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!     /home/nico/.npm/_logs/2017-07-04T13_44_40_626Z-debug.log
child_process.js:611
    throw err;
    ^

Error: Command failed: npm --loglevel=error install
Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2798, in Load
    RemoveLinkDependenciesFromNoneTargets(targets)
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1513, in RemoveLinkDependenciesFromNoneTargets
    if targets[t].get('variables', {}).get('link_dependency', 0):
KeyError: 'deps/breakpad/breakpad.gyp:dump_syms#target'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
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:197:12)
gyp ERR! System FreeBSD 10.3-RELEASE-p18
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/nico/dev/atom/script/node_modules/minidump
gyp ERR! node -v v8.1.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! minidump@0.9.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the minidump@0.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!     /home/nico/.npm/_logs/2017-07-04T13_44_40_626Z-debug.log

    at checkExecSyncError (child_process.js:588:13)
    at Object.execFileSync (child_process.js:608:13)
    at module.exports (/usr/home/nico/dev/atom/script/lib/install-script-dependencies.js:9:16)
    at Object.<anonymous> (/usr/home/nico/dev/atom/script/bootstrap:27:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
$


I could try the TrueOS way of installing atom too... but as it consists of building atom from the github sources, I'm afraid this won't work better...
zezollo
 
Posts: 8
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Confused with Linuxulator

Postby NevilleGoddard » Tue Jul 04, 2017 10:15 am

Good luck with trying the TrueOS method.
If you can understand what this guy did, you may get electron running under GhostBSD10.3 with some editing. (Freebsd11 to FreeBSD10)

https://gist.github.com/prash-wghats/89be1ee069d2acf23c289e9c606616e1

I've tried linuxulator on some programs with not much luck unfortunately.
NevilleGoddard
Developer
 
Posts: 319
Joined: Thu Dec 22, 2016 10:30 pm
Has thanked: 70 times
Been thanked: 38 times

Re: Confused with Linuxulator

Postby zezollo » Tue Jul 04, 2017 1:08 pm

Well this drives crazy. It stops at this: npm install chromedriver -g with a permission error (a directory not being writable). As it does not exist, I created it and gave permission (full write access, just to see), then I get a too many symbolic links error, no idea what to do about it.

From an issue for another project in github, it looks like the fix is to not install system-wide, what looks required by the steps for TrueOS... and it requires a nvm command that I cannot find in the repos. So, I think I give up with this way :?

Now maybe there's a way through wine?
zezollo
 
Posts: 8
Joined: Sun Feb 12, 2017 12:54 pm
Has thanked: 1 time
Been thanked: 0 time


Return to General support

Who is online

Users browsing this forum: No registered users and 2 guests

cron