"pbuilder-dist create xenial" fails (Unutu 16.04) since Oct 17, 2018

Bug #1799859 reported by Alexis Wilke
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a build environment which I can't use anymore. I get some dependency errors as follow:

The following packages have unmet dependencies:
 libexpat1-dev : Depends: libexpat1 (= 2.1.0-7) but 2.1.0-7ubuntu0.16.04.3 is to be installed
E: Unable to correct problems, you have held broken packages.

Thinking that something may be wrong with my existing pbuilder/xenial-base.tgz file, I tried to create a new version with:

pbuilder-dist create xenial

That fails too. I get the following error:

The following packages have unmet dependencies:
 build-essential : Depends: gcc (>= 4:5.2) but it is not going to be installed
                   Depends: g++ (>= 4:5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

IMPORTANT NOTE: I also tried after deleting the "pbuilder" folder, so starting from scratch.

Another (possibly) relevant section from the attached logs:

Setting up dpkg (1.18.4ubuntu1.5) ...
(Reading database ... 12084 files and directories currently installed.)
Removing build-essential (12.1ubuntu2) ...
Removing g++ (4:5.3.1-1ubuntu1) ...
Removing g++-5 (5.3.1-14ubuntu2) ...
Removing gcc (4:5.3.1-1ubuntu1) ...
Removing gcc-5 (5.3.1-14ubuntu2) ...
(Reading database ... 11977 files and directories currently installed.)
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...

Here is a copy of my .pbuilderrc file which could have an effect on the build?

# ccache
sudo mkdir -p /var/cache/pbuilder/ccache
sudo chmod a+w /var/cache/pbuilder/ccache
export CCACHE_DIR="/var/cache/pbuilder/ccache"
export PATH="/usr/lib/ccache:${PATH}"
HOOKDIR="/home/build/.pbuilder-hooks"
OTHERMIRROR="deb [trusted=yes] file:///home/build/pbuilder/${DIST}_result ./"
BINDMOUNTS="/home/build/pbuilder/${DIST}_result ${CCACHE_DIR}"
APTCACHEHARDLINK=no

My existing xenial-base.tgz has been working for a solid 2 years so I'm not too sure what would have happened.

I found an interesting here: https://askubuntu.com/questions/937254/cannot-install-build-essential-gcc-g-after-upgrade-to-17-04

Although it has not helped me with my pbuilder issues.

The very first error I get is this one:

pbuilder-dist: Warning: Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details.

However, I'm not too sure how I could update the distro-info-data more that by getting the latest available in Ubuntu 16.04. My computer is definitely up to date.

I found this other bug: https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1068390 but it does not look like anything there would help me.

Tags: packaging
Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :
Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :

Just in case, I tried again after commenting my .pbuilderrc and I also have a hook.

I get the same results, the build-essential package is not happy.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Pete (depleater) wrote :

I've run into the same problem, although I'm using cowbuilder-dist instead of pbuilder-dist on Ubuntu 16.04. I've attached a log.

Possibly worth noting - both 18.04 (bionic) and 14.04 (trusty) build correctly - it's only 16.04 (xenial) that fails.

However, both "cowbuilder-dist create trusty" and "cowbuilder-dist create bionic" also generate a similar "Distribution data outdated" warning as the first line of output (as Alexis also mentioned).

Revision history for this message
Pete (depleater) wrote :

I found a workaround for this problem.

The core issue is that BY DEFAULT cowbuilder-dist (and pbuilder-dist) will enable multiple "pockets", including "security", "updates", and "proposed".

It looks like the "proposed" pocket (available here: http://archive.ubuntu.com/ubuntu/dists/xenial-proposed/main/binary-amd64/) includes GCC version 5.4.0-6ubuntu1~16.04.11, which conflicts with GCC version 5.3.1-14ubuntu2 (apparently required by something else - not sure what).

When I entered my broken chroot and attempted to debug the dependency problem, I got this:

-----------------------------------------------------------------
root@pete-test-pc:/# apt-get install gcc-5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gcc-5 : Depends: cpp-5 (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.11 is to be installed
         Depends: gcc-5-base (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.11 is to be installed
         Depends: libgcc-5-dev (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.11 is to be installed
E: Unable to correct problems, you have held broken packages.
-----------------------------------------------------------------

Workaround: supply any of the flags "--release-only", "--security-only", or "--updates-only" to the cowbuilder-dist or pbuilder-dist commands. Using any of those flags will *disable* the "proposed" pocket, eg.:

cowbuilder-dist xenial create --updates-only

pbuilder-dist xenial create --updates-only

Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :

Well... the creation of the environment worked with "--updates-only".

However, my build requires a few things, one of which is libexpart1-dev and that still fails:

The following packages have unmet dependencies:
 libexpat1-dev : Depends: libexpat1 (= 2.1.0-7) but 2.1.0-7ubuntu0.16.04.3 is to be installed
E: Unable to correct problems, you have held broken packages.

So it's not a work around as far as my build is concerned.

Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :

As Pete mentioned, the "wrong" version comes from the proposed version. We can see the list is here:

https://www.ubuntuupdates.org/package/core/xenial/main/proposed/gcc-5

The following is the table with the versions.

- Other versions of "gcc-5" in Xenial

Repository Area Version
========== ==== =======
base universe 5.3.1-14ubuntu2
base main 5.3.1-14ubuntu2
security main 5.4.0-6ubuntu1~16.04.10
security universe 5.4.0-6ubuntu1~16.04.10
updates universe 5.4.0-6ubuntu1~16.04.10
updates main 5.4.0-6ubuntu1~16.04.10
proposed universe 5.4.0-6ubuntu1~16.04.11
PPA: Canonical Kernel Team 5.4.0-6ubuntu1~16.04.9

What I don't understand is why that error still happens even though the list of sources does not even include the "proposed" archive.

root@build:/# cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu xenial-security main
deb http://archive.ubuntu.com/ubuntu xenial-updates main
deb http://archive.ubuntu.com/ubuntu xenial main restricted
#deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
root@build:/# ls /etc/apt/sources.list.d/
root@build:/#

Looking at the policy for gcc-5 I get the following:

root@build:/# apt policy gcc-5
gcc-5:
  Installed: 5.4.0-6ubuntu1~16.04.11
  Candidate: 5.4.0-6ubuntu1~16.04.11
  Version table:
 *** 5.4.0-6ubuntu1~16.04.11 100
        100 /var/lib/dpkg/status
     5.4.0-6ubuntu1~16.04.10 500
        500 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     5.3.1-14ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

And effectively when I look at the list of installed gcc-5 packages I see that it's the proposed version...

root@build:/# dpkg -l | grep gcc-5
ii gcc-5 5.4.0-6ubuntu1~16.04.11 amd64 GNU C compiler
ii gcc-5-base:amd64 5.4.0-6ubuntu1~16.04.11 amd64 GCC, the GNU Compiler Collection (base package)
ii libgcc-5-dev:amd64 5.4.0-6ubuntu1~16.04.11 amd64 GCC support library (development files)

Forcing the installation of version 5.4.0-6ubuntu1~16.04.10 doesn't help. Next time I try a build, I get the same version errors (as shown above.)

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.