[Nut-upsuser] UPS/NUT with openSUSE 13.1

Tim Dawson tadawson at tpcsvc.com
Tue Sep 22 19:55:35 UTC 2015

Rob -
Just stepping in from the sidelines . . . with a few tidbits.

Nut uses pkgconfig to find and identify stuff as part of it's build . . 
. So, depending on where your libusb install went, if it wasn't in the 
default "PKG_CONFIG_PATH" setting, it won't be found.  Much like other 
shell variables, you can adjust that setting to find anything you like . 
. .
IE PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/new/component;export 
PKG_CONFIG_PATH (or as appropriate for the shell you use).

Keep in mind that this is *NOT* the path where the library (.so or .a 
file) lives, but typically a directory *below* that with the pkgconfig 
.pc files, typically "pkgconfig".  These .pc files tell the build system 
what is available, and what version they are, so for libusb on my system 
here libusb.pc (located in /usr/lib, PKG_CONFIG_DIR is 
/usr/lib/pkgconfig) is:


Name: libusb
Description: USB access library
Version: 0.1.12
Libs: -L${libdir} -lusb
Cflags: -I${includedir}

This may help make sense of what version report, and how stuff gets 
found.  Then again, if you already know this, sorry . . .

- Tim

On 09/22/2015 02:47 PM, Rob Groner wrote:
> Thanks Charles, you were right about that.
> Here is what I tried...I installed openSUSE 13.1 from scratch (which means no libusb).  I then took libusb-1.0 from the sourceforge site and built and installed it.  Still it got the "cannot find libusb" error.  So, looking at the sourceforge site, is see it mention that to work with the older libusb-0.1, you had to use libusb-compat-0.1.5.  So, I downloaded, built, and installed that...and now ./configure is working.
> I'm sure this is all obvious to you, but I only now sort of understand the relationship between libusb-1.0 and libusb-0.1.
> So, here is what I think I know:
> NUT is using the libusb-1.0.20 library, by way of the libusb-compat layer.  When I check the configure log, it says "libusb-0.1.12"  I'm not sure why it says that, as in where it gets that value, as that version doesn't correspond to anything I installed.  I see looking at the last version of libusb-0.1 that was available, it was libusb-0.1.12, so it must be getting that version number from the libusb-compat layer, as I did not install the old libusb-0.1.12 on this last test.
> After installing libusb-1.0 and the libusb-compat layer and rebuilding NUT...it still doesn't work (as in, the shutdown command is not passed to the UPS due to can't claim message for USB).
> I could try reinstalling openSUSE and installing the old libusb-0.1.12 and see if that works.  Perhaps it is the compat layer or the new libusb-1.0 that is the problem.
> Rob Groner
> Software Engineer Level II
> RTD Embedded Technologies, Inc.
> ISO 9001 and AS9100 Certified
> Ph: +1 814-234-8087
> www.rtd.com
> -----Original Message-----
> From: Charles Lepple [mailto:clepple at gmail.com]
> Sent: Monday, September 21, 2015 7:30 PM
> To: Rob Groner <rgroner at RTD.com>
> Cc: Roger Price <roger at rogerprice.org>; nut-upsuser Mailing List <nut-upsuser at lists.alioth.debian.org>
> Subject: Re: [Nut-upsuser] UPS/NUT with openSUSE 13.1
> On Sep 21, 2015, at 9:39 AM, Rob Groner <rgroner at RTD.com> wrote:
>> I didn't think to look for a log (attached), but now looking in it, I don't see anything more than I already thought I knew.  It's as cryptic as configure itself.
>> It does reference the line in the configure where the test for USB failed, but I'd already been looking in there.  I can't make sense of the lines above that set "nut_have_libusb", as far as what they're looking for.  Clearly somehow, that is supposed to be set to "yes".
> You have:
> ./configure --with-usb --with-dev --with-usb-includes=/usr/local/include --with-usb-libs=-L=/usr/local/lib64
> I think you want:
> ./configure --with-usb --with-dev --with-usb-includes=-I/usr/local/include --with-usb-libs=-L/usr/local/lib64
> The key lines in the compilation testing:
> configure:8062: gcc -o conftest /usr/local/include   conftest.c -L=/usr/local/lib64 >&5
> /usr/local/include: file not recognized: Is a directory
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Tim Dawson (tadawson at tpcsvc.com)                    Owner/Engineer
TPC Services                                        Bellnet: (972)-221-7385
Lewisville, Texas 75067
"Gaff Tape can't fix 'Stupid', but it can muffle the sound..."

More information about the Nut-upsuser mailing list