← Back to team overview

launchpad-users team mailing list archive

Re: Build libc6-2.28 from source: ld-2.28.so cause errors when installing deb package

 

On Wed, Jun 30, 2021 at 11:08:20PM -0700, Kenny Bian wrote:
> We try to build libc6-2.28 from source code. Our board runs Ubuntu
> 18.04 in armhf architecture. We download 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/

This is not really a valid way to build .debs unless you really know
*precisely* what you're doing at every single step.  At minimum you
should use dpkg-buildpackage instead, but I normally recommend using
sbuild (https://wiki.ubuntu.com/SimpleSbuild) since that makes sure that
the whole thing is built in a clean environment with only the correct
set of build-dependencies installed.

-- 
Colin Watson (he/him)                           [cjwatson@xxxxxxxxxxxxx]


References