By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2049 - tdenetwork FTBFS complaining about libgadu
Summary: tdenetwork FTBFS complaining about libgadu
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdenetwork (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: Other Linux
: P5 blocker
Assignee: Slávek Banko
URL:
Depends on:
Blocks: 2014
  Show dependency treegraph
 
Reported: 2014-05-06 10:03 CDT by Michele Calgaro
Modified: 2014-11-07 15:58 CST (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
temporary patch for testing (1.55 KB, patch)
2014-05-10 01:41 CDT, Michele Calgaro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Calgaro 2014-05-06 10:03:26 CDT
Recently in Debian/Jessie, tdenetwork FTBFS with the following error:

-- checking for one of the modules 'libgadu'
CMake Error at cmake/modules/TDEMacros.cmake:23 (message):
  #################################################
   libgadu is required, but was not found on your system


I haven't spent much time on it yet, but libgadu-dev and libgadu are installed during the building process (using pbuilder) and the files are present on disk in the correct location.
Funny thing is that if I build locally, libgadu is detected correctly. The same libraries, same versions ans same file locations are used.
Comment 1 Michele Calgaro 2014-05-10 01:41:27 CDT
Created attachment 2053 [details]
temporary patch for testing

Tim, Slavek, this is a strange bug. Please read through, since I need your collaboration to test/fix on Ubuntu.

1) PROBLEM AND FIX
The reason for the FTBFS is that libgadu is not detected by cmake in a clean build environment. cmake executes the command "/usr/bin/pkg-config --exists libgadu": this fails because pkg-config can not find the package "gnutls", as shown by:
--------------
#> if `/usr/bin/pkg-config --exists libgadu`; then echo 1; else echo 0; fi
0

#> /usr/bin/pkg-config --exists libgadu --print-errors
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gnutls', required by 'libgadu', not found
--------------

Installing the package "libgnutls-dev" is sufficient to fix the problem (and that is the reason why on my local machine the build was successful):
--------------
#> if `/usr/bin/pkg-config --exists libgadu`; then echo 1; else echo 0; fi
1

#> /usr/bin/pkg-config --exists libgadu --print-errors
<No output>
--------------

I verified that after adding "libgnutls-dev" to the control file (see patch), tdenetwork builds properly in Jessie.


2) REASON OF PROBLEM
I have not (yet) been able to find what triggered the problem. I last successfully built tdenetwork on Apr. 26 and I discovered a FTBFS on May 4/5.
The last change to cmake and cmake-data package is dated Mar.30, the last change to pkg-congif is dated Apr.23.
Even more strange, checking the log file of the nightly build website (dated Apr. 29) I can see that the libgnutls-dev package was not installed and the following message appears:
---------------------
-- checking for one of the modules 'libgadu'
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
[repeated several times]
---------------------
But the build process continued correctly until the end.

Adding the "libgnutls-dev" to the control file would also fix those messages, but yet I am wondering what has changed.


3) UBUNTU PROBLEM (?)
Checking the availability of "libgnutls-dev" for Ubuntu, is looks like some releases do not have such package, specifically maverick, natty, oneiric, quantal.
http://packages.ubuntu.com/search?keywords=libgnutls-dev
So the same solution can no be applied, provided the same problem arise.

How do you think we should move forward?
Comment 2 Timothy Pearson 2014-05-10 03:06:38 CDT
(In reply to Michele Calgaro from comment #1)
> Created attachment 2053 [details]
> temporary patch for testing
> 
> Tim, Slavek, this is a strange bug. Please read through, since I need your
> collaboration to test/fix on Ubuntu.
> 
> 1) PROBLEM AND FIX
> The reason for the FTBFS is that libgadu is not detected by cmake in a clean
> build environment. cmake executes the command "/usr/bin/pkg-config --exists
> libgadu": this fails because pkg-config can not find the package "gnutls",
> as shown by:
> --------------
> #> if `/usr/bin/pkg-config --exists libgadu`; then echo 1; else echo 0; fi
> 0
> 
> #> /usr/bin/pkg-config --exists libgadu --print-errors
> Package gnutls was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gnutls.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'gnutls', required by 'libgadu', not found
> --------------
> 
> Installing the package "libgnutls-dev" is sufficient to fix the problem (and
> that is the reason why on my local machine the build was successful):
> --------------
> #> if `/usr/bin/pkg-config --exists libgadu`; then echo 1; else echo 0; fi
> 1
> 
> #> /usr/bin/pkg-config --exists libgadu --print-errors
> <No output>
> --------------
> 
> I verified that after adding "libgnutls-dev" to the control file (see
> patch), tdenetwork builds properly in Jessie.
> 
> 
> 2) REASON OF PROBLEM
> I have not (yet) been able to find what triggered the problem. I last
> successfully built tdenetwork on Apr. 26 and I discovered a FTBFS on May 4/5.
> The last change to cmake and cmake-data package is dated Mar.30, the last
> change to pkg-congif is dated Apr.23.
> Even more strange, checking the log file of the nightly build website (dated
> Apr. 29) I can see that the libgnutls-dev package was not installed and the
> following message appears:
> ---------------------
> -- checking for one of the modules 'libgadu'
> Package gnutls was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gnutls.pc'
> to the PKG_CONFIG_PATH environment variable
> [repeated several times]
> ---------------------
> But the build process continued correctly until the end.
> 
> Adding the "libgnutls-dev" to the control file would also fix those
> messages, but yet I am wondering what has changed.
> 
> 
> 3) UBUNTU PROBLEM (?)
> Checking the availability of "libgnutls-dev" for Ubuntu, is looks like some
> releases do not have such package, specifically maverick, natty, oneiric,
> quantal.
> http://packages.ubuntu.com/search?keywords=libgnutls-dev
> So the same solution can no be applied, provided the same problem arise.
> 
> How do you think we should move forward?

