U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sandbox: solve undefined reference to pthread_kill symbol
@ 2025-06-03 15:13 Raymond Mao
  2025-06-03 15:47 ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Raymond Mao @ 2025-06-03 15:13 UTC (permalink / raw)
  To: u-boot
  Cc: Raymond Mao, Tom Rini, Simon Glass, Heinrich Schuchardt,
	Ilias Apalodimas, Marek Vasut, Peter Robinson, Jerome Forissier,
	Richard Henderson, Adriano Cordova, Michal Simek, Casey Connolly,
	Sughosh Ganu, Rasmus Villemoes, Jonathan Humphreys, Sam Edwards,
	Prasad Kummari

This patch is to solve the sandbox building error:
$ make O=build-sandbox -s sandbox_defconfig
$ make O=build-sandbox -s -j2
/usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[...]

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
---
 arch/sandbox/config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index dd9b7473fa9..9a61e803a57 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -3,7 +3,7 @@
 
 PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
 PLATFORM_CPPFLAGS += -fPIC -ffunction-sections -fdata-sections
-PLATFORM_LIBS += -lrt
+PLATFORM_LIBS += -lrt -lpthread
 SDL_CONFIG ?= sdl2-config
 
 # Define this to avoid linking with SDL, which requires SDL libraries
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-03 15:13 [PATCH] sandbox: solve undefined reference to pthread_kill symbol Raymond Mao
@ 2025-06-03 15:47 ` Tom Rini
  2025-06-03 18:00   ` Raymond Mao
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2025-06-03 15:47 UTC (permalink / raw)
  To: Raymond Mao
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:

> This patch is to solve the sandbox building error:
> $ make O=build-sandbox -s sandbox_defconfig
> $ make O=build-sandbox -s -j2
> /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> [...]
> 
> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> ---
>  arch/sandbox/config.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

OK, but how do you get this failure to start with? What host?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-03 15:47 ` Tom Rini
@ 2025-06-03 18:00   ` Raymond Mao
  2025-06-03 19:23     ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Raymond Mao @ 2025-06-03 18:00 UTC (permalink / raw)
  To: Tom Rini
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

Hi Tom,

On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
>
> On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
>
> > This patch is to solve the sandbox building error:
> > $ make O=build-sandbox -s sandbox_defconfig
> > $ make O=build-sandbox -s -j2
> > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> > collect2: error: ld returned 1 exit status
> > [...]
> >
> > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> > ---
> >  arch/sandbox/config.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> OK, but how do you get this failure to start with? What host?
It failed when I started any sandbox unit test like:
./test/py/test.py --bd sandbox --build -k <any_test>
My local host: Ubuntu v20.04, x86_64

Regards,
Raymond

>
> --
> Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-03 18:00   ` Raymond Mao
@ 2025-06-03 19:23     ` Tom Rini
  2025-06-03 21:00       ` Raymond Mao
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2025-06-03 19:23 UTC (permalink / raw)
  To: Raymond Mao
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
> Hi Tom,
> 
> On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
> >
> > > This patch is to solve the sandbox building error:
> > > $ make O=build-sandbox -s sandbox_defconfig
> > > $ make O=build-sandbox -s -j2
> > > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> > > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> > > collect2: error: ld returned 1 exit status
> > > [...]
> > >
> > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> > > ---
> > >  arch/sandbox/config.mk | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > OK, but how do you get this failure to start with? What host?
> It failed when I started any sandbox unit test like:
> ./test/py/test.py --bd sandbox --build -k <any_test>
> My local host: Ubuntu v20.04, x86_64

We don't see that normally, is there something odd about your compilers?
This is the kind of thing which should be failing everywhere, but isn't.
Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-03 19:23     ` Tom Rini
@ 2025-06-03 21:00       ` Raymond Mao
  2025-06-04 10:03         ` Anshul Dalal
  0 siblings, 1 reply; 10+ messages in thread
From: Raymond Mao @ 2025-06-03 21:00 UTC (permalink / raw)
  To: Tom Rini
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

