From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63344 invoked by alias); 4 Jan 2020 14:30:26 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 63321 invoked by uid 89); 4 Jan 2020 14:30:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Jan 2020 14:30:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578148217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qeedYA5TqPzLkQ2dzootHKb/xGIwiVYvkP8lfZBITRA=; b=Sm1S0FdWDcWlwuDb4+J+xv5wmvwhOeNa2pNTwHGsmNOAOiPmSFovnhd4yp2hTOtDscQURH RnTqszH+puSE6+q+0RqmUFi5tmnOluRqZS0JAmoiNurmdQ1IHKewc3QbKNJvnK9U66Y0+M CEbis7brC/PZZlK6dESQrTy7As3JNzU= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-Nm2sxx-2Pf2sip88p2sjXw-1; Sat, 04 Jan 2020 09:28:48 -0500 Received: by mail-qk1-f197.google.com with SMTP id g28so13202862qkl.6 for ; Sat, 04 Jan 2020 06:28:36 -0800 (PST) Return-Path: Received: from [192.168.1.4] (135-23-175-75.cpe.pppoe.ca. [135.23.175.75]) by smtp.gmail.com with ESMTPSA id h1sm20634514qte.42.2020.01.04.06.28.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jan 2020 06:28:26 -0800 (PST) Subject: Re: Debugging containerized glibc tests with gdb (a developer use case for outside-of-container debugging). To: "Gabriel F. T. Gomes" Cc: DJ Delorie , libc-alpha , Gdb , Gary Benson , Florian Weimer References: <20191226172138.5a6a4151@tereshkova> <20191227145551.79a291b4@tereshkova> From: Carlos O'Donell Message-ID: Date: Sat, 04 Jan 2020 14:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191227145551.79a291b4@tereshkova> X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2020-01/txt/msg00003.txt.bz2 On 12/27/19 12:55 PM, Gabriel F. T. Gomes wrote: > Hi, Carlos, >=20 > On Fri, 27 Dec 2019, Carlos O'Donell wrote: >> >> Did you try --enable-hardcoded-path-in-tests? >=20 > I hadn't. =C2=AC=C2=AC > That was it. Interesting! Thank you for looking into this more deeply. Reproducing these issues is half the battle! > You wrote this in your first email: >=20 >> In test-container.c we mount $srcdir and $objdir into the same absolute = paths >> inside the container, so ld.so should be accessible from the same absolu= te paths. >> If we fail those mounts we immediately fail the test with FAIL_EXIT1. >=20 > I think the paths are the same, but the contents are not identical. On > the tests I did, the testroot.root/path/to/build/dir/elf directory is > missing the symlink between ld.so and ld.so.. For instance: Are you saying the contents of $objdir's mount in the sysroot are not the s= ame as the contents of $objdir as seen _outsite_ of the sysroot? We have two paths: - Normal $objdir - $objdir as seen from within the sysroot's mount =20 > $ ls -l testroot.root/home/gabriel/build/x86_64/glibc/elf > -rwxrwxr-x 1 gabriel gabriel 1342800 Dec 27 11:09 ld-linux-x86-64.so.2 A normal $objdir should have: lrwxrwxrwx. 1 carlos carlos 5 Aug 1 00:51 ld-linux-x86-64.so.2 -> l= d.so -rwxrwxr-x. 1 carlos carlos 1458696 Aug 1 00:51 ld.so > $ ls -l testroot.root/home/gabriel/build/powerpc64le/glibc/elf/ > -rwxr-xr-x 1 gabriel gabriel 1566232 Dec 27 09:05 ld64.so.2 Likewise. > Whereas on the actual build dir: =20 > $ ls -l elf/ld*.so* > lrwxrwxrwx 1 gabriel gabriel 5 Dec 27 09:04 elf/ld64.so.2 -> ld.so > -rwxr-xr-x 1 gabriel gabriel 1566232 Dec 27 09:04 elf/ld.so Yes, this is correct. >> warning: Could not load shared library symbols for /home/carlos/build/gl= ibc-gr-localedef/elf/ld.so. >=20 > If I create the ld.so symlink in the sysroot, the problem goes away. > Should there be a symlink in the sysroot? =20 Why would we need to create it? I thought this path was simply a MS_BIND mount of the $objdir and should have identical contents? --=20 Cheers, Carlos.