glibc: nptl/tst-cancel17 and librt issue
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
Quoted 8 lines · Vineet Gupta
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
Quoted 6 lines · Zack Weinberg
On Tue, Nov 21, 2017 at 4:25 PM, Vineet Gupta
Quoted 4 lines
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.
Quoted 7 lines
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
Quoted 1 line · Vineet Gupta
the link cmd for build/nptl/librt.so.
There is no librt.so in nptl.
Andreas.
Signature · 3 lines
Andreas Schwab, schwab at linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 5 lines · Andreas Schwab
Quoted 1 line · Vineet Gupta
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
Quoted 3 lines · 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.
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.
Signature · 3 lines
Andreas Schwab, schwab at linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 9 lines · Andreas Schwab
Quoted 3 lines · 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.
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
Quoted 2 lines · Vineet Gupta
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.
Signature · 3 lines
Andreas Schwab, schwab at linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."