From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 14F103864841 for ; Thu, 1 Jul 2021 06:01:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14F103864841 Received: by mail-io1-xd2b.google.com with SMTP id k11so6145567ioa.5 for ; Wed, 30 Jun 2021 23:01:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UyVaoq6FHZ7xxOFkUjhexmt1U6lONBAg0+379NnDyB8=; b=qPkShEh/9H2df0G7bnxG4XbGbKE4z7e/T1tbmXce1ulq14DuCwDiwA2eVSGTr3fakW KOX+Ij8nll0ysoLxDWBUQJBBLE/NO9pOoVr7oVOKQtcLD/1ZXpS5NyjRAvKx2Qd75yK8 hP1XRgQK+XE56tfn8HFAsrnkz0sYbRTrTUel4Svo3J9GYk/CGL/f+fYdWt0HOJ8niIzq RNQi0iy1gFG7J7vaHI12MxDgXuuTym7h4ruFNAtezK1GpHNMA6JsRLfbQ0YU75yUIz55 /K1vP1qCzr/KhdSopwF5IZjHXdlW3qtdKLkkbNBhPXCFAGtMMAFdf3NFWzBr7fyjJzGR 4O3w== X-Gm-Message-State: AOAM531lttBp62Thwh5EdEIcd3s97Q/vk07US4+nmWDwdvdxTPZNHI03 yU9QPcgdy5V8gIdivKNU4Jjb2/u8aZSmvyTAElW1uz7zJWap X-Google-Smtp-Source: ABdhPJyk8U/WXVjozsSI3G0G+cMivgb51JzO4DNBe563nW/414CwDmzNmfxIS6lDxtBv/8X0ifsdJbTyA143UON0UEk= X-Received: by 2002:a05:6602:19:: with SMTP id b25mr3209376ioa.93.1625119293289; Wed, 30 Jun 2021 23:01:33 -0700 (PDT) MIME-Version: 1.0 From: Kenny Bian Date: Wed, 30 Jun 2021 23:01:22 -0700 Message-ID: Subject: Build libc6-2.28 from source: ld-2.28.so cause errors when installing deb package To: libc-help@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 06:01:35 -0000 We try to build libc6-2.28 from source code. Our board runs Ubuntu 18.04 in armhf architecture. We downloaded the source code from https://launchpad.net/ubuntu/+source/glibc/2.28-0ubuntu1. Here is what we did to create the deb package: 1. We build it by using these bash commands: /usr/bin/dpkg-source -x glibc_2.28-0ubuntu1.dsc libc6-2.28 pushd libc6-2.28/ mkdir build pushd build/ ../configure \ --host=arm-linux-gnueabihf \ --prefix=/tmp/armhf/libc6/usr \ --enable-obsolete-nsl make make install 2. Create a deb folder and copy files to this folder. Also put the control file and post/pre scripts in "DEBIAN" folder in the deb folder. 3. Create deb file: /usr/bin/dpkg-deb --build --root-owner-group $deb_folder/ The deb file was created. But there are errors when we install the deb in our armhf board(sudo dpkg -i libc6_2.28-0ubuntu1-my_armhf.deb): Unpacking libc6:armhf (2.28-0ubuntu1) over (2.28-0ubuntu1) ... /bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory dpkg: warning: old libc6:armhf package post-removal script subprocess returned error exit status 127 dpkg: trying script from the new package instead ... /bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory dpkg: error processing archive libc6_2.28-0ubuntu1-my_armhf.deb (--install): new libc6:armhf package post-removal script subprocess returned error exit status 127 After investigation, we finally narrowed it down to "ld-2.28.so". Its path in the deb file is "lib/arm-linux-gnueabihf/ld-2.28.so". The file ld-2.28.so built by us will cause the errors above. But the one from the official deb works fine. We used the file ld-2.28.so from https://launchpad.net/ubuntu/+source/glibc/2.28-0ubuntu1/+build/15300581/+files/libc6_2.28-0ubuntu1_armhf.deb to replace the built one in our deb. There will be no errors. The deb package can be installed properly. I used the tool readelf, nm and objdump to check the files. There seems to be no difference between the built file by me and the one from the official deb. Could you tell me what could be wrong? Is there anything I can do to investigate it? Help please! Thanks in advance!