KxSystems / mqtt

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

Unable to build MQTT on Redhat7.6 #46

Closed peteclarkez closed 2 years ago

peteclarkez commented 2 years ago

When trying to build on redhat7.6 it doesn't seem possible (easy) to install cmake3

Clean install

sudo yum install libGL libGLU libX11 vim netstat bind-utils tcpdump lsof telnet
sudo yum install net-tools wget libpng fontconfig zip unzip bzip2 rsync unixODBC
sudo yum install  java-11-openjdk
sudo yum install compat-openssl10
sudo yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver

-- installed Anaconda ./Anaconda3-2022.05-Linux-x86_64.sh

sudo yum install git gcc g++ cmake make vim wget dos2unix autoconf automake libtool

mkdir github
cd github/

sudo yum install git gcc g++ cmake make vim wget dos2unix autoconf automake libtool
sudo yum -y install openssl-devel

git clone https://github.com/KxSystems/mqtt
git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c/
make
sudo make install
cd ../mqtt/

mkdir build && cd build
cmake ..
(base) [kxlm@kxlmukdev01 build]$ cmake ..
CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version 2.8.12.2

-- Configuring incomplete, errors occurred!
(base) [kxlm@kxlmukdev01 build]$ cmake --version
cmake version 2.8.12.2
(base) [kxlm@kxlmukdev01 build]$ sudo yum -y install cmake3
Failed to set locale, defaulting to C
Loaded plugins: langpacks, product-id, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package cmake3.x86_64 0:3.17.5-1.el7 will be installed
--> Processing Dependency: cmake3-data = 3.17.5-1.el7 for package: cmake3-3.17.5-1.el7.x86_64
--> Processing Dependency: librhash.so.0()(64bit) for package: cmake3-3.17.5-1.el7.x86_64
--> Processing Dependency: libuv.so.1()(64bit) for package: cmake3-3.17.5-1.el7.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: cmake3-3.17.5-1.el7.x86_64
--> Running transaction check
---> Package cmake3-data.noarch 0:3.17.5-1.el7 will be installed
--> Processing Dependency: /usr/bin/python3 for package: cmake3-data-3.17.5-1.el7.noarch
---> Package libuv.x86_64 1:1.44.2-1.el7 will be installed
---> Package libzstd.x86_64 0:1.5.2-1.el7 will be installed
---> Package rhash.x86_64 0:1.3.4-2.el7 will be installed
--> Processing Dependency: /usr/bin/python3 for package: cmake3-data-3.17.5-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: cmake3-data-3.17.5-1.el7.noarch (epel)
           Requires: /usr/bin/python3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Tried various tests/installs to get python installed but still can't yum install cmake3

cmake --version
  161  sudo yum -y install python3 cmake3 ## No lnonger in 7.6
  162  sudo yum -y install rh-python36 cmake3
  163  sudo yum -y install rh-python36
  164  sudo yum -y install cmake3 ## Still fails
  165  scl enable rh-python36 bash
python3 -V
which python  ## installed in /opt/rh/rh-python36/root/usr/bin/python3
peteclarkez commented 2 years ago

Request for a fix is to either include instructions for cmake3 or else to revert to an earlier version.

peteclarkez commented 2 years ago

Answer my own question here

Found instructions to download cmake3 from binary rather than yum

https://codeyarns.com/tech/2019-03-20-how-to-install-cmake.html#gsc.tab=0

wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-linux-x86_64.sh
chmod +x cmake-3.24.1-linux-x86_64.sh
sudo cp cmake-3.24.1-linux-x86_64.sh /opt
cd /opt/
sudo bash ./cmake-3.24.1-linux-x86_64.sh
sudo ln -s /opt/cmake-3.24.1-linux-x86_64/bin/* /usr/local/bin/
cmake --version