On Mon, Oct 28, 2019 at 02:21:48PM +0100, Charlene Wendling wrote:
> On Sun, 27 Oct 2019 10:03:44 +0100
> Marc Espie wrote:
>
>
> As you already know i managed to build it with -O1. It failed early
> with ports-clang, so i've moved it back to ports-gcc, here are
> the build and test logs [0].
>
> > In case you manage to build it, note that some of the tests
> > WILL fail.
>
> It's worse than that, most of them are timing out. I had to manually
> run ctest with a 4 minutes timeout to actually being able to
> run them all and it still lasted 3 hours.
>
> > After all, this is a library of probabilistic software...
> > some of their thresholds are set up that sometimes, the test
> > doesn't find the right solution.
> >
> > Yeah, *facepalm* right ?
>
> Well, it gives at least some indications about how the software behaves,
> especially on exotic archs.
>
> I'm still providing the diff despite how tests are faring, it's your
> call in the end :)
>
> Charlène.
>
>
> [0] https://bin.charlenew.xyz/mlpack-O1.tgz
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/math/mlpack/Makefile,v
> retrieving revision 1.8
> diff -u -p -u -p -r1.8 Makefile
> --- Makefile 27 Oct 2019 09:02:39 -0000 1.8
> +++ Makefile 28 Oct 2019 13:18:46 -0000
> @@ -4,6 +4,7 @@ COMMENT-main = C++ machine learning lib
> COMMENT-python = python bindings to C++ machine learning library
>
> V = 3.1.1
> +REVISION = 0
> DISTNAME = mlpack-$V
> SHARED_LIBS += mlpack 1.0 # 3.0
> CATEGORIES = math
> @@ -28,7 +29,7 @@ WANTLIB-main = ${WANTLIB} armadillo \
> boost_program_options-mt boost_serialization-mt \
> boost_unit_test_framework-mt c
>
> -COMPILER = base-clang ports-clang ports-gcc
> +COMPILER = base-clang ports-gcc
>
> WANTLIB-python = ${WANTLIB} ${MODPY_WANTLIB} boost_serialization
>
> @@ -80,5 +81,11 @@ SITEDIR = lib/python${MODPY_VERSION}/si
> EGGDIR = ${SITEDIR}/mlpack-$V-py${MODPY_VERSION}.egg-info
>
> SUBST_VARS += EGGDIR SITEDIR
> +
> +# Fix OOM error
> +.if ${MACHINE_ARCH:Mpowerpc}
> +CFLAGS = -O1 -pipe
> +CXXFLAGS = -O1 -pipe
> +.endif
>
> .include <bsd.port.mk>
>
>
Okay.