Installing EMQX

I have tried to install EMQX https://www.emqx.io/docs/en/latest/ on FreeBSD 14 using the instructions on Github https://github.com/emqx/emqx
The instructions to Build from Source there are as follows:

cd emqx​
make​
_build/emqx/rel/emqx/bin/emqx console​

When I run the make it displays on the command line messages like these
Code:
    make: "/home/aperri/emqx/Makefile" line 1: Invalid line type
    make: "/home/aperri/emqx/Makefile" line 3: Invalid line type
    make: "/home/aperri/emqx/Makefile" line 5: Invalid line type
   make: "/home/aperri/emqx/Makefile" line 14: Invalid line type
What must I do to make the Makefile compatible with the gnu utilities I've installed on FreeBSD as show below?
[aperri@freebsd ~/emqx]$ pkg info autoconf
autoconf-2.72
Name : autoconf
Version : 2.72
Installed on : Mon Apr 8 12:13:12 2024 CEST
Origin : devel/autoconf
Architecture : FreeBSD:14:*
....
[aperri@freebsd ~/emqx]$ pkg info automake
automake-1.16.5_1
Name : automake
Version : 1.16.5_1
Installed on : Mon Apr 8 12:13:12 2024 CEST
Origin : devel/automake
Architecture : FreeBSD:14:*
....
[aperri@freebsd ~/emqx]$ pkg info gmake
gmake-4.4.1
Name : gmake
Version : 4.4.1
Installed on : Mon Apr 22 13:39:00 2024 CEST
Origin : devel/gmake
Architecture : FreeBSD:14:amd64
....
[aperri@freebsd ~/emqx]$ pkg info gcc
gcc-13_5
Name : gcc
Version : 13_5
Installed on : Mon Apr 8 23:35:02 2024 CEST
Origin : lang/gcc
....
[/code]
Or is there any other way I can install EMQX on FreeBSD 14?
 
Last edited:
Use [code]...[/code] please. I'm not going to edit out all those [INDENT] and [SIZE] bb-codes for you.

 
For starters, use gmake, not make.
Yes I did that and got the following result

Code:
aperri@freebsd ~/emqx]$ gmake
downloading rebar3 3.19.0-emqx-9
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  969k  100  969k    0     0   602k      0  0:00:01  0:00:01 --:--:-- 3236k
./scripts/get-distro.sh: line 35: SYSTEM: unbound variabl
gmake: *** [Makefile:175: emqx] Error 1

Perhaps the ./scripts/get-distro.sh needs to be modified for FreeBSD. Would you know how to do this?

Code:
#!/usr/bin/env bash

## This script prints Linux distro name and its version number
## e.g. macos, el8, ubuntu20.04

set -euo pipefail

UNAME="$(uname -s)"

case "$UNAME" in
    Darwin)
        DIST='macos'
        VERSION_ID="$(sw_vers | grep 'ProductVersion' | cut -d':' -f 2 | cut -d'.' -f1 | tr -d ' \t')"
        SYSTEM="${DIST}${VERSION_ID}"
        ;;
    Linux)
        # /etc/os-release on amazon linux 2 contains both rhel and centos strings
        if grep -q -i 'amzn' /etc/*-release; then
            DIST='amzn'
            VERSION_ID="$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed -r 's/VERSION_ID=(.*)/\1/g' | sed 's/"//g')"
        elif grep -q -i 'rhel' /etc/*-release; then
            DIST='el'
            VERSION_ID="$(rpm --eval '%{rhel}')"
        else
            DIST="$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')"
            VERSION_ID="$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed -r 's/VERSION_ID=(.*)/\1/g' | sed 's/"//g')"
        fi
        SYSTEM="$(echo "${DIST}${VERSION_ID}" | sed -r 's/([a-zA-Z]*)-.*/\1/g')"
        ;;
    CYGWIN*|MSYS*|MINGW*)
        SYSTEM="windows"
        ;;
esac

echo "$SYSTEM"
 
Last edited:
Use [code]...[/code] please. I'm not going to edit out all those [INDENT] and [SIZE] bb-codes for you.

Hello SirDice,

I've posted two threads pointing out the problems I'm having trying to get both MQTX and open62541 running on FreeBSD. Of the two applications, the most important one for me, is MQTX. Both of these software development tools, are are extensively used for distributed control systems. On Windows and Linux variants they run flawlessly. Since Beckhoff's TwinCat Control Software has an ASD protocol that can run on FreeBSD, I would like to have the two previously mentioned software tools run on FreeBSD as well. Could you help me iron out what I need to do to get them to run?
 
Today I easily installed EMQX Ver: 5.1.4 on my Debian 10 Linux machine using the command


sudo apt-get install emqx-5.1.4


I would like to be able to install EMQX Ver: 5.1.4 on FreeBSD just as easily.
 
I would like to be able to install EMQX Ver: 5.1.4 on FreeBSD just as easily
Then if it’s not already ported to FreeBSD someone will have to volunteer to port it (and all its dependencies) to FreeBSD and then support and maintain those ports.

If it’s not already in ports that may mean that there’s not been enough interest from someone who can do it or it’s a lot of work.

If you don’t have the time or technical skills (I certainly do not!) then why not offer to pay someone to do it or at least offer a bounty.
 
Back
Top