On Tue, Jul 17, 2012 at 9:37 PM, Wander Lairson Costa
<wander.lair...@gmail.com> wrote:
> 2012/7/17 Xiaofan Chen <xiaof...@gmail.com>:
>> 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

It seems to me that find_library should work, please refer to the
following run log under NetBSD. But I am not so sure why the
"No Backend available" happens under NetBSD.

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
>>> from ctypes import CDLL
>>> c=CDLL('libusb-1.0.so')
>>> c
<CDLL 'libusb-1.0.so', handle bbbef400 at bb645ecc>
>>> c.libusb_init(None)
0



-- 
Xiaofan

------------------------------------------------------------------------------
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