[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed for cross-building tsocks



Hi Nilesh,

On Thu, Aug 14, 2025 at 11:22:27PM +0530, Nilesh Patra wrote:
> tsocks fails to cross build with [1]:

Thank you for fixing so many packages!

> |   dh_builtusing -a
> | dh_builtusing: error: libc-dev-bin should match one installed package, got:
> | glibc,2.41-8,amd64
> 
> >From my reading of dh-builtusing code, it queries dpkg database for libc-dev-bin package
> which returns amd64 and tries to match it with hostarch which in this case is arm64.
> 
> I suppose this is due to libc-dev-bin being "M-A: foreign". So I tried replacing the field
> in d/control with:
> 
> -Built-Using: ${dh-builtusing:libc-dev-bin}
> +Built-Using: ${dh-builtusing:libc6-dev}
> 
> and it seems to work and resolves the correct variable in B-U field. I am however not
> fully sure if this is the right thing to do.

I mostly concur with your analysis. What ends up in the Built-Using
field is a source package and its version. As far as I understand it, it
does not matter which binary package we use for the lookup. This
suggests that your change would be correct. Unfortunately, it'll break
on alpha and hurd-any as those do not have a libc6-dev package. I guess
that libc-dev-bin has been chosen here as its name is the same across
architectures. I fear there is no simple solution here. You might try
${dh-builtusing:libc-dev} as all of the libc*-dev packages provide
libc-dev, but I don't have high hopes. I guess we'll have to resort to
something more manual here.

Helmut


Reply to: