-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Fix (re-)detection of libmodbus RTU USB support with static libmodbus builds #2677
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…better with NUT_REPORT_FEATURE, NUT_REPORT_DRIVER, NUT_REPORT_PROGRAM [networkupstools#2676] Signed-off-by: Jim Klimov <[email protected]>
…nutils (for ldd) [networkupstools#2673] Signed-off-by: Jim Klimov <[email protected]>
…usb adding its CFLAGS and LIBS into the loop [networkupstools#2666] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…le libmodbus [networkupstools#2666] Signed-off-by: Jim Klimov <[email protected]>
…bmodbus was used to build this driver [networkupstools#2666] Signed-off-by: Jim Klimov <[email protected]>
…ls#2666] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added
enhancement
documentation
APC
USB
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
modbus
portability
We want NUT to build and run everywhere possible
impacts-release-2.8.2
Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)
labels
Nov 12, 2024
…th-modbus+usb=yes and fix a typo checking --with-drivers there [networkupstools#2666] Signed-off-by: Jim Klimov <[email protected]>
…AME [networkupstools#2666] Signed-off-by: Jim Klimov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
APC
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
documentation
enhancement
impacts-release-2.8.2
Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)
modbus
portability
We want NUT to build and run everywhere possible
USB
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
...and allow users to require
configure --with-modbus+usb
to avoid surprises with a wrong choice of the library.Should help with investigation for #2666 and fixes a bug detected in that discussion.
Also revise configuration script report.
Closes: #2676
Example runs with failsafe firing (where the OS has a packaged standard shared libmodbus; a custom static build with USB support is installed into
--prefix=/tmp
)NEGATIVE CASES
apc_modbus
andlibusb
amongconfigure
options (and still use OS-provided library):libmodbus
andlibusb
, but passing--with-modbus-includes
and/or--with-modbus-libs
for a build that is not USB-capable (done here via bad location of--with-modbus-libs
):These all end with:
POSITIVE CASES
libmodbus
andlibusb
, explicitly passing correct--with-modbus-includes
and--with-modbus-libs
for a build that is USB-capable:apc_modbus
driver ANDlibusb
, explicitly passing correct--with-modbus-includes
and--with-modbus-libs
for a build that is USB-capable:--with-modbus-includes
and--with-modbus-libs
for a build that is USB-capable:The resulting driver build reports its USB-capability early in debug log now (see second
[D1]
line) as well as viaDRIVER_NAME
seen in banner and protocol (upsc
etc.):NEUTRAL CASES
The
apc_modbus
driver is build using OS packaged libmodbus, without USB support, without aborting NUT build (common packaging).apc_modbus
driver but not explicitly requestinglibusb
:libusb
andlibmodbus
but without custom options for the latter (nor the specific driver):