Git Product home page Git Product logo

Comments (9)

rburkholder avatar rburkholder commented on June 11, 2024

My notes need revamping, but bottom line, you'll need to clone, build and install https://github.com/rburkholder/repertory first to obtain the MQTT interface. I factored it out as I found I use it
across a number of my projects.

from nut2mqtt.

bigfeetneedbigboots avatar bigfeetneedbigboots commented on June 11, 2024

No luck. I ran:

git clone https://github.com/rburkholder/repertory.git
cd repertory/
mkdir build
cd build/
cmake ..
make

Then at the 60% finished point I get:

[ 60%] Building CXX object Telegram/CMakeFiles/telegram_static.dir/Bot.cpp.o
/home/pi/repertory/Telegram/Bot.cpp:30:10: fatal error: boost/json.hpp: No such file or directory
30 | #include <boost/json.hpp>
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Telegram/CMakeFiles/telegram_static.dir/build.make:95: Telegram/CMakeFiles/telegram_static.dir/Bot.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:192: Telegram/CMakeFiles/telegram_static.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

I don't want telegram but is there some sort of dependency on it? Would you please let me know the commands to run to get past this sticking point?

from nut2mqtt.

rburkholder avatar rburkholder commented on June 11, 2024

As shown in the repositories build instructions, you'll need:

sudo apt install libpaho-mqtt-dev

mkdir build
cd build

cmake \
-D CMAKE_BUILD_TYPE=Release \
-D OU_USE_STATIC_LIB=ON \
-D OU_USE_SHARED_LIB=OFF \
-D OU_USE_MQTT=ON \
-D OU_USE_Telegram=OFF \
..
sudo cmake --build . --target=install

from nut2mqtt.

bigfeetneedbigboots avatar bigfeetneedbigboots commented on June 11, 2024

Getting stuck on the sudo cmake command:

$ sudo cmake --build . --target=install
Unknown argument --target=install
Usage: cmake --build

[options] [-- [native-options]]
Options:

= Project binary directory to be built. --parallel [], -j [] = Build in parallel using the given number of jobs. If is omitted the native build tool's default number is used. The CMAKE_BUILD_PARALLEL_LEVEL environment variable specifies a default parallel level when this option is not given. --target ..., -t ... = Build instead of default targets. --config = For multi-configuration tools, choose . --clean-first = Build target 'clean' first, then build. (To clean only, use --target 'clean'.) --verbose, -v = Enable verbose output - if supported - including the build commands to be executed. -- = Pass remaining options to the native tool.

from nut2mqtt.

rburkholder avatar rburkholder commented on June 11, 2024

please show complete build, like this:

~/data/projects/repertory$ mkdir build
~/data/projects/repertory$ cd build
~/data/projects/repertory/build$ cmake \
-D CMAKE_BUILD_TYPE=Release \
-D OU_USE_STATIC_LIB=ON \
-D OU_USE_SHARED_LIB=OFF \
-D OU_USE_MQTT=ON \
-D OU_USE_Telegram=OFF \
..
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type set to Release
-- Repertory will be installed to /usr/local
-- Installing LIB components to /usr/local/lib
-- Installing BIN components to /usr/local/bin
-- Installing INCLUDE components to /usr/local/include
-- Installing CMAKE components to /usr/local/
-- The C compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rpb/data/projects/repertory/build
~/data/projects/repertory/build$ sudo cmake --build . --target=install
[sudo] password for rpb:
[ 50%] Building CXX object MQTT/CMakeFiles/mqtt_static.dir/mqtt.cpp.o
[100%] Linking CXX static library libou_mqtt.a
[100%] Built target mqtt_static
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libou_mqtt.a
-- Installing: /usr/local/include/ou/mqtt/config.hpp
-- Installing: /usr/local/include/ou/mqtt/mqtt.hpp
~/data/projects/repertory/build$ cmake --version
cmake version 3.25.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

from nut2mqtt.

bigfeetneedbigboots avatar bigfeetneedbigboots commented on June 11, 2024

Same as previous comment. I get similar until the sudo cmake command which has an unknown argument of "--target=install".

I'm doing this on a Raspberry Pi 4 running the OctoPi version of Raspbian. Does that shed any light on the issue?

from nut2mqtt.

rburkholder avatar rburkholder commented on June 11, 2024

what is 'cmake --version'?

I'm not familiar with what 'Raspberry Pi 4 running the OctoPi version of Raspbian' functions are provided.

from nut2mqtt.

bigfeetneedbigboots avatar bigfeetneedbigboots commented on June 11, 2024

$ cmake --version
cmake version 3.18.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

from nut2mqtt.

rburkholder avatar rburkholder commented on June 11, 2024

ok, you might be able to leave the --target=install off, then do a manual 'sudo make install'

from nut2mqtt.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.