* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
@ 2012-12-09 23:06 Sagaert Johan
2012-12-10 2:51 ` Gustavo Zacarias
0 siblings, 1 reply; 8+ messages in thread
From: Sagaert Johan @ 2012-12-09 23:06 UTC (permalink / raw)
To: buildroot
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.
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
Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121210/189e63c6/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
2012-12-09 23:06 [Buildroot] usb_modeswitch and lsusb yield Segmentation fault Sagaert Johan
@ 2012-12-10 2:51 ` Gustavo Zacarias
2012-12-10 10:57 ` Sagaert Johan
0 siblings, 1 reply; 8+ messages in thread
From: Gustavo Zacarias @ 2012-12-10 2:51 UTC (permalink / raw)
To: buildroot
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
2012-12-10 2:51 ` Gustavo Zacarias
@ 2012-12-10 10:57 ` Sagaert Johan
2012-12-10 10:59 ` Gustavo Zacarias
0 siblings, 1 reply; 8+ messages in thread
From: Sagaert Johan @ 2012-12-10 10:57 UTC (permalink / raw)
To: buildroot
Hi
I am using buildroot's internal toolchain gcc 4.6.3 and uClibc 0.9.33.3
and I the pthreads library.
-----Oorspronkelijk bericht-----
Van: Gustavo Zacarias [mailto:gustavo at zacarias.com.ar]
Verzonden: maandag 10 december 2012 3:51
Aan: Sagaert Johan
CC: buildroot at busybox.net
Onderwerp: Re: [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
2012-12-10 10:57 ` Sagaert Johan
@ 2012-12-10 10:59 ` Gustavo Zacarias
2012-12-12 15:26 ` Sagaert Johan
0 siblings, 1 reply; 8+ messages in thread
From: Gustavo Zacarias @ 2012-12-10 10:59 UTC (permalink / raw)
To: buildroot
On 12/10/2012 07:57 AM, Sagaert Johan wrote:
> Hi
>
> I am using buildroot's internal toolchain gcc 4.6.3 and uClibc 0.9.33.3
> and I the pthreads library.
Which threading implementation are you using? linuxthreads, linuxthreads
(stable/old) or Native POSIX Threading (NPTL) ?
NPTL should be the safe bet, i don't know how good/bad the others work
on later versions of uClibc.
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
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
0 siblings, 2 replies; 8+ messages in thread
From: Sagaert Johan @ 2012-12-12 15:26 UTC (permalink / raw)
To: buildroot
Hi
I was using the newer pthreads implementation,
The old/stable pthreads are working for both lsusb (usbutils) and for usb_modeswitch with uClibc 0.9.33
I did not try NTPL since this breaks the build of GDB.
I am not sure about what packages need the newer pthreads and what need the older/stable version.
Regards, Johan
-----Oorspronkelijk bericht-----
Van: Gustavo Zacarias [mailto:gustavo at zacarias.com.ar]
Verzonden: maandag 10 december 2012 11:59
Aan: Sagaert Johan
CC: buildroot at busybox.net
Onderwerp: Re: [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
On 12/10/2012 07:57 AM, Sagaert Johan wrote:
> Hi
>
> I am using buildroot's internal toolchain gcc 4.6.3 and uClibc
> 0.9.33.3 and I the pthreads library.
Which threading implementation are you using? linuxthreads, linuxthreads
(stable/old) or Native POSIX Threading (NPTL) ?
NPTL should be the safe bet, i don't know how good/bad the others work on later versions of uClibc.
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
2012-12-12 15:26 ` Sagaert Johan
@ 2012-12-12 15:29 ` Gustavo Zacarias
2012-12-12 19:44 ` Peter Korsgaard
1 sibling, 0 replies; 8+ messages in thread
From: Gustavo Zacarias @ 2012-12-12 15:29 UTC (permalink / raw)
To: buildroot
On 12/12/2012 12:26 PM, Sagaert Johan wrote:
> Hi
>
> I was using the newer pthreads implementation,
> The old/stable pthreads are working for both lsusb (usbutils) and for usb_modeswitch with uClibc 0.9.33
> I did not try NTPL since this breaks the build of GDB.
>
> I am not sure about what packages need the newer pthreads and what need the older/stable version.
>
> Regards, Johan
Hi again.
Yes, the old/stable ones worked too now that i remember, they're pretty
well tested.
Packages don't depend on anyone in particular, the implementation is
just an uClibc internal thing.
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
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
1 sibling, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2012-12-12 19:44 UTC (permalink / raw)
To: buildroot
>>>>> "Sagaert" == Sagaert Johan <sagaert.johan@skynet.be> writes:
Sagaert> Hi
Sagaert> I was using the newer pthreads implementation,
Sagaert> The old/stable pthreads are working for both lsusb (usbutils) and for usb_modeswitch with uClibc 0.9.33
Sagaert> I did not try NTPL since this breaks the build of GDB.
Really? I don't recall any issues with GDB and NTPL? Could you provide
more details, please?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] usb_modeswitch and lsusb yield Segmentation fault
2012-12-12 19:44 ` Peter Korsgaard
@ 2012-12-12 23:56 ` Sagaert Johan
0 siblings, 0 replies; 8+ messages in thread
From: Sagaert Johan @ 2012-12-12 23:56 UTC (permalink / raw)
To: buildroot
Hi Peter
I tried to reproduce it, but it builds for now with NTPL
I am trying to figure out why I get the segfaults on lsusb (usbutils) and usb_modeswitch.
(I need usb_modeswitch to use an HSPDA USB stick as network device)
When I select old/stable uClibc 0.9.33.2, then QT is not building....
I remember I have seen this 'pthread_getattr_np' was not declared in the past, and I am not sure about how this was fixed.
snip
../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp:722:42: error: 'pthread_getattr_np' was not declared in this scope
../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h: In member function 'T* QTWTF::VectorBuffer<T,
inlineCapacity>::inlineBuffer() [with T = QTWTF::Vector<QTJSC::Identifier, 64u>*, unsigned int inlineCapacity = 32u]':
../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:415:17: instantiated from 'void QTWTF::VectorBuffer<T,
inlineCapacity>::allocateBuffer(size_t) [with T = QTWTF::Vector<QTJSC::Identifier, 64u>*, unsigned int inlineCapacity = 32u, size_t
= unsigned int]'
../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:808:9: instantiated from 'void QTWTF::Vector<T,
inlineCapacity>::reserveCapacity(size_t) [with T = QTWTF::Vector<QTJSC::Identifier, 64u>*, unsigned int inlineCapacity = 32u, size_t
= unsigned int]'
../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:745:9: instantiated from 'void QTWTF::Vector<T,
inlineCapacity>::expandCapacity(size_t) [with T = QTWTF::Vector<QTJSC::Identifier, 64u>*, unsigned int inlineCapacity = 32u, size_t
= unsigned int]'
Snip
I will try a full build again with NPTL to see if this build gets through the end...
Time for a good night sleep now...while the build runs
Johan
-----Oorspronkelijk bericht-----
Van: Peter Korsgaard [mailto:jacmet at gmail.com] Namens Peter Korsgaard
Verzonden: woensdag 12 december 2012 20:44
Aan: Sagaert Johan
CC: 'Gustavo Zacarias'; buildroot at busybox.net
Onderwerp: Re: usb_modeswitch and lsusb yield Segmentation fault
>>>>> "Sagaert" == Sagaert Johan <sagaert.johan@skynet.be> writes:
Sagaert> Hi
Sagaert> I was using the newer pthreads implementation, Sagaert> The old/stable pthreads are working for both lsusb (usbutils) and
for usb_modeswitch with uClibc 0.9.33 Sagaert> I did not try NTPL since this breaks the build of GDB.
Really? I don't recall any issues with GDB and NTPL? Could you provide more details, please?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-12-12 23:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-09 23:06 [Buildroot] usb_modeswitch and lsusb yield Segmentation fault Sagaert Johan
2012-12-10 2:51 ` Gustavo Zacarias
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox