06-21-2019 08:24 AM
Hi ,
g++ does not exist with that name on ni linux rt target. You should first install it with opkg install g++. And then export alias variables.
For a 64 bit target (exemple PXI88xx) you could define the following variables in environment
:
export CC = x86_64-nilrt-linux-gcc
export CXX = x86_64-nilrt-linux-g++
Then be sure to use that variables in your makefile (which is very common).
Regards
09-21-2020 01:57 PM
Were you ever able to get this cross compiled and working on the cRIO?
10-01-2020 11:28 AM - edited 10-01-2020 12:46 PM
I was able to get Mosquitto installed with TLS with the following combination of things (I might have left something out):
opkg install g++
opkg install packagegroup-core-buildessential
opkg install packagegroup-core-buildessential-dev
opkg install packagegroup-core-python
opkg install packagegroup-core-full-cmdline
opkg install packagegroup-core-perl
export CC=x86_64-nilrt-linux-gcc
export CXX=x86_64-nilrt-linux-g++
wget https://mosquitto.org/files/source/mosquitto-1.6.12.tar.gz
tar xvf mosquitto-1.6.12.tar.gz
cd mosquitto-1.6.12
make LIB_CFLAGS="-I/usr/include/ -fPIC"
make install
then I made an init.d script for mosquitto and installed per the instructions here:
#!/bin/bash
NAME="Mosquitto Startup Script"
DAEMON="/usr/local/sbin/mosquitto"
ARGS=""
USER=mosquitto
PIDFILE=/var/run/mosquitto.pid
do_start() {
/sbin/start-stop-daemon --start --pidfile $PIDFILE \
--make-pidfile --background \
--chuid $USER --exec $DAEMON $ARGS
}
do_stop() {
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
}
case "$1" in
start)
echo "Starting $NAME"
do_start
;;
stop)
echo "Stopping $NAME"
do_stop
;;
restart)
echo "Restarting $NAME"
do_stop
do_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
So far everything seems to be working. I'll update if I find that I've left something out.
04-26-2021 09:51 AM
I've encountered some issues regarding logging and persistence locations. It seems to be related to folder/file permissions and I haven't had a chance to sort through all of that.