Hi Tom,

On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
>
> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
> > Hi Tom,
> >
> > On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
> > >
> > > > This patch is to solve the sandbox building error:
> > > > $ make O=build-sandbox -s sandbox_defconfig
> > > > $ make O=build-sandbox -s -j2
> > > > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> > > > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> > > > collect2: error: ld returned 1 exit status
> > > > [...]
> > > >
> > > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> > > > ---
> > > >  arch/sandbox/config.mk | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > OK, but how do you get this failure to start with? What host?
> > It failed when I started any sandbox unit test like:
> > ./test/py/test.py --bd sandbox --build -k <any_test>
> > My local host: Ubuntu v20.04, x86_64
>
> We don't see that normally, is there something odd about your compilers?
> This is the kind of thing which should be failing everywhere, but isn't.
> Thanks.
>
This failure occured in my host since v2025.07-rc1, but with the same
host, same setup and same instructions it worked fine in v2025.04-rc5.
Seems that some impacts were introduced during v2025.04-rc5 ~
v2025.07-rc1, which might be worth investigating.

Regards,
Raymond

> --
> Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-03 21:00       ` Raymond Mao
@ 2025-06-04 10:03         ` Anshul Dalal
  2025-06-04 13:56           ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Anshul Dalal @ 2025-06-04 10:03 UTC (permalink / raw)
  To: Raymond Mao, Tom Rini
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

Hi Raymond,

On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote:
> Hi Tom,
>
> On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
>>
>> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
>> > Hi Tom,
>> >
>> > On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
>> > >
>> > > On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
>> > >
>> > > > This patch is to solve the sandbox building error:
>> > > > $ make O=build-sandbox -s sandbox_defconfig
>> > > > $ make O=build-sandbox -s -j2
>> > > > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
>> > > > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
>> > > > collect2: error: ld returned 1 exit status
>> > > > [...]
>> > > >
>> > > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
>> > > > ---
>> > > >  arch/sandbox/config.mk | 2 +-
>> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > >
>> > > OK, but how do you get this failure to start with? What host?
>> > It failed when I started any sandbox unit test like:
>> > ./test/py/test.py --bd sandbox --build -k <any_test>
>> > My local host: Ubuntu v20.04, x86_64
>>
>> We don't see that normally, is there something odd about your compilers?
>> This is the kind of thing which should be failing everywhere, but isn't.
>> Thanks.
>>
> This failure occured in my host since v2025.07-rc1, but with the same
> host, same setup and same instructions it worked fine in v2025.04-rc5.
> Seems that some impacts were introduced during v2025.04-rc5 ~
> v2025.07-rc1, which might be worth investigating.
>

I am unable to reproduce the issue on gcc 15.1.1 and glibc 2.41. I think
the issue is likely on your host end.  What compiler and libc are you
using for the build?

Regards,
Anshul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-04 10:03         ` Anshul Dalal
@ 2025-06-04 13:56           ` Tom Rini
  2025-06-04 15:03             ` Patrice CHOTARD
  2025-06-04 15:37             ` Raymond Mao
  0 siblings, 2 replies; 10+ messages in thread
From: Tom Rini @ 2025-06-04 13:56 UTC (permalink / raw)
  To: Anshul Dalal, Raymond Mao
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari

[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]

