You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Maho NAKATA <ma...@apache.org> on 2012/01/26 14:54:01 UTC

coinmp on FreeBSD

Hi Pedro,

please apply following patch!

--- /dev/null	2012-01-26 22:45:15.000000000 +0900
+++ ext_libraries/coinmp/CoinMP-1.6.0.patch	2012-01-26 22:33:30.000000000 +0900
@@ -0,0 +1,23 @@
+--- misc/CoinMP-1.6.0/Cbc/src/CbcEventHandler.hpp	2011-06-20 02:23:14.000000000 +0900
++++ misc/build/CoinMP-1.6.0/Cbc/src/CbcEventHandler.hpp	2012-01-26 22:17:47.000000000 +0900
+@@ -47,6 +47,7 @@
+ */
+ 
+ #include <map>
++#include <cstddef>
+ 
+ /* May well already be declared, but can't hurt. */
+ 
+--- misc/CoinMP-1.6.0/Cbc/src/CbcSolver.cpp	2011-11-01 08:34:55.000000000 +0900
++++ misc/build/CoinMP-1.6.0/Cbc/src/CbcSolver.cpp	2012-01-26 22:32:46.000000000 +0900
+@@ -1665,10 +1665,6 @@
+ 	    }
+ 	    sprintf(generalPrint + strlen(generalPrint),
+ 		    "Build Date: %s \n", __DATE__);
+-#ifdef CBC_SVN_REV
+-	    sprintf(generalPrint + strlen(generalPrint),
+-		    "Revision Number: %d \n", CBC_SVN_REV);
+-#endif
+             generalMessageHandler->message(CLP_GENERAL, generalMessages)
+             << generalPrint
+             << CoinMessageEol;
--- ext_libraries/coinmp/makefile.mk.org	2012-01-26 22:02:39.000000000 +0900
+++ ext_libraries/coinmp/makefile.mk	2012-01-26 22:03:13.000000000 +0900
@@ -47,6 +47,8 @@
 BUILD_ACTION=$(GNUMAKE)
 .ENDIF
 
+PATCH_FILES=CoinMP-1.6.0.patch
+
 OUT2INC+=CoinMP$/src/CoinMP.h
 
 .IF "$(OS)"=="WNT"

Re: coinmp on FreeBSD

Posted by Pavel Janík <Pa...@Janik.cz>.
> TBH, I have no idea but apparently not only FreeBSD
> is affected:
> 
> https://projects.coin-or.org/BuildTools/ticket/93

Ugh. CoinMP expects the svn files to be available (they call svnversion in the configure time...):

    svn_rev_tmp=`LANG=en_EN svnversion $srcdir 2>/dev/null`
    if test "x$svn_rev_tmp" != xexported -a "x$svn_rev_tmp" != x; then
      CBC_SVN_REV=`echo $svn_rev_tmp | sed -n -e 's/^[0-9]*://' -e 's/\([0-9]\)[^0-9]*$/\1/p'`

cat >>confdefs.h <<_ACEOF
#define CBC_SVN_REV $CBC_SVN_REV
_ACEOF

OMG. That's pretty stupid from them.

And the bug is marked as worksforme. Hmm.

Anyone willing to tell them the reason for such issues?
-- 
Pavel Janík




Re: coinmp on FreeBSD

Posted by Pedro Giffuni <pf...@apache.org>.
--- Gio 26/1/12, Pavel Janík ha scritto:

> Hi,
> 
> On Jan 26, 2012, at 2:54 PM, Maho NAKATA wrote:
> 
> > please apply following patch!
> > +-#ifdef CBC_SVN_REV
> > +-        sprintf(generalPrint
> + strlen(generalPrint),
> > +-           
> "Revision Number: %d \n", CBC_SVN_REV);
> > +-#endif
> 
> why this?

TBH, I have no idea but apparently not only FreeBSD
is affected:

https://projects.coin-or.org/BuildTools/ticket/93

cheers,

Pedro.



Re: coinmp on FreeBSD

Posted by Pavel Janík <Pa...@Janik.cz>.
Hi,

On Jan 26, 2012, at 2:54 PM, Maho NAKATA wrote:

> please apply following patch!
> +-#ifdef CBC_SVN_REV
> +-	    sprintf(generalPrint + strlen(generalPrint),
> +-		    "Revision Number: %d \n", CBC_SVN_REV);
> +-#endif

why this?
-- 
Pavel Janík




R: coinmp on FreeBSD

Posted by Pedro Giffuni <pf...@apache.org>.
Hi Maho;

--- Gio 26/1/12, Maho NAKATA ha scritto:
...
> Hi Pedro,
> 
> please apply following patch!
> 

I committed it in rev. 1236229 with minor changes:

1. It looks like it's customary to keep patch files
in lowercase only.
2. I placed PATCH_FILES= line before BUILD_ACTION.
3. Sending patches within email is usually
problematic if copy/pasting.

cheers,

Pedro.

ps. I still wish for --with-system-coinmp