Newer hwcap failures

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Jan 29 11:53:46 GMT 2021



On 29/01/2021 07:51, Szabolcs Nagy wrote:
> The 01/29/2021 11:48, Florian Weimer wrote:
>> * Szabolcs Nagy:
>>
>>> The 01/29/2021 10:20, Florian Weimer via Libc-alpha wrote:
>>>> * Adhemerval Zanella:
>>>>
>>>>> The issue is test-container is copying the ld.so.cache from system into
>>>>> testroot and thus _dl_sysdep_read_whole_file does not fail.
>>>>>
>>>>> For 32-bit builds, there is not ld.so.cache then _dl_sysdep_read_whole_file
>>>>> fails and further ldconfig does not change the process map (since
>>>>> _dl_load_cache_lookup won't reload the cache after an initial failure).
>>>>>
>>>>> That's explain why I am seeing this only on system with default 64-bit
>>>>> userland.  I don't know exactly why I haven't see this before, neither
>>>>> if it were some testing regression added recently.
>>>>
>>>> I can't reproduce this (with an x86-64 host and a multilib toolchain).
>>>> Does it require an i386 chroot to reproduce?
>>>
>>> i see those tests fail with a config.make that has
>>>
>>> cross-compiling = maybe
>>>
>>> then /etc/ld.so.cache is missing from the install
>>> directory (since ldconfig is not run)
>>>
>>> i normally use a i686-linux-gnu toolchain on an
>>> x86_64 machine to test i686, not a chroot/container.
>>> in an i686 container with native gcc the tests pass.
>>
>> Hmm, how do you get that maybe?  Do you rebuild ./configure using
>> autoconf 2.70 or later?
>>
>> I see this in the configure file we ship:
>>
>> # There might be people who depend on the old broken behavior: `$host'
>> # used to hold the argument of --host etc.
>> # FIXME: To remove some day.
>> build=$build_alias
>> host=$host_alias
>> target=$target_alias
>>
>> # FIXME: To remove some day.
>> if test "x$host_alias" != x; then
>>   if test "x$build_alias" = x; then
>>     cross_compiling=maybe
>>   elif test "x$build_alias" != "x$host_alias"; then
>>     cross_compiling=yes
>>   fi
>> fi
>>
>> I configure glibc with --build=i686-linux-gnu, and that gives me
>> “cross-compiling = no” in config.make.
> 
> hm ok i use --host=i686-linux-gnu but not build
> may be i should add --build too.
> 
> (but in case of real cross compiling when i
> run the tests with cross-wrapper+ssh then i
> cannot change the --build and the tests will
> fail)
> 

In my environment I use '--build=x86_64-linux-gnu --host=i686-linux-gnu' and
CFLAGS="x86_64-glibc-linux-gnu-gcc -m32" with a multiarch gcc built with
build-many-glibcs.py:

$ x86_64-glibc-linux-gnu-gcc -v
[...]
Configure with: [...]  --with-multilib-list=m64,m32,mx32 [...]

This results in:

$ grep cross-compiling config.make 
cross-compiling = yes

In most cases it does not interfere because cache won't be used. But I
still think we should fix to the test that actually check ldconfig
and ld.so.cache.

My idea to handle it is to add a new 'ldconfig' rule to *.script to
trigger a new ld.so.cache creation for container tests.


More information about the Libc-alpha mailing list