Ubuntu has a habit of splitting monolithic packages into many smaller packages somewhat at random.  My best guess as to what happened (without diving into the Ubuntu changelogs) would be that one or more packages happened to build-dep on libgnutls-dev, and that this was fixed/changed upstream rather recently, thus exposing our failure to properly build-dep on libgnutls-dev where needed.

FYI, maverick, natty, oneiric, and quantal are no longer searchable on packages.ubuntu.com due to deprecation and removal.  libgnutls-dev exists on those platforms, so don't worry about it.

Tim
Comment 3 Slávek Banko 2014-05-10 03:35:52 CDT
Interesting. Previously, libgnutls-dev installed because of dependencies for tdelibs14-trinity-dev. On Jessie not.

As Tim said, on all currently supported Ubuntu package libgnutls-dev exists, you can safely add a dependency. So, go ahead and push the patch.
Comment 4 Michele Calgaro 2014-05-10 04:28:26 CDT
Tim, Slavek, thanks for your feedback.
Fixed in commit ab15c5b.
Comment 5 Timothy Pearson 2014-11-03 01:38:21 CST
Unfortunately I have to reopen this, and unfortunately it's currently blocking R14 RC1.  The changes to the tdenetwork packaging have made it unbuildable on Ubuntu Precise through Trusty; an example of the build failure is shown in this log: 

https://librarian.quickbuild.pearsoncomputing.net/6539934/buildlog_ubuntu-precise-amd64.tdenetwork-trinity_4%3A14.0.0-r363-0ubuntu12.04.0%2Bpr53_MANUALDEPWAIT.txt.gz

What it boils down to is the new or select is preferentially choosing libgnutls28-dev over libgnutls-dev when looking for gnutls-dev.  While this may seem innocuous the core TDE development packages depend on libcups2-dev, which in turn depends on libgnutls-dev.  Due to this conflict apt is unable to fulfill all build dependencies as shown above and the builds fail.

Do we need the dependency on gnutls-dev or can we hard depend on libgnutls-dev?

