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

Running in Raspberry Pi #22

Closed
kkcy opened this issue Dec 25, 2019 · 4 comments
Closed

Running in Raspberry Pi #22

kkcy opened this issue Dec 25, 2019 · 4 comments

Comments

@kkcy
Copy link

kkcy commented Dec 25, 2019

Hey there, not sure if nodegui is supported in Raspi, but I tried and it only outputs a file with weird name:
�F@@��@8@

I tried to run it with nodejs but npm install fails with CMAKE errors.
Then I create a ubuntu VM on my mac and use packer to create an executable, the executable runs fine in ubuntu.

However the same executable does not have a response except creating a file with the name of �F@@��@8@.

I noticed that nodegui has to run under 64 bit, i have enabled it on Raspbian, though 64bit support isn't very good in Raspbian currently.
Running uname -m outputs aarch64

@elviosak
Copy link

I dont think it has support for arm, u would need to at least compile qode for arm since it is node runtime with some qt stuff, probably other things too, not sure if addon api works on pi either

@a7ul
Copy link
Collaborator

a7ul commented Dec 25, 2019

Yes, two things.

  1. Qode https://github.com/nodegui/qode (which is a lightly modified nodejs runtime) used to run nodegui apps instead of nodejs. This needs to be compiled for raspberry pi. You can find the instructions there.

  2. You need to make sure you are running NodeGui apps against the Qt compiled for raspberry pi.
    To do this you need to set env variable QT_INSTALL_DIR or change the cmake file that comes with nodegui to point to the custom Qt installation.

Although not tested this should be enough to make it work.

PS: We are currently not planning on supporting Raspberry Pi. So I will close this issue.

@a7ul a7ul closed this as completed Dec 25, 2019
@kkcy
Copy link
Author

kkcy commented Dec 26, 2019

After followed the first step, we not able to proceed and stuck at this step as we do not able to find the directory structure shown below:
Building Qode. Run QT_INSTALL_DIR=<path_to_qt_install_dir>/5.12.4/gcc_64 node build.js

Please guide us.
List of make install output we have:

parallels@parallels-Parallels-Virtual-Platform:~/raspi$ ls qt5*
qt5:
bin  lib  mkspecs

qt5pi:
bin  doc  include  lib  plugins  qml  translations

@a7ul
Copy link
Collaborator

a7ul commented Dec 27, 2019

Hi @kkcy You might need to set TARGET_ARCH= and HOST_ARCH= accordingly
for raspi i think the target arch would be arm but you should double check with nodejs build guide.

For starters, try building nodejs from source on the target machine. If nodejs can build successfully then qode can aswell. Qode is just nodejs + dynamically linked Qt.

Also check the build.js file for more details.

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

No branches or pull requests

3 participants