KxSystems / mqtt

MQTT messaging protocol interface
https://code.kx.com/q/interfaces
Apache License 2.0
9 stars 12 forks source link

mqtt with raspbery pi - install issues #29

Closed sshanks-kx closed 2 years ago

sshanks-kx commented 4 years ago

Report from user:

I have the interface working on a Raspberry Pi but had some issues following the instructions and using the supplied install.sh Default kdb+ build from kx comes named q/l32arm . I needed to rename to q/l32 Otherwise error will be seen: q)\l mqtt.q '/home/pi/q/l32/mqtt.so: cannot open shared object file: No such file or directory [2] /home/pi/q/mqtt.q:2: connX :mqtt 2:(connX;3); ^ [0] () Install.sh fails Detected System

Instead of using install.sh I just did copies manually: cp q/mqtt.q $QHOME/ cp cmake/mqtt.so $QHOME/l32/

sshanks-kx commented 4 years ago

Steps

#Broker and command line tools install
sudo apt-get install mosquitto mosquitto-clients

#q lib folder comes as l32arm from Kx make sure to rename to l32
#.bashrc entries:
export PATH="$PATH:/home/pi/q/l32"
export QHOME="/home/pi/q"

sudo apt-get install libssl-dev git cmake

wget https://github.com/eclipse/paho.mqtt.c/archive/v1.3.2.tar.gz
tar -xzf v1.3.2.tar.gz
cd paho.mqtt.c-1.3.2
make
sudo make install

export BUILD_HOME=/usr/local/lib

cd ..
wget -O mqtt.tar.gz https://github.com/KxSystems/mqtt/archive/1.0.0-rc.1.tar.gz
tar -xzf mqtt.tar.gz
cd mqtt-1.0.0-rc.1
mkdir cmake && cd cmake
cmake ..
make
make install
cd ..
cp q/mqtt.q $QHOME/
cp cmake/mqtt.so $QHOME/l32/
sshanks-kx commented 4 years ago

Ref: https://cmake.org/cmake/help/v3.7/variable/CMAKE_HOST_SYSTEM_PROCESSOR.html#variable:CMAKE_HOST_SYSTEM_PROCESSOR

rianoc commented 3 years ago

@cmccarthy1 - This is working correctly on Raspberry Pi now - can be closed out.