Bug 1311694

Summary: cppunit-config gone?
Product: [Fedora] Fedora Reporter: Dave Olsthoorn <dave>
Component: cppunitAssignee: David Tardon <dtardon>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dtardon, sergio, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-25 06:24:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dave Olsthoorn 2016-02-24 18:29:49 UTC
Description of problem:
In newer versions of the cppunit package, the tool cppunit-config is removed (without warning). This breaks the cppunit autotools macro that the ola[1] package uses (It is a common macro, so there are probably other packages that are affected)[2].

[1]. https://apps.fedoraproject.org/packages/ola
[2]. http://svn.apache.org/repos/asf/qpid/tags/0.18/qpid/cpp/m4/cppunit.m4


Version-Release number of selected component (if applicable):
cppunit-devel-1.13.2-2

How reproducible:
Try and compile ola, since they use the cppunit macro

Steps to Reproduce:
1. fedpkg clone rpms/ola
2. fedpkg switch-branch f23 // I fixed rawhide/master, but in a not desirable way for upstream
3. fedpkg --dist master mockbuild

Actual results:
The build fails, complaining about missing cppunit

Expected results:
The build finishes

Additional info:
While you might think this is a bug on my part, I wanted to know what was going on with rawhide, since I saw you reverted f23 back to the version with cppunit-config.

Comment 2 David Tardon 2016-02-25 06:24:08 UTC
cppunit-config will be removed in the next upstream release. cppunit.pc has been around for 10 years--I doubt there are any production systems that have cppunit so old that cppunit.pc is not present, so there is absolutely no reason to provide another configuration tool.

Btw, I fixed all rawhide packages that depend on cppunit-devel and use either cppunit-config or AM_PATH_CPPUNIT (IIRC there were only 4-5 of them). I ignored packages depending on pkgconfig(cppunit), because to me that means that they actually _use_ pkg-config...

Comment 3 David Tardon 2016-02-25 06:35:09 UTC
(In reply to Dave Olsthoorn from comment #0)
> 2. fedpkg switch-branch f23 // I fixed rawhide/master, but in a not
> desirable way for upstream

You should drop all references to cppunit-config and use PKG_CHECK_MODULES unconditionally.

Re upstream's objections: I'd very much like to see a (real) system that has >10 years old cppunit, but at the same time has libudev, avahi, protobuf, etc... So IMHO they are just being obstinate.

Comment 4 Dave Olsthoorn 2016-02-25 11:20:17 UTC
> Btw, I fixed all rawhide packages that depend on cppunit-devel and use either cppunit-config or AM_PATH_CPPUNIT

well, ola uses the AM_PATH_CPPUNIT macro so I find that hard to believe. I'll just use PKG_CONFIG_CHECK instead. 

Thanks for the explanation about what was happening, since I was a bit confused about what was going on.

Comment 5 Dave Olsthoorn 2016-02-25 11:30:30 UTC
(In reply to Dave Olsthoorn from comment #4)
> I'll just use PKG_CONFIG_CHECK instead. 

I meant PKG_CHECK_MODULES of course :)

Comment 6 David Tardon 2016-02-25 12:35:13 UTC
(In reply to Dave Olsthoorn from comment #4)
> > Btw, I fixed all rawhide packages that depend on cppunit-devel and use either cppunit-config or AM_PATH_CPPUNIT
> 
> well, ola uses the AM_PATH_CPPUNIT macro so I find that hard to believe.
> I'll just use PKG_CONFIG_CHECK instead. 

You cut off the second sentence: "I ignored packages depending on pkgconfig(cppunit), because to me that means that they actually _use_ pkg-config..."

Comment 7 Sergio Basto 2018-05-02 19:29:57 UTC
(In reply to Raphael Groner from comment #1)
> See
> http://pkgs.fedoraproject.org/cgit/rpms/cppunit.git/commit/
> ?id=178f2e9af88cd6e9170ac9eca57b65b18cd3f8fc

I need these headers to build schroot.

@Dave can you post your example ? 
Now I'm with problem in linkage

--- schroot-1.6.10-4/configure.ac       2014-05-05 21:28:59.000000000 +0100
+++ schroot-1.6.10/configure.ac 2018-05-02 17:47:33.102935673 +0100
@@ -271,7 +271,7 @@ ACX_PTHREAD([], [AC_MSG_ERROR([POSIX thr
 AC_CANONICAL_HOST
 AC_DISABLE_SHARED
 AC_ENABLE_STATIC
-AC_PROG_LIBTOOL
+LT_INIT
 AM_GNU_GETTEXT_VERSION([0.16])
 AM_GNU_GETTEXT([external])
 AC_PATH_PROG([PO4A], [po4a])
@@ -336,7 +336,8 @@ PKG_CHECK_MODULES([UUID], [uuid],
                   [HAVE_UUID=yes],
                   [HAVE_UUID=no])
 
-AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes])
+PKG_CHECK_MODULES([UUID], [cppunit],
+                  [HAVE_CPPUNIT=yes])
 AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"])

Comment 8 Sergio Basto 2018-05-02 20:18:19 UTC
never mind ,schroot now use cmake , so I don't need fix autotools ..
Sorry for inconvenience

Comment 9 David Tardon 2018-05-03 06:53:37 UTC
@sergio: It's a copypasta bug:

+PKG_CHECK_MODULES([UUID], [cppunit],
---------------------^