From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 022F23858D28 for ; Tue, 1 Aug 2023 20:52:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 022F23858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1bb5dac1df4so4836286fac.3 for ; Tue, 01 Aug 2023 13:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690923171; x=1691527971; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ovvoek+bz1BIAgE2Cn2Pu9TX+TNOUkKjOIDI5SO8ce4=; b=lTKA4XhW4aRqa9S7p4qDtpzHB9aTOe7VB+x9MJC1ZzozRbjVGiC5up2yCFOgaFp+vl N4y1Praumv5oMDvbm5QXzPKZ2GQUXMxWwzSSI3j7ghSuhIhdSqMZcL+dAHD0qdgRUZPl TD7sLwQHoQeXQTS+8z2lY7q5xGsoqDn4JpKsaNmxFPpPAXWi6y9kvyeaOd8Pj9ANkRY8 ju0Uw6uBwurvmWH79q7YUnM1SkqsH/D+3/TuL2KtBukNyuqEItfJCaY6Y8s1GRp1TmHA Mx31AilaGlqBWRa6lyMVitUUJTp65q0MLpHo6NuvSyxZKIXvXuXFOOV6wEnNogTlY9wj dzpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690923171; x=1691527971; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ovvoek+bz1BIAgE2Cn2Pu9TX+TNOUkKjOIDI5SO8ce4=; b=N9wQXakeqe5YHpnjFrcxqPy04rhcHgjvcnVXZJZT1cZFm4o1RwJk0WPTIp9b/9x7zC 4+jncHrcsfPEEtHtP7qCDPnogzyW/zxmPBYVVG8mGxEShj+MBt7Y9jO0Vp+aK2Qepny/ OZReSNKtSc/UIWG09Syh2F3Nz4eDhnV4VLlsTpDnGDhBUL4SBbxuOswCBnTXGzsLZFF4 LzZr+KbGpHQVOrpcAKIi3pwEL0LWdryFpB8YBUUa/iVPn67jRl6WZ1sRvnntMmX1j3M8 iH1FQKj7er4BeG2e4S1IoIFkDmVnUsg6IRi01KkwR12e0GuFhfd9nblvj7SxWeFkFYYX dT7g== X-Gm-Message-State: ABy/qLZ4QR+97U6oc1KHx4yUD7yq/MKPwTmjJyLMcVNWpxCGoMLt8nW6 1RFJnm1iG6Cel7Dil8e+w6EIzA== X-Google-Smtp-Source: APBJJlGz2E6W+tHId9f/Yzmm1LTvMV1d+P52Xcv7Xss3hrnVY9JYfdCZWzWSt/YbR8Uw6qSpAT1ugg== X-Received: by 2002:a05:6871:28a:b0:1bf:2ad9:8dae with SMTP id i10-20020a056871028a00b001bf2ad98daemr676946oae.45.1690923171346; Tue, 01 Aug 2023 13:52:51 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:9aa9:84f6:53b3:4cd0:ffe6? ([2804:1b3:a7c1:9aa9:84f6:53b3:4cd0:ffe6]) by smtp.gmail.com with ESMTPSA id dt2-20020a0568705a8200b001b03fbfa0c5sm5880328oab.39.2023.08.01.13.52.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 13:52:50 -0700 (PDT) Message-ID: <0b7f50a0-84ca-b518-5af2-351ef35c46f5@linaro.org> Date: Tue, 1 Aug 2023 17:52:48 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: tools only installation? Content-Language: en-US To: Vincent Fortier , libc-help References: From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 30/07/23 08:58, Vincent Fortier via Libc-help wrote: > Hi, > > Currently maintaining a SynoCommunity development package with a set > of various tools including compilers. One thing I'd really much like > to add is ldd, as everything being cross-compiled, having a native ldd > would be helpful to check shared libraries relationships directly from > its installed destination. > > So I've been playing with glibc to cross-compile it, which now works. > Although I now have two remaining issues: > 1. I can't find a way to install only the set of glibc tools, without > the entire library or any include files? Focus being in particular to > ldd. > 2. Presumably in lack of a solution for item 1, when invoking glibc > build after my other set of tools already built in planning to > generate a resulting package, glibc ends-up colliding with the already > installed gmp.h include file, coming from binutils who required gmp as > dependency. I'm presuming I should not build glibc first as > everything else will be bound to that newer version of glibc instead > of the one provided by the Synology toolchain. > > github PR: https://github.com/SynoCommunity/spksrc/pull/5824 > > Help or pointers would be really much appreciated. The ldd is essentially a script that issues the loader, you can also issue this direct: $ LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 /usr/bin/ls linux-vdso.so.1 (0x00007ffd6efaf000) libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ff78e8d8000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff78e600000) libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007ff78e841000) /lib64/ld-linux-x86-64.so.2 (0x00007ff78e948000) The only limitation is it does not resolve the interpreter, so you must issues the one define in the ELF file. A normal cross-compile installation would have it. Also glibc uses an internal only gmp.h which is not installed in the system so it is not clear to me what you referring for the gmp.h collision. The glibc provides a handy script to build cross-compile toolchain (build-many-glibcs.py), so it should be a matter to target the proper architecture along with the expected versions (the build-many-glibcs.py does not provide a way to define specific version, but you can easily setup manually). Another option would be use a different tool instead of ldd, as the suggested libtree cited on the PR. I have also created a similar tool [1] which should works slight better (it supports more architectures, support more ld.so.cache version and parses it directly instead of parsing ld.so.conf, it supports the new hwcap selection added on recent glibc). It is different than ldd because it parses the ELF file and mimic the loader, which is different than actually starting the loading process (as ldd does). [1] https://github.com/zatrazz/rldd