Thanks!
Comment 6 Michele Calgaro 2014-11-03 04:06:08 CST
> What it boils down to is the new or select is preferentially choosing 
> libgnutls28-dev over libgnutls-dev when looking for gnutls-dev
Tim, when did the problem start happening? I do not build for Ubuntu, but the fix for this bug went in about 6 months ago, so I find quite strange that we didn't spot it before.
Comment 7 Slávek Banko 2014-11-03 04:14:44 CST
(In reply to Michele Calgaro from comment #6)
> > What it boils down to is the new or select is preferentially choosing 
> > libgnutls28-dev over libgnutls-dev when looking for gnutls-dev
> Tim, when did the problem start happening? I do not build for Ubuntu, but
> the fix for this bug went in about 6 months ago, so I find quite strange
> that we didn't spot it before.

This relates to commit 2fc1e7d9 (relates to libgadu update on Jessie).

Here again showed difference in processing dependencies between build-farm and pbuilder. For me, everything builds perfectly fine with pbuilder.

I'll take care of it.
Comment 8 Timothy Pearson 2014-11-03 08:55:33 CST
(In reply to Slávek Banko from comment #7)
> (In reply to Michele Calgaro from comment #6)
> > > What it boils down to is the new or select is preferentially choosing 
> > > libgnutls28-dev over libgnutls-dev when looking for gnutls-dev
> > Tim, when did the problem start happening? I do not build for Ubuntu, but
> > the fix for this bug went in about 6 months ago, so I find quite strange
> > that we didn't spot it before.
> 
> This relates to commit 2fc1e7d9 (relates to libgadu update on Jessie).
> 
> Here again showed difference in processing dependencies between build-farm
> and pbuilder. For me, everything builds perfectly fine with pbuilder.
> 
> I'll take care of it.

Sounds good.  One of the reasons for using QuickBuild (a rebranded Launchpad instance) vs. a custom setup is that the former is both ubiquitous (every Ubuntu user knows about PPAs!) and very strict.  Ubuntu rebuilds their entire base archives on their Launchpad system, so I am fairly confident in saying pbuilder is doing something wrong here.
Comment 9 Slávek Banko 2014-11-03 18:11:05 CST
(In reply to Timothy Pearson from comment #8)
> (In reply to Slávek Banko from comment #7)
> > (In reply to Michele Calgaro from comment #6)
> > > > What it boils down to is the new or select is preferentially choosing 
> > > > libgnutls28-dev over libgnutls-dev when looking for gnutls-dev
> > > Tim, when did the problem start happening? I do not build for Ubuntu, but
> > > the fix for this bug went in about 6 months ago, so I find quite strange
> > > that we didn't spot it before.
> > 
> > This relates to commit 2fc1e7d9 (relates to libgadu update on Jessie).
> > 
> > Here again showed difference in processing dependencies between build-farm
> > and pbuilder. For me, everything builds perfectly fine with pbuilder.
> > 
> > I'll take care of it.
> 
> Sounds good.  One of the reasons for using QuickBuild (a rebranded Launchpad
> instance) vs. a custom setup is that the former is both ubiquitous (every
> Ubuntu user knows about PPAs!) and very strict.  Ubuntu rebuilds their
> entire base archives on their Launchpad system, so I am fairly confident in
> saying pbuilder is doing something wrong here.

With pbuilder dependencies for package is resolved by creating an empty package (pbuilder-satisfydepends-dummy) with these dependencies, and then uses standard aptitude to install dependencies in a clean chroot. Does not have its own specific magic. I definitely would not say that pbuilder doing something wrong, because the dependencies are installed by a standard aptitude :)

I hope to problem is fixed by commit 0b8b58d1.
Comment 10 Timothy Pearson 2014-11-06 09:29:27 CST
Much closer, but Utopic still fails:
https://librarian.quickbuild.pearsoncomputing.net/6546984/buildlog_ubuntu-utopic-amd64.tdenetwork-trinity_4%3A14.0.0-r363-0ubuntu14.10.0%2Bpr54_MANUALDEPWAIT.txt.gz

Checking correctness of source dependencies...
After installing, the following source dependencies are still unsatisfied:
libgadu-dev(inst 1:1.12.0-3 ! >> wanted 1:1.12.0-3)|libgnutls-dev(missing)

My first instict is to change that >> to >= ; is there any reason why this should not be done?

Regarding pbuilder vs. launchpad, almost every Ubuntu package (official or custom) goes through a Launchpad-based build process.  A very few custom packages (such as the ones you are building) go through a pbuilder-based build process.  As a result, even if pbuilder is more correct (which I still doubt) market share alone dictates that we get these packages to build properly on Launchpad.

Thanks!

Tim
Comment 11 Slávek Banko 2014-11-06 21:21:38 CST
The point is that 'libgadu-dev' needs gnutls devel package, but only starting with version 1:1.12.0-4 has it as a dependency. Therefore, the condition to version >> 1.1.12.0-3 is correct.

I have good news! Pbuilder has a choice of dependency solver - namely classic, aptitude, gdebi and experimental. As I tested, the first three will solve the dependency correctly, only experimental behaves the same as the build-farm. It therefore seems a good way to test locally on pbuilder before commit!

Anyway, from what I can see, so solver 'experimental' ignores version condition (ie >>1:1.12.0-3) at the time of selection from variable dependencies, and this condition is checked when it is too late => causes FTBFS. This really is not the correct behavior.

Since the conflict libgnutls-dev x libgnutls28-dev, which previously appeared in debian testing, has been resolved by removing libgnutls-dev, it was possible to modify the condition so that on the build-farm should work correctly.

Should be resolved in commit e9a77f2a.
Comment 12 Timothy Pearson 2014-11-07 15:58:24 CST
With the exception of a failure on Utopic amd64 (which looks like an Ubuntu-specific transient bug) tdenetwork now builds properly.

Thanks for the fix, and the information about pbuilder!