public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* glibc: nptl/tst-cancel17 and librt issue
@ 2017-11-21 21:27 Vineet Gupta
  2017-11-21 21:40 ` Zack Weinberg
  2017-11-21 22:04 ` Andreas Schwab
  0 siblings, 2 replies; 8+ messages in thread
From: Vineet Gupta @ 2017-11-21 21:27 UTC (permalink / raw)
  To: libc-alpha; +Cc: arcml

Hi,

I've been trying to run glibc test suite as part of prereq for ARC port 
submission, running into some landmines.

make subdirs=nptl check fails as librt.so fails to link due to missing pthread 
symbols. The real librt built does have libpthread.so in its link cmd hence is 
fine, but not this librt.

This issue is seen for aarc64 cross builds too.

make -k doesn't cure it and check stops midway anyways.

Any tips on how to fix those. I'm still trying to come to grips with glibc build 
system

TIA,
-Vineet

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 21:27 glibc: nptl/tst-cancel17 and librt issue Vineet Gupta
@ 2017-11-21 21:40 ` Zack Weinberg
  2017-11-21 21:48   ` Vineet Gupta
  2017-11-21 22:04 ` Andreas Schwab
  1 sibling, 1 reply; 8+ messages in thread
From: Zack Weinberg @ 2017-11-21 21:40 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: GNU C Library, arcml

On Tue, Nov 21, 2017 at 4:25 PM, Vineet Gupta
<Vineet.Gupta1@synopsys.com> wrote:
> Hi,
>
> I've been trying to run glibc test suite as part of prereq for ARC port
> submission, running into some landmines.
>
> make subdirs=nptl check fails as librt.so fails to link due to missing
> pthread symbols. The real librt built does have libpthread.so in its link
> cmd hence is fine, but not this librt.

I've tripped over this myself but only when trying to do an
incremental rebuild under conditions where an incremental build won't
work.  I do not know what those conditions are: I only know that
blowing away the build tree and starting over from scratch has, until
now, cured the problem.

Are you seeing this in a build from scratch, not overriding subdirs?

zw

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 21:40 ` Zack Weinberg
@ 2017-11-21 21:48   ` Vineet Gupta
  2017-11-21 22:33     ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: Vineet Gupta @ 2017-11-21 21:48 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: GNU C Library, arcml

On 11/21/2017 01:40 PM, Zack Weinberg wrote:
> On Tue, Nov 21, 2017 at 4:25 PM, Vineet Gupta
>>
>> make subdirs=nptl check fails as librt.so fails to link due to missing
>> pthread symbols. The real librt built does have libpthread.so in its link
>> cmd hence is fine, but not this librt.
> 
> I've tripped over this myself but only when trying to do an
> incremental rebuild under conditions where an incremental build won't
> work.  I do not know what those conditions are: I only know that
> blowing away the build tree and starting over from scratch has, until
> now, cured the problem.
> 
> Are you seeing this in a build from scratch, not overriding subdirs?

This is a rebuild for make check. So I have a cross compilation setup using 
builroot (to include my glibc branch from github etc). After the toolchain builds, 
I go to  build/glibc/build and do make check, (doing with subdirs=nptl is same)

But I know exactly what the problem is: libpthread.so is not present in the link 
cmd for build/nptl/librt.so. I just don't know hoe to coax the build system to 
include it (apparently that happens for the canonical rt/librt.so)

-Vineet

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 21:27 glibc: nptl/tst-cancel17 and librt issue Vineet Gupta
  2017-11-21 21:40 ` Zack Weinberg
@ 2017-11-21 22:04 ` Andreas Schwab
  2017-11-21 22:08   ` Vineet Gupta
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2017-11-21 22:04 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: libc-alpha, arcml

On Nov 21 2017, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> make subdirs=nptl check fails as librt.so fails to link due to missing
> pthread symbols. The real librt built does have libpthread.so in its link
> cmd hence is fine, but not this librt.

Don't do that then.  If you want to take shortcuts you need to know what
you are doing.  Before running make check you should make all to have
everything up-to-date.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 22:04 ` Andreas Schwab
@ 2017-11-21 22:08   ` Vineet Gupta
  2017-11-21 22:29     ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: Vineet Gupta @ 2017-11-21 22:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha, arcml

On 11/21/2017 02:03 PM, Andreas Schwab wrote:
> On Nov 21 2017, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
> 
>> make subdirs=nptl check fails as librt.so fails to link due to missing
>> pthread symbols. The real librt built does have libpthread.so in its link
>> cmd hence is fine, but not this librt.
> 
> Don't do that then.  If you want to take shortcuts you need to know what
> you are doing.  Before running make check you should make all to have
> everything up-to-date.

The problem is not specific subdirs=nptl, it happens for vanilla make check too. I 
was just doing subdirs to save time and find/fix all the errors in one go.

Does anyone know how the make build rules are carved up for this specific case ?

-Vineet

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 22:08   ` Vineet Gupta
@ 2017-11-21 22:29     ` Andreas Schwab
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2017-11-21 22:29 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: libc-alpha, arcml

On Nov 21 2017, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> The problem is not specific subdirs=nptl, it happens for vanilla make
> check too.

As I said, make all before make check to have an up-to-date build.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 21:48   ` Vineet Gupta
@ 2017-11-21 22:33     ` Andreas Schwab
  2017-11-22  1:14       ` Vineet Gupta
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2017-11-21 22:33 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: Zack Weinberg, GNU C Library, arcml

On Nov 21 2017, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:

> the link cmd for build/nptl/librt.so.

There is no librt.so in nptl.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: glibc: nptl/tst-cancel17 and librt issue
  2017-11-21 22:33     ` Andreas Schwab
@ 2017-11-22  1:14       ` Vineet Gupta
  0 siblings, 0 replies; 8+ messages in thread
From: Vineet Gupta @ 2017-11-22  1:14 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Zack Weinberg, GNU C Library, arcml

On 11/21/2017 02:33 PM, Andreas Schwab wrote:
> On Nov 21 2017, Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote:
> 
>> the link cmd for build/nptl/librt.so.
> 
> There is no librt.so in nptl.

Right, but when you do a make check in build tree, it does try to build one, 
rather than reference the rt/librt.so

But indeed if I follow your suggested sequence below, I don't run into the issues

    make all ; make -k check

Thx for the tip
-Vineet

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

end of thread, other threads:[~2017-11-22  1:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 21:27 glibc: nptl/tst-cancel17 and librt issue Vineet Gupta
2017-11-21 21:40 ` Zack Weinberg
2017-11-21 21:48   ` Vineet Gupta
2017-11-21 22:33     ` Andreas Schwab
2017-11-22  1:14       ` Vineet Gupta
2017-11-21 22:04 ` Andreas Schwab
2017-11-21 22:08   ` Vineet Gupta
2017-11-21 22:29     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).