Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it work on macos? #22

Closed
p3k opened this issue Feb 4, 2018 · 14 comments
Closed

Does it work on macos? #22

p3k opened this issue Feb 4, 2018 · 14 comments
Labels

Comments

@p3k
Copy link

p3k commented Feb 4, 2018

I am confused how to compile or run anything with NectarJS on macos 10.13.2 (17C88)…

# nectar -v
NectarJS Client v0.0.53

# nectar example.js
[!] Bad target

[*] Available targets :
-> win-x86-32
-> win-x86-64
-> linux-x86-32
-> linux-x86-64
-> linux-arm32v7
-> arduino-uno
-> arduino-mega1280
-> arduino-mega2560
-> wasm
-> wast
-> asm-js

# cat project.json
{"main": "example.js", "out": "example.asm.js", "target":"asm-js", "preset":"speed"}

# nectar --target asm-js example.js
Missing project.json

Note: I am using MacPorts, could this affect compilation?

# port select --summary
Name        Selected           Options
====        ========           =======
gcc         mp-gcc49           none
llvm        mp-llvm-3.5        none
@adrien-thierry
Copy link
Contributor

It works, I have to add compile option for MacOS

@p3k
Copy link
Author

p3k commented Feb 7, 2018

um, in the meantime i tried it on a linux machine with similar problems:

# uname -morp && lsb_release -d
4.4.0-112-generic x86_64 x86_64 GNU/Linux
Description:    Ubuntu 16.04.3 LTS

# nectar --example
[+] Copy of arduino.js done
[+] Copy of bad.js done
[+] Copy of bool.js done
[+] Copy of c/test.c done
[+] Copy of c_interface.js done
[+] Copy of child_process.js done
[+] Copy of fibo.js done
[+] Copy of fiboit.js done
[+] Copy of fs.js done
[+] Copy of http_demo.js done
[+] Copy of log.ts done
[+] Copy of loop.js done
[+] Copy of example.js done
[+] Copy of object.js done
[+] Copy of operation.js done
[+] Copy of print.py done
[+] Copy of protoclass.js done
[+] Copy of require.js done
[+] Copy of source.js done
[+] Copy of string.js done

# nectar example.js
Missing project.json

# cat project.json 
{"main": "example.js", "out": "example-linux-x86-64.bin", "target":"linux-x86-64", "preset":"speed"}

# nectar example.js
Missing project.json

shouldn’t this work?

@adrien-thierry
Copy link
Contributor

It should, I've just tried on my debian and it works well

@p3k
Copy link
Author

p3k commented Feb 8, 2018

i see. any suggestions what i could try to make it work for me, too? could i check / provide any configuration settings or the like?

@adrien-thierry
Copy link
Contributor

Could you give me your NodeJS version ?

@p3k
Copy link
Author

p3k commented Feb 8, 2018

# node -v
v8.9.4

@ilearnio
Copy link

This project looks promising! But I can't test it. When can we expect it to work on macOS?

@ilearnio
Copy link

I also have the same error "Missing project.json" even though I have it. See video http://take.ms/Jhh71

@adrien-thierry
Copy link
Contributor

Thank you ilearnio, we will work soon on MacOS compatibilty

@adrien-thierry
Copy link
Contributor

Mac OS X compilation is now supported

@glockjt
Copy link

glockjt commented Aug 29, 2018

Just tried running the example on mac and getting this error

{ Error: Command failed: ./file-mac-osx.bin
dyld: Symbol not found: __ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE
  Referenced from: /Users/jglock/personal-repo/test-nectarjs/./file-mac-osx.bin
  Expected in: /usr/lib/libstdc++.6.0.9.dylib
 in /Users/jglock/personal-repo/test-nectarjs/./file-mac-osx.bin

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12)
  killed: false,
  code: null,
  signal: 'SIGABRT',
  cmd: './file-mac-osx.bin' }

any help would be greatly appreciated!

@adrien-thierry
Copy link
Contributor

Hi,

Could you try again ?

@glockjt
Copy link

glockjt commented Aug 29, 2018

Worked. What fixed it?

@adrien-thierry
Copy link
Contributor

Static linking

I tried to optimize binary size by linking parts of libs, but I need to take more time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants