Saturday, December 08, 2018

Re: boost diff

+cc boost co-maintainers

On 2018/12/04 11:34, Otto Moerbeek wrote:
> On Sat, Dec 01, 2018 at 08:16:33PM +0100, Otto Moerbeek wrote:
>
> > On Fri, Nov 30, 2018 at 01:06:18PM +0000, Stuart Henderson wrote:
> >
> > > On 2018/11/30 13:53, Otto Moerbeek wrote:
> > > > No luck on i386 so far. sp;arc64 ios also not going to work, since the
> > > > boost context lib has no sparc64 support at al. In the meantime I'm
> > > > building arm boost, but that takes ages, it;s now building the
> > > > gcc-4.9.4 port needed by some boost dependency...
> > > >
> > > > Can the impact analysis be done on amd64?
> > >
> > > It can, but not by me, the only bulk building environment I have is i386.
> > > If there's someone who can do a test bulk build with the diff and run
> > > this under script(1) and send me the output (there will be a lot as we
> > > haven't done a WANTLIB sync for ages) I'll look over it ..
> > >
> > > cd /usr/ports/packages/amd64/all
> > > /usr/ports/infrastructure/bin/check-lib-depends -d . -q -x ./*
> > >
> >
> > Ib the meantime I built patched boost on arm, and tests work out fine
> > (including pdns_recusror).
> >
> > -Otto
> >
>
> The status so far:
>
> amd64: boost context is working fine
>
> i386: only working with a very simple test program, anything using fp crashes
>
> arm: working fine.
>
> aarch64: after getting boost to build by skipping the numpy dependency
> (which does not build since there is no gcc 4.9 which is
> required to build fortran dependencies) it also works.
>
> So all in all I think boost context can be enabled for amd64 and arm
> at this moment, provided it does not break anything else. For that I
> need the report sthen@ described above. Any takers?
>
> If the above report looks good I'll submit a full diff, converting all stack
> allocaters to use the proper mmap flag and enabling context only for
> amd64 and arm. We can look at aarch64 and i386 later.
>
> -Otto
>

Thanks to core developer ajacoutot@ ;) for the bulk build which is
looking good (no failures, nothing unintended picking up the new
libraries in a check-lib-depends run).

Here's a modified version of Otto's diff. Rather than using PFRAG.<arch>
files I've adjusted it to split the new libraries off to a subpackage
built only on the relevant architectures; this needs REVISION bumps in
dependent ports (which I can handle), that way ports requiring these
libraries (e.g. powerdns recursor when ready) can just depend on the
subpackage, and keep the machine-dependent parts in one place (boost).

Any comments? Does this seem like the right approach? We could use
selective included PFRAG files and a single package instead but as I see
it the only advantage is not having to bump dep's.


:| OK, so here's my diffs to be processed further. It contains the i386
:| assembly stuff, the stack allocation changes and also a diff to the b2
:| build process to make it not consume 100% cpu. That's an ugly diff,
:| but I didn't find the actual cause of the zero timeout to the poll()
:| call yet.

(The latter-mentioned diff is the select_timeout patch.)



Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/boost/Makefile,v
retrieving revision 1.75
diff -u -p -r1.75 Makefile
--- Makefile 11 Sep 2018 19:26:14 -0000 1.75
+++ Makefile 8 Dec 2018 20:56:23 -0000
@@ -1,13 +1,15 @@
# $OpenBSD: Makefile,v 1.75 2018/09/11 19:26:14 sthen Exp $

-COMMENT= free peer-reviewed portable C++ source libraries
+COMMENT-main= free peer-reviewed portable C++ source libraries
+COMMENT-md= machine-dependent libraries for boost

# XXX if updating, try to remove -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
# XXX in archivers/innoextract
VERSION= 1.66.0
DISTNAME= boost_${VERSION:S/./_/g}
-PKGNAME= boost-${VERSION}
-REVISION= 0
+PKGNAME-main= boost-${VERSION}
+PKGNAME-md= boost-md-${VERSION}
+REVISION-main= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=boost/}
EXTRACT_SUFX= .tar.bz2
@@ -45,7 +47,18 @@ BOOST_LIBS= boost_atomic-mt \
boost_unit_test_framework-mt boost_unit_test_framework \
boost_wserialization-mt boost_wserialization \
boost_wave-mt \
- boost_type_erasure-mt boost_type_erasure \
+ boost_type_erasure-mt boost_type_erasure
+
+# MD
+BOOST_LIBS+= boost_context-mt \
+ boost_coroutine boost_coroutine-mt \
+ boost_fiber-mt \
+ boost_stacktrace_basic \
+ boost_stacktrace_basic-mt \
+ boost_stacktrace_addr2line \
+ boost_stacktrace_addr2line-mt \
+ boost_stacktrace_noop \
+ boost_stacktrace_noop-mt

.for _lib in ${BOOST_LIBS}
SHARED_LIBS+= ${_lib} ${SO_VERSION}
@@ -63,6 +76,8 @@ WANTLIB += ${COMPILER_LIBCXX} bz2 c icud

COMPILER= base-clang ports-gcc

+MULTI_PACKAGES= -main -md
+
MODULES= lang/python
MODPY_RUNDEP= No

@@ -74,6 +89,10 @@ LIB_DEPENDS= archivers/bzip2 \
textproc/icu4c

.include <bsd.port.arch.mk>
+.if !(${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm")
+BUILD_PACKAGES= ${MULTI_PACKAGES:N-md}
+.endif
+
.if ${PROPERTIES:Mclang}
TOOLSET= clang
.else
@@ -102,7 +121,9 @@ BOOTSTRAP= --with-bjam=${WRKSRC}/bjam \
# 'context' and 'coroutine' use MD bits and miss support for Alpha,
# PA-RISC, SPARC and SuperH. The author does not care
# about adding support for Alpha and PA-RISC.
+.if !${BUILD_PACKAGES:M-md}
BOOTSTRAP+= --without-libraries=context,coroutine,fiber,stacktrace
+.endif

PY2_BOOTSTRAP= --with-python=${LOCALBASE}/bin/python${MODPY_DEFAULT_VERSION_2} \
--with-python-version=${MODPY_DEFAULT_VERSION_2} \
Index: patches/patch-boost_context_fixedsize_stack_hpp
===================================================================
RCS file: patches/patch-boost_context_fixedsize_stack_hpp
diff -N patches/patch-boost_context_fixedsize_stack_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-boost_context_fixedsize_stack_hpp 8 Dec 2018 20:56:23 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+Index: boost/context/fixedsize_stack.hpp
+--- boost/context/fixedsize_stack.hpp.orig
++++ boost/context/fixedsize_stack.hpp
+@@ -26,6 +26,8 @@
+ # include BOOST_ABI_PREFIX
+

No comments:

Post a Comment