Building packages on exotic archs

What we learnt from it, and why participating in global warming

Landry Breuil <landry@openbsd.org>

EuroBSDCon 2016 / Sep,25 / Belgrade

Who ?

Archs

Me ?

Hardware

Setup

Workflow

Results over time

Build times comparison

Depends where the jobs are dispatched (master/slave), if big packages build..

archGtk+3QT4Full bulk
i38612m<3h24h
amd6420m~3/4h17h
hppa1h45/2h<24h5/10d
sparc641h30~19h2/3w
macppc2h~26h2/3w
alpha<2h30~35h2/3w

Usefulness ?

Usefulness ?

August 2016 downloads on ftp.fr, snapshots and releases, not excluding dupes in IPs, excluding bots

archpkgsquirks
amd64250k/w6k/w
i38630k/w700/800/w
macppc5k/m75/m
sparc64300/m7/m
hppa00
alpha00
	zegrep -c /packages/$arch/.*.tgz.*OpenBSD.ftp /var/www/logs/access.log*
	

Usefulness ?

When the s*** hits the fan

Platform^W^WToolchain deficiencies

Bad coding practices

-Werror + ugly casts.. fail

speaking of casts.. graphics/blender:

(CUdeviceptr)((uchar*)mem.device_pointer + offset)
error: cast from 'ccl::uchar*' to 'CUdeviceptr' loses precision

Hw/OS assumptions

I'm not a number, i'm a free man!

#ifdef sparc
#include <malloc.h>
#endif

Mo-mo-monster code

all the world is x86 (or arm!)

all the world is big endian!

Little-endian codepaths probably never tested..
..
#elif defined(__sparc) || defined(__sparc__) || \
      defined(_POWER) || defined(__hppa) || \
      defined(_MIPSEB) || defined(_BIG_ENDIAN)
..

blindly add ||defined(arch)? or just use #include <endian.h> FFS!

But should i use BYTE_ORDER, _BYTE_ORDER, __BYTE_ORDER, or __BYTE_ORDER__ ? __ORDER_PDP_ENDIAN__ ?

Sloppy port workarounds

MODULES +=              gcc4 lang/clang
MODGCC4_ARCHS =         powerpc sparc64 alpha
MODGCC4_LANGS =         c c++
MODCLANG_ARCHS =        amd64 i386
MODCLANG_LANGS =        c c++

GCC 4.6 on alpha, 4.9 on others.... but what about hppa here ?

Real problems in OpenBSD (headers)

Fixes in the base system/kernel

(re-)Fixes at least net/net-snmp, sysutils/gkrellm/gkrellm,-client, sysutils/xuvmstat and sysutils/bubblemon-dockapp on alpha.

But you need to get a basesys/kernel developer involved...

The bad & ugly

Lots of code builds, but is never run... except when running tests, or validating something during fake

We keep stuff building/packaging just for dependencies even if they're known broken (hello webkit, spidermonkey...)

Long way to go, but..

We have the BROKEN marker

sqlite> select arch, count(fullpkgpath) as c from broken group by arch order by c desc;
hppa|197
sparc64|58
alpha|57
...
macppc|4

http://build-failures.rhaalovely.net/

Hopeless ?

If you use something, show some love and fixit

http://v4.freshbsd.org/search?q=BROKEN&committer[]=landry

src

Questions ?

Slides on http://rhaalovely.net/~landry/eurobsdcon2016/

Thanks for listening, thanks to EuroBSDCon for the trip!

/

#