[Multiarch] libfreetype6-dev:i386 dependencies issue

Bug #990982 reported by Igbaäl
72
This bug affects 15 people
Affects Status Importance Assigned to Milestone
freetype (Ubuntu)
Fix Released
Wishlist
Unassigned
glibc (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I'm on
alex@leon:~$ uname -a
Linux leon 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

It's a fresh 12.04 install from a mini 30MB iso dd'ed to a USB flash drive.
So it's clean and up-to-date.

I have libfreetype6 and libfreetype6-dev installed.
To compile wine from source (32 and 64 bit version), I need both 32 and 64 bit development packages of several libraries.

For gcc, I had to install gcc-multilib instead of gcc:i386 (gcc and gcc:i386 seem to be incompatible).
But there is no freetype6-multilib package hence my bug report.

I think the following console output will tell you more things than long sentences :

alex@leon:~$ sudo apt-get install libfreetype6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libexpat1-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libc6-dev:i386 linux-libc-dev:i386 zlib1g-dev:i386
Suggested packages:
  glibc-doc:i386 manpages-dev:i386
Recommended packages:
  gcc:i386 c-compiler:i386
The following packages will be REMOVED:
  build-essential dkms g++ gcc gcc-multilib libfontconfig1-dev
  libfreetype6-dev virtualbox-dkms
The following NEW packages will be installed:
  libc6-dev:i386 libfreetype6-dev:i386 linux-libc-dev:i386 zlib1g-dev:i386
0 upgraded, 4 newly installed, 8 to remove and 0 not upgraded.
Need to get 6,832 kB of archives.
After this operation, 17.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? ^C

I'm sure you understand removing build-essential and gcc is not really something I want to do.

Hopefully, wine provides a configure switch (--without-freetype) to workaround the issue.

If you need more details, just let me know.

CVE References

Micah Gersten (micahg)
tags: added: multiarch
Revision history for this message
Steve Langasek (vorlon) wrote :

There appear to be two separate issues here. One is that libc6-dev Recommends: gcc, which apparently for you is confusing apt into removing build-essential even though it is NOT going to install gcc:i386. The other is that libfreetype6-dev is not a Multi-Arch: same package yet.

You should be able to work around the first issue by manually running 'sudo apt-get install libc6-dev libc6-dev:i386'.

The second issue will have to wait a bit for a solution to /usr/bin/freetype-config containing architecture-dependent strings.

Changed in freetype (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

I'm pretty sure the first point is not a bug.
When I tried to compile 32 bits wine, the configure script told me my system was unable to compile 32 bits programs ("gcc -m32 .." was failing).
I tried installing gcc:i386 but apt-get refused to do so (".. have unmet dependencies ..").
I found that gcc-multilib was the package I was looking for and if you look at what provides this package, there is libc6-dev-i386.
So I think libc6-dev is libc6-dev for amd64 in my case, libc6-dev-i386 = 32 bits libc6-dev on amd64 and libc6-dev-amd64:i386 = 64 bits libc6-dev on i386 (for compiling programs targetting amd64 from a i386 computer).
I know that sounds complex but in the end, it's failrly logical :
- gcc:i386 is gcc on 32 bits Ubuntu
- gcc:amd64 is gcc on 64 bits Ubuntu
so trying t install gcc:i386 on 64 bits Ubuntu means replacing (amd64) gcc by its i386 version.
Maybe the package description is not clear (I can file another bug for that if you want), but I personnally don't consider it as a bug.

And FYI, 'sudo apt-get install libc6-dev libc6-dev:i386' also wants to remove gcc, build-essential...

And concerning this bug, I know multiarch is recent and I can understand it needs some work.
I'm not a packager nor a maintainer so I don't know exatly how it works but as a programmer, I can create and generate patches.
So if you need help, feel free to ask.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 990982] Re: [Multiarch] libfreetype6-dev:i386 dependencies issue

On Mon, Apr 30, 2012 at 08:52:09AM -0000, Igbaäl wrote:
> so trying t install gcc:i386 on 64 bits Ubuntu means replacing (amd64) gcc
> by its i386 version.

Yes, that is what it means; and that's not what you want to do. Which is
why I say that libc6-dev recommending gcc is a problem.

> And FYI, 'sudo apt-get install libc6-dev libc6-dev:i386' also wants to
> remove gcc, build-essential...

Please show the complete output of this command - because it works for me.

Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

Should I file a bug for "libc6-dev recommending gcc" ?

And here is what you requested :
alex@leon:~$ sudo apt-get install libc6-dev libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6-dev is already the newest version.
Suggested packages:
  glibc-doc:i386 manpages-dev:i386
Recommended packages:
  gcc:i386 c-compiler:i386
The following packages will be REMOVED:
  build-essential dkms fglrx fglrx-amdcccle g++ gcc gcc-multilib
  virtualbox-dkms
The following NEW packages will be installed:
  libc6-dev:i386 linux-libc-dev:i386
0 upgraded, 2 newly installed, 8 to remove and 0 not upgraded.
Need to get 5,891 kB of archives.
After this operation, 202 MB disk space will be freed.
Do you want to continue [Y/n]? ^C

Revision history for this message
Steve Langasek (vorlon) wrote :

On Mon, Apr 30, 2012 at 08:11:54PM -0000, Igbaäl wrote:
> Should I file a bug for "libc6-dev recommending gcc" ?

Feel free to do so.

> And here is what you requested :
> alex@leon:~$ sudo apt-get install libc6-dev libc6-dev:i386
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> libc6-dev is already the newest version.
> Suggested packages:
> glibc-doc:i386 manpages-dev:i386
> Recommended packages:
> gcc:i386 c-compiler:i386
> The following packages will be REMOVED:
> build-essential dkms fglrx fglrx-amdcccle g++ gcc gcc-multilib
> virtualbox-dkms
> The following NEW packages will be installed:
> libc6-dev:i386 linux-libc-dev:i386
> 0 upgraded, 2 newly installed, 8 to remove and 0 not upgraded.
> Need to get 5,891 kB of archives.
> After this operation, 202 MB disk space will be freed.
> Do you want to continue [Y/n]? ^C

Ok. What does 'apt-cache policy gcc' show? What if you run 'sudo apt-get
install libc6-dev gcc libc6-dev:i386'?

Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

Will file a bug then.

alex@leon:~$ apt-cache policy gcc
gcc:
  Installed: 4:4.6.3-1ubuntu5
  Candidate: 4:4.6.3-1ubuntu5
  Version table:
 *** 4:4.6.3-1ubuntu5 0
        500 http://fr.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

alex@leon:~$ sudo apt-get install libc6-dev gcc libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
libc6-dev is already the newest version.
The following extra packages will be installed:
  linux-libc-dev:i386
Suggested packages:
  glibc-doc:i386 manpages-dev:i386
Recommended packages:
  gcc:i386 c-compiler:i386
The following NEW packages will be installed:
  libc6-dev:i386 linux-libc-dev:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,891 kB of archives.
After this operation, 23.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? ^C

You seem to understand what's going wrong, and that's great !

Revision history for this message
Steve Langasek (vorlon) wrote :

On Mon, Apr 30, 2012 at 09:28:21PM -0000, Igbaäl wrote:
> alex@leon:~$ sudo apt-get install libc6-dev gcc libc6-dev:i386
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> gcc is already the newest version.
> libc6-dev is already the newest version.
> The following extra packages will be installed:
> linux-libc-dev:i386
> Suggested packages:
> glibc-doc:i386 manpages-dev:i386
> Recommended packages:
> gcc:i386 c-compiler:i386
> The following NEW packages will be installed:
> libc6-dev:i386 linux-libc-dev:i386
> 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
> Need to get 5,891 kB of archives.
> After this operation, 23.0 MB of additional disk space will be used.
> Do you want to continue [Y/n]? ^C

> You seem to understand what's going wrong, and that's great !

Well, I at least know how to work around it. What's going wrong is that the
recommend is being processed, apt tries to satisfy the recommend by removing
other packages, can't actually make it work, so doesn't install the
recommends - but has already marked some conflicting packages for removal.

But this problem is not reproducible at all for me; I would expect it to be
more consistent.

Revision history for this message
kenjiru (kenjiru) wrote :

I'm trying to compile wine 32 bit on Ubuntu 12.04 64 bit, but I ran into this issue that libfreetype6-dev:i386 tries to remove a bunch of unrelated packages.

Please let me know if you find a workaround for this.

Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

I described the workaround in my initial post : use --without-freetype (that is ./configure --without-freetype) to build wine without font support.

FWI, the libfreetype6 package is Multi-arch'ified [1] but not libfreetype6-dev.
There is also an open debian bug : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666761
---
[1] : https://launchpad.net/ubuntu/precise/+source/freetype -> freetype_2.4.8-1ubuntu2.diff.gz
+++ freetype-2.4.8/debian/control
[...]
+Package: libfreetype6
[...]
+Multi-Arch: same

Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

I meant FYI (For Your Information), not FWI

Revision history for this message
Steve Langasek (vorlon) wrote :

This issue comes from the Recommends: of gcc by libc6-dev. Perhaps libc6-dev should be changed to not recommend it; or perhaps we need a different solution, such as recommending a per-architecture virtual package instead.

affects: freetype (Ubuntu) → eglibc (Ubuntu)
Revision history for this message
Odin Hørthe Omdal (velmont) wrote :

Totally driving me crazy.

So Debian doesn't want to fix it because they don't want to remove some tool that is in there too. Maybe it could be split out in its own package or somesuch? -- Is it possible to fix this manually in any way? Maybe temporary removing libfreetype6-dev for amd64 will fix it? Nope. That one got in, but lots of other stuff break then, python stuff gir-gtk-2.0 blabla.

Revision history for this message
Steve Langasek (vorlon) wrote :

On Tue, Dec 04, 2012 at 03:38:07PM -0000, Odin Hørthe Omdal wrote:
> Totally driving me crazy.

> So Debian doesn't want to fix it

Incorrect. I want it to be fixed, but it's not easy to fix and none of the
people clamoring for this have offered a suitable patch.

> because they don't want to remove some tool that is in there too. Maybe
> it could be split out in its own package or somesuch?

No, that doesn't help at all because this tool is part of the upstream -dev
interface.

Revision history for this message
Adam Conrad (adconrad) wrote :

What's causing the weird apt behaviour here is cascading from libfreetype6-dev depending on "libc6-dev | libc-dev" which is entirely pointless, since build-essential takes care of that. This doesn't seem to be an uncommon thing for development packages to do, mind you, so fixing it just in freetype doesn't help much. It's probably a practice we should stamp out, regardless.

As for the libc6-dev recommends on a C compiler, that seems generally sane, but perhaps it could be qualified with [any] or something? Are we allowed to do that in dpkg deps yet, or only in build-depends?

affects: eglibc (Ubuntu) → freetype (Ubuntu)
Changed in eglibc (Ubuntu):
status: New → Triaged
Changed in freetype (Ubuntu):
status: Triaged → New
Changed in eglibc (Ubuntu):
importance: Undecided → Wishlist
Steve Langasek (vorlon)
Changed in freetype (Ubuntu):
status: New → Triaged
Revision history for this message
Mislav Blažević (krofnica996) wrote :

Is there a workaround for this bug? I really need both i386 and amd64 libfreetype6-dev.

Revision history for this message
Timothy Arceri (t-fridey) wrote :

I'm having a similar problem with libexpat1-dev:i386

Revision history for this message
Vincent Thiele (vincentthiele) wrote :

Any news?

tags: added: trusty
Revision history for this message
Igbaäl (cerebro-alexiel) wrote :

The initial issue was not being able to build a 32-bit version of wine from source on a 64-bit computer because wine needed both libfreetype-dev package for i386 and amd64 flavour.

I followed http://wiki.winehq.org/BuildingBiarchWineOnUbuntu guide and it fully works, neither errors nor headaches ;)

But if I try to install libfreetype6-dev:i386, I still have to uninstall libfreetype6-dev (:amd64) among other packages :
alex@leon:~$ sudo apt-get install libfreetype6-dev:i386
[sudo] password for alex:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  gcc-4.9-base:i386 libc6:i386 libc6-dev:i386 libfreetype6:i386 libgcc1:i386
  libpng12-0:i386 libpng12-dev:i386 linux-libc-dev:i386 zlib1g:i386
  zlib1g-dev:i386
Suggested packages:
  glibc-doc:i386 locales:i386 manpages-dev:i386
Recommended packages:
  gcc:i386 c-compiler:i386
The following packages will be REMOVED:
  build-essential dkms g++ gcc libfontconfig1-dev libfreetype6-dev
  libpng12-dev virtualbox-dkms
The following NEW packages will be installed:
  gcc-4.9-base:i386 libc6:i386 libc6-dev:i386 libfreetype6:i386
  libfreetype6-dev:i386 libgcc1:i386 libpng12-0:i386 libpng12-dev:i386
  linux-libc-dev:i386 zlib1g:i386 zlib1g-dev:i386
0 upgraded, 11 newly installed, 8 to remove and 0 not upgraded.
Need to get 7,882 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

I just read https://wiki.ubuntu.com/MultiarchSpec and in the "Unresolved issues" section, there is a "Co-installable -dev packages " entry which means this bugs is normal since no one agreed on what to do in this case.
Maybe renaming this bug into "[Mutiarch] Find a way to co-install -dev packages" would better describe it.

Adam Conrad (adconrad)
affects: eglibc (Ubuntu) → glibc (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.2 KiB)

This bug was fixed in the package glibc - 2.19-10ubuntu1

---------------
glibc (2.19-10ubuntu1) utopic; urgency=medium

  * Merge with Debian unstable, bringing in several CVE fixes (LP: #1362409)
  * Enable systemtap support for Ubuntu which was dropped in Debian for now.
  * Move MIN_KERNEL_SUPPORTED to 2.6.32 on x86 now that hardy PPAs are dead.
  * libc-dev no longer Recommends 'gcc | c-compiler' (LP: #990982, #1005097)

glibc (2.19-10) unstable; urgency=medium

  [ Aurelien Jarno ]
  * debian/rules: drop the i486 to i586 GNU triplet conversion.
  * debian/control.in/main: build-depends on dpkg-dev (>= 1.17.1) and
    gcc-4.8 (>= 4.8.3-8) to make sure to get the new i586 GNU triplet on
    i386, hurd-i386 and kfreebsd-i386.
  * Remove iconv(1), iconvconfig(8), localedef(1) and sprof(1) manpages,
    provided by the manpages packages starting with version 3.71.
  * patches/any/cvs-CVE-2014-5119.diff: New patch from upstream to remove
    support for loadable gconv transliteration modules (CVE-2014-5119).

  [ Samuel Thibault ]
  * patches/hurd-i386/cvs-libpthread_guardsize.diff: Fix guard size computation.
    Fixes the creation of thousands of threads, and thus pulseaudio testsuite.
    Closes: #758671.
  * patches/hurd-i386/cvs-libpthread_std_thread.diff: New patch to deal with
    std::thread using __pthread_key_create to detect presence of libpthread.
    Fixes build of webkitgtk and most probably other libstdc++-related
    failures.
  * patches/hurd-i386/submitted-bind_umask.diff: New patch to fix bind() when
    umask is 0000, fixes clamav testsuite. Closes: #759218.

  [ Adam Conrad ]
  * debian/patches/series: Actually apply the submitted arm64 alignment and
    setcontext patches mentioned in 2.19-0experimental0 (closes: #759042)

glibc (2.19-9) unstable; urgency=medium

  [ Aurelien Jarno ]
  * debian/rules.d/control.mk: don't add libc6{,-dev}-{armel,armhf}
    packages in debian/control as we don't build them in Debian. New dak
    code checks for NEW packages directly in debian/control.

glibc (2.19-8) unstable; urgency=medium

  [ Helmut Grohne ]
  * debian/patches/build stage2 without selinux. Closes: #742640.
  * Don't emit dependencies on libgcc when building stage2. Closes: #755580.
  * Add a "nobiarch" build profile that inhibits all multilib packages from
    being built. Closes: #745380.

  [ Aurelien Jarno ]
  * debian/patches/arm64/cvs-includes-cleanup.diff: new patch from upstream to
    clean sys/user.h and sys/procfs.h. Closes: #755169.
  * debian/patches/s390/cvs-s390-abi-reversal.diff: new patch backported from
    upstream to revert the S/390 jmp_buf/ucontext_t ABI change.
  * Update Turkish debconf translation, by Mert Dirik. Closes: #757495.
  * Remove ia64 support. Closes: #756095.
  * Update debian/copyright with the libidn/punycode.{c,h} license. Closes:
    #754731.
  * debian/control/libc: drop Recommends on: gcc | c-compiler. Closes:
    #747933.

glibc (2.19-7) unstable; urgency=high

  * debian/patches/localedata/unsubmitted-tst-setlocale3-ENV.diff: Apply
    correct environment for the tst-setlocale3 test to find its locales.

glibc (2.19-6) unstable; urgency=high

  [ Aurelien Jarno ]
  * d...

Read more...

Changed in glibc (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

in 14.10 the freetype -dev package is M-A: same

Changed in freetype (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
kenorb (kenorb) wrote :

How does this fix the problem?

Installing libfreetype6-dev:i386 on Debian Wheezy still trying to remove: cpp g++ g++-multilib gcc , etc. and having libfreetype6-dev is still not enough to compile 32-bit wine.

Comment #19 doesn't mention anything about fix in libfreetype.

Is there any workaround to install 32-bit FreeType 2 development files? Or how to use the "fix"?

Related: http://askubuntu.com/questions/114460/how-to-install-lfreetype-using-wine

Revision history for this message
kenorb (kenorb) wrote :

The same problem happening when installing any of these:

    libxslt-dev:i386 libgnutls-dev:i386 libjpeg-dev:i386 libpng-dev:i386

it's trying to remove my 64-bit compiler.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

xslt-dev jpeg-dev png-dev are multiarch (tested on vivid).

gnutls it is AFAICS, I suspect some libraries linked by it aren't, this is the error you are having.

Feel free to trace it down to the not multiarch library, and I'll see if I can fix the source package.

Revision history for this message
Anders Bandicoot (omlax) wrote :

6 years later, I'm encountering the same issue in Ubuntu 18.04.

sudo apt install libfreetype6-dev:i386
[...]
The following packages have unmet dependencies:
 libfreetype6-dev:i386 : Depends: libc6-dev:i386 but it is not going to be installed or
                                  libc-dev:i386
                         Depends: zlib1g-dev:i386 but it is not going to be installed or
                                  libz-dev:i386
                         Depends: libpng-dev:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And then, for the linux-libc-dev:i386 dependency:

sudo apt install linux-libc-dev:i386
[...]
The following packages will be REMOVED:
  build-essential g++ g++-7 gcc-7-multilib gcc-multilib libc6-dev libc6-dev-i386
  libc6-dev-x32 libfreetype6-dev libpng-dev libstdc++-7-dev linux-libc-dev zlib1g-dev
The following NEW packages will be installed:
  linux-libc-dev:i386

I echo kenorb's sentiment: is there a workaround to install the 32-bit FreeType libraries?

Revision history for this message
Hugh McMaster (hmcmaster) wrote :

Out of interest, I installed 18.04 in a VM and had no problems installing the multi-arch libfreetype6-dev packages for and64 and i386.

That said, you’re largely out of luck when it comes to building Wine from source on 18.04. Even the most recent point release (18.04.6) is limited by many build-dependencies not being multi-arch ready.

Multi-arch support really improved after 18.04. I’m afraid you’ll need to migrate to 20.04 or more recent.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.