On Thu, 3 Jan 2019 13:50:26 +0100, Otto Moerbeek wrote:
> Hi,
>
> currently, boost does not build on arm64, since there is dependency of
> boost on py-numpy. py-numpy is not available since building it
> requires a fortran compiler (g95 in gcc 4.9) which is not available on
> arm64, therefore boost is not build:
>
> ===> py-numpy-1.14.6 depends on: g95->=4.9.4p0,<4.10 - not found
> ===> Verifying install for g95->=4.9.4p0,<4.10 in lang/gcc/4.9
> ===> g95-4.9.4p15 is only for alpha amd64 arm hppa i386 mips64
> mips64el powerpc sparc64, not aarch64 (arm64) .
>
> If I comment out the dependency and adapt the plist with a big hammer,
> I can build boost and boost-md and it runs fine.
>
> What is the best way to handle this in ports?
GCC 8.2.0 works fine on aarch64. As soon as someone ok's the import, we
could try having ports-gcc and fortran use lang/gcc/8 on arm64.
Alternatively, there's lang/flang (LLVM-based), but that doesn't work on
aarch64 yet either ...
> Is there a nice way to say:
>
> if libnumpy is not avaialable
> skip this dependency and adapt the plist
>
> or alternatively, if no fortran compiler is available?
>
> I have attached my big hammer diff, but that is obviously not the way
> to do it,
>
> -Otto
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/boost/Makefile,v
> retrieving revision 1.79
> diff -u -p -r1.79 Makefile
> --- Makefile 24 Dec 2018 23:34:27 -0000 1.79
> +++ Makefile 29 Dec 2018 15:46:42 -0000
> @@ -82,15 +82,18 @@ MODULES= lang/python
> MODPY_RUNDEP= No
>
> BUILD_DEPENDS+= lang/python/${MODPY_DEFAULT_VERSION_2} \
> - lang/python/${MODPY_DEFAULT_VERSION_3} \
> - math/py-numpy
> + lang/python/${MODPY_DEFAULT_VERSION_3}
>
> LIB_DEPENDS= archivers/bzip2 \
> textproc/icu4c
>
> .include <bsd.port.arch.mk>
> -.if !(${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" ||
> ${MACHINE_ARCH} == "arm")
> +.if !(${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" ||
> ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "aarch64")
> BUILD_PACKAGES= ${MULTI_PACKAGES:N-md}
> +.endif
> +
> +.if (${MACHINE_ARCH} != "aarch64")
> +BUILD_DEPENDS+= math/py-numpy
> .endif
>
> .if ${PROPERTIES:Mclang}
> Index: pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/devel/boost/pkg/PLIST-main,v
> retrieving revision 1.6
> diff -u -p -r1.6 PLIST-main
> --- pkg/PLIST-main 13 Dec 2018 19:52:46 -0000 1.6
> +++ pkg/PLIST-main 29 Dec 2018 15:46:42 -0000
> @@ -14098,10 +14098,6 @@ lib/libboost_math_tr1l-mt.a
> @lib lib/libboost_math_tr1l-mt.so.${LIBboost_math_tr1l-mt_VERSION}
> lib/libboost_math_tr1l.a
> @lib lib/libboost_math_tr1l.so.${LIBboost_math_tr1l_VERSION}
> -lib/libboost_num${MODPY_PY_PREFIX}mt.a
> -@lib lib/libboost_num${MODPY_PY_PREFIX}mt.so.${LIBboost_numpy-mt_VERSION}
> -lib/libboost_numpy.a
> -@lib lib/libboost_numpy.so.${LIBboost_numpy_VERSION}
> lib/libboost_prg_exec_monitor-mt.a
> @lib
> lib/libboost_prg_exec_monitor-mt.so.${LIBboost_prg_exec_monitor-mt_VERSION}
> lib/libboost_prg_exec_monitor.a
>
>
>