[Ukfreebsd] Report from last *BSD hack day

Sevan Janiyan venture37 at geeklan.co.uk
Mon Aug 22 17:54:56 BST 2016


We started with a double helping of yaks, Alex looked into packaging
ssh-chat[1] in pkgsrc but found missing dependencies which also need
packaging.
ICU is currently broken on systems without a C++11 compiler[2] which
affects building on PowerPC Macs and currently causes major package
breakage[3], we started look at the possibility of working around the
changes in the current ICU release so that it could be built with an
older toolchain.

"Is a friend of my friend my friend?" - Alex
Alex knows about C++ and explained that the ICU code is having friend
issues. Trying to help me understand the problem we referenced an old
version of the C++ book (second edition?) but it didn't explain much,
the draft std was also vague beyond stating that it wasn't transitive or
explicit. We moved on and started adding intermediate functions to
reference functions nested levels below to work around the relationships
but after working around 3 such problems, it appeared that more may be
present. We took a break for lunch at this point.

After lunch we looked into lua modules in pkgsrc, there are many modules
in the tree and quite a few are broken on legacy OS X.
One of the main issues is the inconsistent build method used by the
module developers, of the three modules we looked at, each had a
different problem related to build infrastructure.

databases/lua-tokyocabinet only had the partial set of flags (specified
in its Makefile) needed to generate shared objects with Apple's linker,
addition of -undefined dynamic_lookup resolved this issue.

devel/lua-BitOp turned out to have a separate target for building on Mac
OS X with relevant flags such as -dynamiclib and -undefined
dynamic_lookup, making sure said target is called when building on Mac
OS X resolved the issue.

devel/lua-filesystem breakage was caused by the specification of -shared
flag which legacy versions of Apple's cctools did not recognise,
resulting in an error. grepping the latest bulk build report for pkgsrc
on OS X Tiger PowerPC[3] showed that there are many packages effected by
the same issue. Alex suggested the best way forward is to look at
implementing a transform so that -shared is automatically converted to
-dynamiclib -undefined dynamic_lookup by the wrappers so that local
patches can be avoided on a package by package basis. Within a few
minutes a transform had been put together, it took a little while longer
to get it to be utilised due to a mistake by me. I'd made the assignment
optional rather than explicit. I've posted the the change for comment on
the tech-pkg@ list[4] and a bulk build is in progress to test out the patch.

Another issue with databases/lua-tokyocabinet was related to the packing
list, on OS X the extension of the generated object is dylib & on other
systems is so. This means having to apply some boilerplate logic for
dealing with file extensions depending on the OS being built on. I
enquired about the best approach for implementing a mechanism to handle
this on the tech-pkg@ list[5]. It seems that this should already be
taken care of by the infrastructure but at present only applies to files
which begin with lib in their name. Thanks to Leonardo Taccari <leot@>
for the pointer offlist.

With the difference in file extension for lua modules, Alex raised a
point about the usability of such modules with lua, by default Lua
searches for files with .so extension in its search path and will ignore
other files which prevent from some of these modules from loading. For
better integration with host operating system Lua should be set to
accomodate the native library extension.

% ~/pkg/bin/lua5.3
Lua 5.3.2  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> return package.cpath
/Users/sme/pkg/lib/lua/5.3/?.so;/Users/sme/pkg/lib/lua/5.3/loadall.so;./?.so

Recently some patches related to kqueue landed in the postegresql
hackers list[6] which Alex wanted to look at but it turned out that
postgresql packages needed to be brought up to date and a partial set of
changes were already there in the current latest releases.

We wrapped up at this set of yaks to shave.

I did not get around to looking at AFL.

Need to work on my clumsy workflow in vi.

Learnt about make build-env (runs up to build stage & spawns a shell in
a chroot of the work directory) and make debug (which prints out
environment settings) in pkgsrc.

Perhaps another event can be held before EuroBSDCon? (same time in
September)



[1] https://github.com/shazow/ssh-chat
[2]
https://pkgsrc.geeklan.co.uk/reports/current/Darwin-8/20160805.2004/icu-57.1/build.log
[3] http://mail-index.netbsd.org/pkgsrc-bulk/2016/08/19/msg013054.html
[4] http://mail-index.netbsd.org/tech-pkg/2016/08/20/msg017219.html
[5] http://mail-index.netbsd.org/tech-pkg/2016/08/20/msg017220.html
[6]
https://www.postgresql.org/message-id/CAEepm%3D37oF84-iXDTQ9MrGjENwVGds%2B5zTr38ca73kWR7ez_tA%40mail.gmail.com



More information about the Ukfreebsd mailing list