Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
Date: Sun, 09 Dec 2012 23:51:01 -0300	[thread overview]
Message-ID: <50C54E15.1030008@zacarias.com.ar> (raw)
In-Reply-To: <BCF3711885AE41AB966E9545FDB3C8D6@JohanW7>

On 12/09/2012 08:06 PM, Sagaert Johan wrote:

> Hi
>  
> I am using the latest git pull of buildroot.
>  
> Both usb_modeswitch and lsusb fail on execute.
>  
> # lsusb
> Segmentation fault
> # usb_modeswitch
> Segmentation fault
>  
> Can sombody verify this on a real target ?
>  
> (i am using a karo tx53 module running kernel 3.4.21)
>  
> I suspect it has something to do with libusb.

Hi.
I recall a similar problem with earlier (0.9.32ish or less) versions of
uClibc with NPTL, which toolchain are you using?

> Looking at the makefile of usb_modeswitch, it seems to link
> against libusb.so
> It looks this is pointing to libusb-compat-0.1.4
>  
> In the source code of usb_modeswitch there is a line (1896)  saying : 
> ....based on libusb0 (0.1.12 and above ...)
>  
> So something seems to be wrong (libusb-compat-0.1.4 is the latest
> version) , should usb_modeswitch be linked to libusb-1.0.9 instead. ?
>  
> I will try to link against to the other usblib, as soon as my current
> build finishes ...
>  
> I suspect the lsusb problem is similar

There was an older API libusb (libusb-0*) which usb_modeswitch uses, and
there is a newer API libusb (libusb-1*) now.
libusb-compat is a compatibility layer to use the new one (libusb-1*)
with applications that expect the old API without the need for both.
I haven't seen any issues with it rather than the old misbehaving NPTL
threading from older uClibc versions.
And you won't be able to link against libusb-1* without some source code
tweaking.
Regards.

  reply	other threads:[~2012-12-10  2:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-09 23:06 [Buildroot] usb_modeswitch and lsusb yield Segmentation fault Sagaert Johan
2012-12-10  2:51 ` Gustavo Zacarias [this message]
2012-12-10 10:57   ` Sagaert Johan
2012-12-10 10:59     ` Gustavo Zacarias
2012-12-12 15:26       ` Sagaert Johan
2012-12-12 15:29         ` Gustavo Zacarias
2012-12-12 19:44         ` Peter Korsgaard
2012-12-12 23:56           ` Sagaert Johan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C54E15.1030008@zacarias.com.ar \
    --to=gustavo@zacarias.com.ar \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox