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

Version 1.2b on Raspberry Pi? #488

Open
mcinquino opened this issue Jun 6, 2021 · 6 comments
Open

Version 1.2b on Raspberry Pi? #488

mcinquino opened this issue Jun 6, 2021 · 6 comments

Comments

@mcinquino
Copy link

Hello,

Has anyone got version 1.2b running on a Raspberry Pi 4? I would like to use some of the new features in it.. primarily the shortcut keys. I tried to compile but got errors. I have version 1.1.8 running on the pi but that did not require the compiling process. Was wondering if there was a simpler way to get it running on a pi?

I followed the instructions shown from wiki here: https://github.com/Denvi/Candle/wiki/Compiling-for-Raspberry-Pi-4

@ondras12345
Copy link

Hi,
I think building from source is currently the best way to go.
You're probably just missing a few dependencies. Please post the exact errors you got.

@mcinquino
Copy link
Author

Hello,

I made the changes to the 2 files as outlined. Below is what I get when I qmake and make.

pi@raspberrypi:~/Downloads/candle 12b/Candle-1.2b/src $ qmake candle.pro
Project WARNING: GL ES detected. VAO will be disabled.

pi@raspberrypi:~/Downloads/candle 12b/Candle-1.2b/src $ make
g++ -c -pipe -Z7 -Fdrelease\candle.pdb -O2 -Wall -W -D_REENTRANT -fPIC -DUNIX -DGLES -DsNan="65536" -DAPP_VERSION="1.2b" -D_USE_MATH_DEFINES -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SERIALPORT_LIB -DQT_CORE_LIB -I. -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtOpenGL -isystem /usr/include/arm-linux-gnueabihf/qt5/QtWidgets -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtSerialPort -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o main.o main.cpp
g++: error: unrecognized command line option \u2018-Z7\u2019; did you mean \u2018-Z\u2019?
make: *** [Makefile:773: main.o] Error 1

Thanks,
Mike

@ondras12345
Copy link

ondras12345 commented Jun 10, 2021

This is not a complete tutorial. I don't currently have time to resolve the remaining issues. Hopefully someone can continue where I left off.

I don't currently have a RPi with GUI handy, so I fired up a VM with Raspberry Pi Desktop. It should be pretty much the same as on a real Pi.
Install the needed packages. This could use some cleanup as it probably installs quite a lot of unneeded stuff...

sudo apt install qt5-default libqt5serialport5-dev qttools5-dev-tools qtmultimedia5-dev qttools5-dev qtscript5-dev

Clone the repository and checkout to the Experimental branch (commit 07c4c34 at the time of writing).

git clone https://github.com/Denvi/Candle.git
cd Candle
git checkout Experimental

You'll need to patch a few .pro files:

sed 's:-L../designerplugins/customwidgetsplugin/release -lcustomwidgets:-L../designerplugins/customwidgetsplugin -lcustomwidgets:' -i src/candle/candle.pro
sed 's:../designerplugins/customwidgetsplugin/release -lcustomwidgets:../designerplugins/customwidgetsplugin -lcustomwidgets:' -i src/scriptbindings/qtbindings/qtscript_custom/qtscript_custom.pro

This should probably be fixed @Denvi

I have no idea why I need to do this, but the qtscript stuff failed to compile without this patch:

sed 's:\(Q_DECLARE_METATYPE(QList<QSslError >)\)://\1:' -i src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp
sed 's:\(Q_DECLARE_METATYPE(QSslConfiguration)\)://\1:' -i src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp

Compile everything:

qmake candle.pro
make

This can take quite a long time (26 minutes in my case), so please be patient.

See if it works:

./src/candle/Candle

In my case, it failed to find libcustomwidgets.so.
I fixed this by calling the program with this environment variable:

LD_LIBRARY_PATH="$PWD/src/designerplugins/customwidgetsplugin" ./src/candle/Candle

I haven't had time to play with this, so I don't know if everything works properly. But at least it started.

EDIT: The compilation process can be sped up significantly by using make's parallel mode. For example make -j 2 will run 2 simultaneous jobs. This reduced the time needed to compile everything to 17 minutes in my case. I only had a 2 core virtual CPU in the VM, but on the real Pi, you could probably benefit from using even more jobs.

@mcinquino
Copy link
Author

Thank you. I will give this a try.

@ondras12345
Copy link

To make plugins work (hopefully):

ln -s ../scriptbindings/plugins/script src/candle/script
ln -s ../candleplugins src/candle/plugins

@yeyeto2788
Copy link

Hey @mcinquino!

I installed it on an x64 machine using a tool I created you can see the screenshot of it running. You may want to give it a try, I indeed used the grbl_1_1 on my tests but I don't see why it shouldn't work.

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

No branches or pull requests

3 participants