rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
217 stars 137 forks source link

./build.sh Failure #183

Open EnzoArpino opened 3 years ago

EnzoArpino commented 3 years ago

Hi, I am new to RaspberryPi.

I am working with the M-Bus Master Hat. I need to detect slave addresses and modify them to my liking (I am connecting multiple water meters to my bus hat). I am following this code to install libmbus:

sudo apt install git libtool autoconf cmake build-essential git clone https://github.com/rscada/libmbus cd libmbus ./build.sh sudo cmake --build build --target install

When I get to the ./build.sh part, I see some warnings in red saying "libtool: warning: '-version-info' is ignored for programs, and then at the bottom it says: make[2]: Leaving directory '/home/pi/libmbus/bin' make[2]: Entering directory '/home/pi/libmbus' make[2]: Leaving directory '/home/pi/libmbus' make[1]: Leaving directory '/home/pi/libmbus'

When I run sudo cmake --build build --target install, I get the following: Error: /home/pi/libmbus/build is not a directory

From what I can tell, the build tries to access my mbus directory but fails to do so, and it leaves the directory and enters the bin, but then also ends up leaving that and nothing happens.

Any help?

KeelOli commented 3 years ago

Hi Enzo,

I'm not sure what went wrong with your installation but I'm also using a raspi and a JC-E gateway:

http://www.prevodniky.sk/product-list-USBMBus-en.html

I'm using the following bash script to install the libmbus library;

#!/bin/bash

echo Starting to install MBus Library
sudo apt-get install git
sudo apt-get install libtool
sudo apt-get install autoconf
sudo apt-get install cmake
sudo apt-get install build-essential

git clone https://github.com/rscada/libmbus
cd libmbus
sudo ./build.sh
sudo ./configure
sudo make
sudo make check
sudo make install
sudo make installcheck
sudo make clean
cd /
cd usr/local/bin
sudo ldconfig
echo Finished

with that, it works for me