On Wed, Jun 04, 2025 at 03:33:31PM +0530, Anshul Dalal wrote:
> Hi Raymond,
> 
> On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote:
> > Hi Tom,
> >
> > On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
> >>
> >> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
> >> > Hi Tom,
> >> >
> >> > On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
> >> > >
> >> > > On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
> >> > >
> >> > > > This patch is to solve the sandbox building error:
> >> > > > $ make O=build-sandbox -s sandbox_defconfig
> >> > > > $ make O=build-sandbox -s -j2
> >> > > > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> >> > > > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> >> > > > collect2: error: ld returned 1 exit status
> >> > > > [...]
> >> > > >
> >> > > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> >> > > > ---
> >> > > >  arch/sandbox/config.mk | 2 +-
> >> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> > >
> >> > > OK, but how do you get this failure to start with? What host?
> >> > It failed when I started any sandbox unit test like:
> >> > ./test/py/test.py --bd sandbox --build -k <any_test>
> >> > My local host: Ubuntu v20.04, x86_64
> >>
> >> We don't see that normally, is there something odd about your compilers?
> >> This is the kind of thing which should be failing everywhere, but isn't.
> >> Thanks.
> >>
> > This failure occured in my host since v2025.07-rc1, but with the same
> > host, same setup and same instructions it worked fine in v2025.04-rc5.
> > Seems that some impacts were introduced during v2025.04-rc5 ~
> > v2025.07-rc1, which might be worth investigating.
> >
> 
> I am unable to reproduce the issue on gcc 15.1.1 and glibc 2.41. I think
> the issue is likely on your host end.  What compiler and libc are you
> using for the build?

This feels like if it's generic, CI should be blowing up too, even if
it's Ubuntu 22.04 not 20.04 these days. Please bisect down to the
failure, since you have known good/bad commits and 'git bisect run' can
use the test case you have.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-04 13:56           ` Tom Rini
@ 2025-06-04 15:03             ` Patrice CHOTARD
  2025-06-04 15:12               ` Tom Rini
  2025-06-04 15:37             ` Raymond Mao
  1 sibling, 1 reply; 10+ messages in thread
From: Patrice CHOTARD @ 2025-06-04 15:03 UTC (permalink / raw)
  To: Tom Rini, Anshul Dalal, Raymond Mao
  Cc: u-boot, Simon Glass, Heinrich Schuchardt, Ilias Apalodimas,
	Marek Vasut, Peter Robinson, Jerome Forissier, Richard Henderson,
	Adriano Cordova, Michal Simek, Casey Connolly, Sughosh Ganu,
	Rasmus Villemoes, Jonathan Humphreys, Sam Edwards, Prasad Kummari



On 6/4/25 15:56, Tom Rini wrote:
> On Wed, Jun 04, 2025 at 03:33:31PM +0530, Anshul Dalal wrote:
>> Hi Raymond,
>>
>> On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote:
>>> Hi Tom,
>>>
>>> On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
>>>>
>>>> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
>>>>> Hi Tom,
>>>>>
>>>>> On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
>>>>>>
>>>>>> On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
>>>>>>
>>>>>>> This patch is to solve the sandbox building error:
>>>>>>> $ make O=build-sandbox -s sandbox_defconfig
>>>>>>> $ make O=build-sandbox -s -j2
>>>>>>> /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
>>>>>>> /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
>>>>>>> collect2: error: ld returned 1 exit status
>>>>>>> [...]
>>>>>>>
>>>>>>> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
>>>>>>> ---
>>>>>>>  arch/sandbox/config.mk | 2 +-
>>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> OK, but how do you get this failure to start with? What host?
>>>>> It failed when I started any sandbox unit test like:
>>>>> ./test/py/test.py --bd sandbox --build -k <any_test>
>>>>> My local host: Ubuntu v20.04, x86_64
>>>>
>>>> We don't see that normally, is there something odd about your compilers?
>>>> This is the kind of thing which should be failing everywhere, but isn't.
>>>> Thanks.
>>>>
>>> This failure occured in my host since v2025.07-rc1, but with the same
>>> host, same setup and same instructions it worked fine in v2025.04-rc5.
>>> Seems that some impacts were introduced during v2025.04-rc5 ~
>>> v2025.07-rc1, which might be worth investigating.
>>>
>>
>> I am unable to reproduce the issue on gcc 15.1.1 and glibc 2.41. I think
>> the issue is likely on your host end.  What compiler and libc are you
>> using for the build?
> 
> This feels like if it's generic, CI should be blowing up too, even if
> it's Ubuntu 22.04 not 20.04 these days. Please bisect down to the
> failure, since you have known good/bad commits and 'git bisect run' can
> use the test case you have.
> 
Hi 

