2012/7/17 Xiaofan Chen <xiaof...@gmail.com>:
> On Tue, Jul 17, 2012 at 6:31 PM, Wander Lairson Costa
> <wander.lair...@gmail.com> wrote:
>> 2012/7/16 Xiaofan Chen <xiaof...@gmail.com>:
>>> Now that NetBSD and OpenBSD also have libusb-1.0/libusbx
>>> support along with the legacy libusb-0.1 support. So I would like
>>> to try out pyusb under NetBSD/OpenBSD as well.
>>>
>>> Under NetBSD 5.1.2 release, it seems to me that pyusb can not
>>> find the backends. I think this is because the libusb-0.1 and
>>> libusb-1.0 libraries are under /usr/pkg (pkgsrc system).
>>>
>> Does the compiler can find the path to the library without pkg-config?
>> Because PyUSB uses ctypes find_library function, which will search in
>> system configured paths... Is there some kind of ld.so.conf under
>> NetBSD to confirm that?
>>
>
> I tried two methods configure the library paths but it still
> does not work.
> Ref: http://www.netbsd.org/docs/elf.html
> Ref: http://www.postgresql.org/docs/9.1/static/install-post.html
>
> But I think NetBSD support can be later.
>
> localhost$ /sbin/ldconfig -m /usr/pkg/lib
>
> localhost$ ldconfig -r
> /var/run/ld.so.hints:
>         search directories: /usr/pkg/lib
>
> localhost$ nano /etc/ld.so.conf
>
> localhost$ cat /etc/ld.so.conf
> /usr/pkg/lib
>
>
> localhost$ python2.7
> Python 2.7.2 (default, Nov 13 2011, 10:50:29)
> [GCC 4.1.3 20080704 prerelease (NetBSD nb2 20081120)] on netbsd5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import usb.core
>>>> import usb.util
>>>> dev=usb.core.find(idVendor=0x04d8)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/pkg/lib/python2.7/site-packages/usb/core.py", line 856, in find
>     raise ValueError('No backend available')
> ValueError: No backend available
>>>> exit()
>

It feels like some problem with find_library. I gave a look at the
code and it does not have any particular case for NetBSD. However,
according to [1] it should work if gcc is installed.

[1] http://bugs.python.org/issue1610795

-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to