Bug 1197488

Summary: RFE: Please add "Provides: coin-or-cppad = %{version}-%{release}" and "Provides: coin-or-cppad-devel = %{version}-%{release}"
Product: [Fedora] Fedora Reporter: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Component: cppadAssignee: Brad Bell <bradbell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anto.trande, bradbell
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-12 15:32:19 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 894600, 894609    

Description Paulo Andrade 2015-03-01 18:23:06 UTC
This should make it more clear the package
is part of the coin-or stack, as currently
these packages are now in Fedora:

coin-or-Sample
coin-or-CoinUtils
coin-or-Osi
coin-or-Clp
coin-or-Cgl
coin-or-Alps
coin-or-Bcps
coin-or-Vol
coin-or-Bcp
coin-or-Blis
coin-or-Cbc
coin-or-DyLP
coin-or-CoinMP
coin-or-FlopC++
coin-or-Ipopt
coin-or-Bonmin
coin-or-Couenne
coin-or-SYMPHONY

And these should be soon also; as build requires
are being built/updated:

coin-or-Dip
coin-or-OS

And this would be removed and no longer
submitted for review:
coin-or-cppad
( https://bugzilla.redhat.com/show_bug.cgi?id=894600 )

Comment 1 Brad Bell 2015-03-01 18:53:17 UTC
I think that the package
    https://admin.fedoraproject.org/pkgdb/package/cppad/
provides all the necessary functionality.

There may be an two issue here. 

1. CppAD, as configured for Fedora, does not test its use with Ipopt, because it does not need to depend on Ipopt. If Ipopt is present in the system, it is possible to build and run the CppAD Ipopt tests.

2. There is a deprecated cppad_ipopt object library that I do not think is being used by coin.

I think we should begin by just trying to use the current fedora / redhat install of CppAD to build the other coin packages that depend on it. If there are problems with this, then we can consider how to proceed.

Brad

Comment 2 Paulo Andrade 2015-03-01 19:16:04 UTC
I mean at first, but most cosmetically add extra provides:

$ rpm -q --provides cppad-devel
cppad = 20150000.4-3.fc22
cppad-devel = 20150000.4-3.fc22
pkgconfig(cppad) = 20150000.4

to also have:

coin-or-cppad = 20150000.4-3.fc22
coin-or-cppad-devel = 20150000.4-3.fc22


I can check what packages may use cppad, AFAIK none
has it as a "hard" requires.

About Ipopt, there is an issue, rooted at MUMPS where
there are two coin-or-Ipopt runtimes, one using
openmpi (parallel) and one not using it (serial).
For the coin-or-* packages that require Ipopt, I
added a build time option to use either, but
defaults to the serial one, for example, see the
with_mpi macro in
http://pkgs.fedoraproject.org/cgit/coin-or-Bonmin.git/tree/coin-or-Bonmin.spec

Comment 3 Brad Bell 2015-03-02 00:59:07 UTC
So you are suggesting that I add the following lines to the cppad spec file ?
    Provides: coin-or-cppad%{version}-%{release}
    Provides: coin-or-cppad-devel%{version}-%{release}

Comment 4 Brad Bell 2015-03-02 14:11:05 UTC
I think I have made the changes you requested. See the changes to cppad.spec in
http://pkgs.fedoraproject.org/cgit/cppad.git/commit/?id=ab35867f883d9fa854d3f1ab78e90f4741fa9610

Comment 5 Paulo Andrade 2015-04-11 17:15:16 UTC
Hi Brad,

Sorry for only today going to get back on this, while
working on updating, and new coin-or packages...
But the change was incorrect, the lines should be added
to the cppad-devel package, not to the empty cppad
"metapackage" package.

$ rpm -q --provides cppad-devel
cppad = 20150000.9-1.fc23
cppad-devel = 20150000.9-1.fc23
pkgconfig(cppad) = 20150000.9

$ rpm -q --changelog cppad-devel | grep coin-or
- 3: Add Provides coin-or-cppad.
- https://projects.coin-or.org/CppAD/changeset/1698
- https://projects.coin-or.org/CppAD/changeset/1664
- Change download directory to standard coin-or location.

Cut&paste of the diff that would work.

---8<---
$ git diff
diff --git a/cppad.spec b/cppad.spec
index 7ba400e..9454f38 100644
--- a/cppad.spec
+++ b/cppad.spec
@@ -30,11 +30,6 @@ Source: http://www.coin-or.org/download/source/CppAD/%{name}-%{version}.gpl.tgz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: cmake >= 2.8
 
-# Requested by bug report
-#      https://bugzilla.redhat.com/show_bug.cgi?id=1197488
-Provides: coin-or-cppad = %{version}-%{release}
-Provides: coin-or-cppad-devel = %{version}-%{release}
-
 %description
 C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc.
 
@@ -44,6 +39,10 @@ Summary: The %{name} C++ include files for Algorithmic Differentiation (AD)
 BuildArch: noarch
 Group: Development/Libraries
 Provides: %{name} = %{version}-%{release}
+# Requested by bug report
+#      https://bugzilla.redhat.com/show_bug.cgi?id=1197488
+Provides: coin-or-cppad = %{version}-%{release}
+Provides: coin-or-cppad-devel = %{version}-%{release}
 
 %description devel
 We refer to the step by step conversion from an algorithm that computes 
---8<---

Comment 6 Paulo Andrade 2015-04-11 18:21:02 UTC
*** Bug 894600 has been marked as a duplicate of this bug. ***

Comment 8 Paulo Andrade 2015-04-12 15:32:19 UTC
I downloaded the packages from koji (was not yet in mirrors),
"rpm -Fvh" them, and now it works as expected:

$ sudo rpm -Fvh ~/Downloads/cppad-d*
Preparing...                          ################################# [100%]
Updating / installing...
   1:cppad-devel-20150000.9-2.fc23    ################################# [ 50%]
Cleaning up / removing...
   2:cppad-devel-20150000.9-1.fc23    ################################# [100%]
$ rpm -q --provides cppad-devel
coin-or-cppad = 20150000.9-2.fc23
coin-or-cppad-devel = 20150000.9-2.fc23
cppad = 20150000.9-2.fc23
cppad-devel = 20150000.9-2.fc23
pkgconfig(cppad) = 20150000.9
$ sudo dnf install coin-or-cppad-devel
Using metadata from Sat Apr 11 13:34:21 2015 (22:55:01 hours old)
Package cppad-devel-20150000.9-2.fc23.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

Comment 9 Brad Bell 2015-04-12 15:57:47 UTC
I would like make sure that this works the way that CppAD is used by the rest of the coin packages. The normal system install of CppAD puts cppad.hpp in
   /usr/include/cppad/cppad.hpp
I am worried that the coin packages are expecting it to be in
   /usr/include/coin/cppad/cppad.hpp

Comment 10 Paulo Andrade 2015-04-12 16:11:50 UTC
I think it did just work. As far as I remember, coin-or-OS
(Optimization Services) has a hard requires on CppAD, and
it is building fine, so I suppose it is a good enough
directory, that coin-or-OS finds in in configure.

Comment 11 Brad Bell 2015-04-12 22:04:00 UTC
Just in case you use this with an older version that rawhide,

I pushed the change to the f22 branch; see
http://koji.fedoraproject.org/koji/taskinfo?taskID=9464332

and the f21 branch; see
http://koji.fedoraproject.org/koji/taskinfo?taskID=9465472

Comment 12 Paulo Andrade 2015-04-13 20:04:11 UTC
Just to confirm as well :)

$ pwd
/home/pcpa/rpmbuild/BUILD/OS-2.9.2

$ grep -i cppad src/config.h
/* Define to 1 if the cppad package is available */
#define COIN_HAS_CPPAD 1
/* Define to 1 if OS uses CppAD */
#define OS_HAS_CPPAD 1