I got exactly the same issue on my Ubuntu 20.04 when trying to compile sandbox.
b989f9ed9fe1 ("test: lib: add initjmp() test") is the the commit which is causing this issue.

Until now, i am still using the default gcc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0.

Thanks
Patrice


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-04 15:03             ` Patrice CHOTARD
@ 2025-06-04 15:12               ` Tom Rini
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2025-06-04 15:12 UTC (permalink / raw)
  To: Patrice CHOTARD, Raymond Mao
  Cc: Anshul Dalal, u-boot, Simon Glass, Heinrich Schuchardt,
	Ilias Apalodimas, Marek Vasut, Peter Robinson, Jerome Forissier,
	Richard Henderson, Adriano Cordova, Michal Simek, Casey Connolly,
	Sughosh Ganu, Rasmus Villemoes, Jonathan Humphreys, Sam Edwards,
	Prasad Kummari

[-- Attachment #1: Type: text/plain, Size: 2869 bytes --]

On Wed, Jun 04, 2025 at 05:03:44PM +0200, Patrice CHOTARD wrote:
> 
> 
> On 6/4/25 15:56, Tom Rini wrote:
> > On Wed, Jun 04, 2025 at 03:33:31PM +0530, Anshul Dalal wrote:
> >> Hi Raymond,
> >>
> >> On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote:
> >>> Hi Tom,
> >>>
> >>> On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
> >>>>
> >>>> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
> >>>>> Hi Tom,
> >>>>>
> >>>>> On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
> >>>>>>
> >>>>>> On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
> >>>>>>
> >>>>>>> This patch is to solve the sandbox building error:
> >>>>>>> $ make O=build-sandbox -s sandbox_defconfig
> >>>>>>> $ make O=build-sandbox -s -j2
> >>>>>>> /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> >>>>>>> /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> >>>>>>> collect2: error: ld returned 1 exit status
> >>>>>>> [...]
> >>>>>>>
> >>>>>>> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> >>>>>>> ---
> >>>>>>>  arch/sandbox/config.mk | 2 +-
> >>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>>
> >>>>>> OK, but how do you get this failure to start with? What host?
> >>>>> It failed when I started any sandbox unit test like:
> >>>>> ./test/py/test.py --bd sandbox --build -k <any_test>
> >>>>> My local host: Ubuntu v20.04, x86_64
> >>>>
> >>>> We don't see that normally, is there something odd about your compilers?
> >>>> This is the kind of thing which should be failing everywhere, but isn't.
> >>>> Thanks.
> >>>>
> >>> This failure occured in my host since v2025.07-rc1, but with the same
> >>> host, same setup and same instructions it worked fine in v2025.04-rc5.
> >>> Seems that some impacts were introduced during v2025.04-rc5 ~
> >>> v2025.07-rc1, which might be worth investigating.
> >>>
> >>
> >> I am unable to reproduce the issue on gcc 15.1.1 and glibc 2.41. I think
> >> the issue is likely on your host end.  What compiler and libc are you
> >> using for the build?
> > 
> > This feels like if it's generic, CI should be blowing up too, even if
> > it's Ubuntu 22.04 not 20.04 these days. Please bisect down to the
> > failure, since you have known good/bad commits and 'git bisect run' can
> > use the test case you have.
> > 
> Hi 
> 
> I got exactly the same issue on my Ubuntu 20.04 when trying to compile sandbox.
> b989f9ed9fe1 ("test: lib: add initjmp() test") is the the commit which is causing this issue.
> 
> Until now, i am still using the default gcc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0.

Ah, OK, thanks. Lets reword the commit message, add a fixes tag and
throw it through CI please, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] sandbox: solve undefined reference to pthread_kill symbol
  2025-06-04 13:56           ` Tom Rini
  2025-06-04 15:03             ` Patrice CHOTARD
