fluxengine icon indicating copy to clipboard operation
fluxengine copied to clipboard

Compiling FluxEngine on Raspberry Pi (Buster)

Open matt-melbourne opened this issue 3 years ago • 4 comments

I've trying to compile on a Raspberry Pi (buster). I have installed the dependencies inthe documentation, but the make script is not recognising fmt.

pi@raspberrypi:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ cd fluxengine/
pi@raspberrypi:~/fluxengine $ make
Package fmt was not found in the pkg-config search path.
Perhaps you should add the directory containing `fmt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fmt' found
Package fmt was not found in the pkg-config search path.
Perhaps you should add the directory containing `fmt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fmt' found
lib/build.mk:81: *** Missing required pkg-config dependency:  fmt.  Stop.
pi@raspberrypi:~/fluxengine $ sudo apt-get install libfmt-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libfmt-dev is already the newest version (5.2.1+ds-2).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I can't locate a fmt.pc file to place in the PKG_CONFIG_PATH environment variable.

Any pointers would be greatly appreciated.

Cheers, Matt

matt-melbourne avatar Jul 23 '22 20:07 matt-melbourne

Hmm. Could you do dpkg -L libfmt-dev? There should be a line there looking like /usr/lib/x86_64-linux-gnu/pkgconfig/fmt.pc (although different because you're on ARM).

davidgiven avatar Jul 24 '22 15:07 davidgiven

Hi David,

Sure; here you go:

pi@raspberrypi:~/fluxengine $ dpkg -L libfmt-dev
/.
/usr
/usr/include
/usr/include/fmt
/usr/include/fmt/color.h
/usr/include/fmt/core.h
/usr/include/fmt/format-inl.h
/usr/include/fmt/format.h
/usr/include/fmt/ostream.h
/usr/include/fmt/posix.h
/usr/include/fmt/printf.h
/usr/include/fmt/ranges.h
/usr/include/fmt/time.h
/usr/lib
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf/cmake
/usr/lib/arm-linux-gnueabihf/cmake/fmt
/usr/lib/arm-linux-gnueabihf/cmake/fmt/fmt-config-version.cmake
/usr/lib/arm-linux-gnueabihf/cmake/fmt/fmt-config.cmake
/usr/lib/arm-linux-gnueabihf/cmake/fmt/fmt-targets-none.cmake
/usr/lib/arm-linux-gnueabihf/cmake/fmt/fmt-targets.cmake
/usr/lib/arm-linux-gnueabihf/libfmt.a
/usr/share
/usr/share/doc
/usr/share/doc/libfmt-dev
/usr/share/doc/libfmt-dev/README.Debian
/usr/share/doc/libfmt-dev/changelog.Debian.gz
/usr/share/doc/libfmt-dev/changelog.gz
/usr/share/doc/libfmt-dev/copyright

I actually have now compiled this on Ubuntu 20.04, and it was fine, and am happily using fluxengine and Greaseweasel v4, but it would still be good to understand this issue.

matt-melbourne avatar Jul 24 '22 16:07 matt-melbourne

Yeah, your version doesn't have the pkgconfig file in it. Which is wrong.

apt show libfmt-dev, please, and look at the version? Mine is 8.1.1+ds1-2.

davidgiven avatar Jul 24 '22 21:07 davidgiven

My version appears to be older:

pi@raspberrypi:~ $ apt show libfmt-dev
Package: libfmt-dev
Version: 5.2.1+ds-2
Priority: optional
Section: libdevel
Source: fmtlib
Maintainer: Eugene V. Lyubimkin <[email protected]>
Installed-Size: 681 kB
Suggests: libfmt-doc
Conflicts: libcppformat1-dev, libcppformat2-dev, libfmt3-dev
Homepage: http://fmtlib.net/latest/index.html
Download-Size: 124 kB
APT-Manual-Installed: yes
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: fast type-safe C++ formatting library -- development files
 This library provides fast, type-safe, small, C++11-aware replacement of
 (s)printf and related machinery. In some cases it's noticeably faster
 than boost::format, boost::lexical_cast and even sprintf itself.
 .
 This package contains the development files, include the static library.

matt-melbourne avatar Jul 29 '22 23:07 matt-melbourne

In case it's of use to anyone else, I upgraded the Pi to Bullseye, and the libfmt-dev version is later, and has compiled without issue.

pi@raspberrypi:~/fluxengine $ apt show libfmt-dev
Package: libfmt-dev
Version: 7.1.3+ds1-5
Priority: optional
Section: libdevel
Source: fmtlib
Maintainer: Shengjing Zhu <[email protected]>
Installed-Size: 550 kB
Depends: libfmt7 (= 7.1.3+ds1-5)
Suggests: libfmt-doc
Conflicts: libcppformat1-dev, libcppformat2-dev, libfmt3-dev
Breaks: libspdlog1 (<< 1:1.8.1+ds-2.1)
Homepage: https://fmt.dev/
Download-Size: 142 kB
APT-Manual-Installed: yes
APT-Sources: http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
Description: fast type-safe C++ formatting library -- development files
 This library provides fast, type-safe, small, C++11-aware replacement of
 (s)printf and related machinery. In some cases it's noticeably faster
 than boost::format, boost::lexical_cast and even sprintf itself.
 .
 This package contains the development files, include the static library.

matt-melbourne avatar Sep 14 '22 18:09 matt-melbourne

Good to know, thanks.

I'm afraid I'm limited as to just how many different library versions I can support --- I have to pick something which is reasonably sane...

davidgiven avatar Sep 14 '22 22:09 davidgiven