[Coin-discuss] stable version 1.3.3 of Clp no longer works with stable version 1.0 of CoinUtils

Laszlo Ladanyi ladanyi at us.ibm.com
Fri Jun 8 10:17:55 EDT 2007



On Fri, 8 Jun 2007 fmargot at andrew.cmu.edu wrote:

> 
> Compiling Cgl/stable/0.5 using as externals:
> 
> BuildTools    https://projects.coin-or.org/svn/BuildTools/stable/0.5
> Data/Netlib   https://projects.coin-or.org/svn/Data/releases/1.0.0/Netlib
> Data/Sample   https://projects.coin-or.org/svn/Data/releases/1.0.0/Sample
> CoinUtils     https://projects.coin-or.org/svn/CoinUtils/stable/1.0/CoinUtils
> Clp           https://projects.coin-or.org/svn/Clp/stable/1.3/Clp
> Osi           https://projects.coin-or.org/svn/Osi/stable/0.95/Osi
> Vol           https://projects.coin-or.org/svn/Vol/stable/1.0/Vol
> 
> that used to work, I now get:
> 
> ClpMain.o: In function `main':
> ClpMain.cpp:(.text+0x3df0): undefined reference to `CoinError::CoinError(CoinError const&)'
> ClpMain.cpp:(.text+0x3e00): undefined reference to `CoinError::print() const'
> ./.libs/libClp.a(ClpModel.o): In function `ClpModel::readMps(char const*, bool, bool)':
> ClpModel.cpp:(.text+0x105cb): undefined reference to `CoinError::CoinError(CoinError const&)'
> 
> 
> It seems that the creation of CoinError.*pp in CoinUtils in April is 
> responsible for this, as CoinError.hpp is not included in ClpMain.cpp. 
> Adding the include in ClpMain.cpp fix it. If other stable packages use 
> the stable version 1.0 of CoinUtils and CoinError, similar modifications are 
> needed.

CoinError.?pp is very old, it wasn't introduced in April. Also, ClpMain.cpp
has not been changed in a year either. My best guess is that through a
chain of includes CoinError.hpp used to get included in ClpMain.cpp, but
then one of the headers dropped the inclusion of CoinError.hpp, so ClpMain.cpp
does not get it now. It's a rather hopeless task to try to track down which
header is responsible... 

In any case, the correct fix is to include CoinError.hpp from ClpMain.cpp,
since a source file should include the header for every object it references
(in order to avoid exactly this sort of problem). I have committed the change
to the repository.

> 
> I thought that the only changes allowed in the stable version of a package
> should keep compatibility with other packages.

In theory, yes... In practice, glitches occur...

> 
> Francois
> 

--Laci




More information about the Coin-discuss mailing list