On 2025-12-28 09:48 -0500, Greg Wooledge wrote:

> In a multiarch setup (i386 on amd64 for example), the shared library
> packages can coexist.  Each library package will have :i386 or :amd64
> appended to its package name.
>
> hobbit:~$ dpkg -l libc6\* | grep ^ii
> ii  libc6:amd64           2.41-12      amd64        GNU C Library: Shared 
> libraries
> ii  libc6:i386            2.41-12      i386         GNU C Library: Shared 
> libraries
> ii  libc6-dev:amd64       2.41-12      amd64        GNU C Library: 
> Development Libraries and Header Files
>
> The library -dev packages *cannot* coexist.  You can have either
> libc6-dev:amd64 or libc6-dev:i386 but not both at the same time.

Surely you can, they happily coexist on my system. 

> Both packages would try to create headers such as /usr/include/stdio.h
> and they could conflict.

That is fine as long as the headers are identical across architectures.

,----
| $ dpkg -S /usr/include/stdio.h
| libc6-dev:amd64, libc6-dev:i386: /usr/include/stdio.h
`----

Header files that are _not_ identical across architectures must be moved
to an arch specific subdirectory of /usr/include, in the case of
libc6-dev this includes everything in the bits/ directory:

,----
| $ dpkg -S /usr/include/*/bits                      
| libc6-dev:i386: /usr/include/i386-linux-gnu/bits
| libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits
| musl-dev:amd64: /usr/include/x86_64-linux-musl/bits
`----

Cheers,
       Sven

Reply via email to