@ 2025-06-04 15:37             ` Raymond Mao
  1 sibling, 0 replies; 10+ messages in thread
From: Raymond Mao @ 2025-06-04 15:37 UTC (permalink / raw)
  To: Tom Rini
  Cc: Anshul Dalal, u-boot, Simon Glass, Heinrich Schuchardt,
	Ilias Apalodimas, Marek Vasut, Peter Robinson, Jerome Forissier,
	Richard Henderson, Adriano Cordova, Michal Simek, Casey Connolly,
	Sughosh Ganu, Rasmus Villemoes, Jonathan Humphreys, Sam Edwards,
	Prasad Kummari

Hi Tom,

On Wed, 4 Jun 2025 at 09:56, Tom Rini <trini@konsulko.com> wrote:
>
> On Wed, Jun 04, 2025 at 03:33:31PM +0530, Anshul Dalal wrote:
> > Hi Raymond,
> >
> > On Wed Jun 4, 2025 at 2:30 AM IST, Raymond Mao wrote:
> > > Hi Tom,
> > >
> > > On Tue, 3 Jun 2025 at 15:23, Tom Rini <trini@konsulko.com> wrote:
> > >>
> > >> On Tue, Jun 03, 2025 at 02:00:23PM -0400, Raymond Mao wrote:
> > >> > Hi Tom,
> > >> >
> > >> > On Tue, 3 Jun 2025 at 11:47, Tom Rini <trini@konsulko.com> wrote:
> > >> > >
> > >> > > On Tue, Jun 03, 2025 at 08:13:58AM -0700, Raymond Mao wrote:
> > >> > >
> > >> > > > This patch is to solve the sandbox building error:
> > >> > > > $ make O=build-sandbox -s sandbox_defconfig
> > >> > > > $ make O=build-sandbox -s -j2
> > >> > > > /usr/bin/ld: /tmp/u-boot.27rzOu.ltrans58.ltrans.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
> > >> > > > /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
> > >> > > > collect2: error: ld returned 1 exit status
> > >> > > > [...]
> > >> > > >
> > >> > > > Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> > >> > > > ---
> > >> > > >  arch/sandbox/config.mk | 2 +-
> > >> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >> > >
> > >> > > OK, but how do you get this failure to start with? What host?
> > >> > It failed when I started any sandbox unit test like:
> > >> > ./test/py/test.py --bd sandbox --build -k <any_test>
> > >> > My local host: Ubuntu v20.04, x86_64
> > >>
> > >> We don't see that normally, is there something odd about your compilers?
> > >> This is the kind of thing which should be failing everywhere, but isn't.
> > >> Thanks.
> > >>
> > > This failure occured in my host since v2025.07-rc1, but with the same
> > > host, same setup and same instructions it worked fine in v2025.04-rc5.
> > > Seems that some impacts were introduced during v2025.04-rc5 ~
> > > v2025.07-rc1, which might be worth investigating.
> > >
> >
> > I am unable to reproduce the issue on gcc 15.1.1 and glibc 2.41. I think
> > the issue is likely on your host end.  What compiler and libc are you
> > using for the build?
>
> This feels like if it's generic, CI should be blowing up too, even if
> it's Ubuntu 22.04 not 20.04 these days. Please bisect down to the
> failure, since you have known good/bad commits and 'git bisect run' can
> use the test case you have.
>

By running 'git bisect run' I got this:
b989f9ed9fe13be2cb168d2d45c235f011104f38 is the first bad commit

Regards,
Raymond


> --
> Tom

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-04 15:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 15:13 [PATCH] sandbox: solve undefined reference to pthread_kill symbol Raymond Mao
2025-06-03 15:47 ` Tom Rini
2025-06-03 18:00   ` Raymond Mao
2025-06-03 19:23     ` Tom Rini
2025-06-03 21:00       ` Raymond Mao
2025-06-04 10:03         ` Anshul Dalal
2025-06-04 13:56           ` Tom Rini
2025-06-04 15:03             ` Patrice CHOTARD
2025-06-04 15:12               ` Tom Rini
2025-06-04 15:37             ` Raymond Mao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox