Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build mbpoll on Rocky Linux 9.4 #91

Open
snowuyl opened this issue Nov 19, 2024 · 2 comments
Open

Failed to build mbpoll on Rocky Linux 9.4 #91

snowuyl opened this issue Nov 19, 2024 · 2 comments

Comments

@snowuyl
Copy link

snowuyl commented Nov 19, 2024

git clone https://github.com/stephane/libmodbus.git
cd libmodbus
./autogen.sh
./configure
make
sudo make install
cd ..
https://github.com/epsilonrt/mbpoll
cd mbpoll
mkdir build
cd build
cmake ..
Last metadata expiration check: 4:40:42 ago on Tue 19 Nov 2024 08:48:53 AM CST.
No match for argument: libmodbus-dev
Error: Unable to find a match: libmodbus-dev
mkdir: cannot create directory ‘build’: File exists
-- Checking for module 'libmodbus>=3.1.4'
-- Package 'libmodbus', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:607 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
CMakeLists.txt:61 (pkg_check_modules)

-- Configuring incomplete, errors occurred!

@r00t-
Copy link

r00t- commented Jan 8, 2025

your distribution (i have never heard of "Rocky Linux") seems to contain some (broken) logic that tries to automatically install dependencies.
it generates an invalid package name, and fails.
you should report this at your distribution.
(this output is obviously from the apk package manager, executing apk add libmodbus-dev, which would not normally happen during a build.)

Last metadata expiration check: 4:40:42 ago on Tue 19 Nov 2024 08:48:53 AM CST.
No match for argument: libmodbus-dev
Error: Unable to find a match: libmodbus-dev
mkdir: cannot create directory ‘build’: File exists
-- Checking for module 'libmodbus>=3.1.4'
-- Package 'libmodbus', required by 'virtual:world', not found

@r00t-
Copy link

r00t- commented Jan 8, 2025

as to why it's not finding the libmodbus you installed,
you gave only very little details.
make install for libmodus should have installed libmodbus.pc to /usr/lib/pkgconfig/ or similar.
you should check if that file is there,
and check if pkg-config --cflags libmodbus works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants