[Nut-upsdev] building on OS X (was: libconf branch build failure: sigemptyset())

Charles Lepple clepple at gmail.com
Mon Mar 11 12:25:00 UTC 2013


On Mar 11, 2013, at 5:07 AM, <VaclavKrpec at Eaton.com> wrote:

> Do you by any chance have a list of package names
> for the OS X (mine is just a fresh clean installation)?

For a basic build test, you can install the Xcode command line tools from the Apple developer site or the App store. The base OS seems to have all of the headers and libraries needed for OpenSSL and NetSNMP.

For USB, NEON and other libraries, you need Fink or MacPorts. I prefer Fink, since it uses the familiar dpkg under the hood, but MacPorts is a little more flexible in other areas, since it has a Gentoo-like variants system. Along these lines, Fink strives to have every built .deb package be the same (variants are implemented by building and installing differently-named .deb files), whereas MacPorts allows the packages to be different depending on which options were selected. Fink also keeps out of /usr/local, since many ported Mac applications drop old versions of libraries there.

You can have both installed at once, but it is only recommended to have one active in $PATH when building.

Fink: http://www.finkproject.org/ or http://sf.net/projects/fink

MacPorts: http://www.macports.org/

> I'd also appreciate an advice on the packages source and
> an overview of OS X packaging system (I suppose it has some
> but I've never worked with it, before).

Aside from Fink and MacPorts, we haven't focused on the OS X Installer.app system since we don't have any GUI applications, and because Installer.app really isn't so much of a package manager, just an installer. (It records what files are owned by which package, but there is no interface to remove packages, handle conflicts, etc.)

A typical Mac app is removed by deleting the *.app directory, but a command-line tool like NUT would be spread across several directories hard-coded at build time. It is possible to change the shared library (.so -> .dylib) paths to reference files in a local .app directory for a GUI tool, so that's something to think about for the future.

There is also an init replacement called launchd which we would probably want use to start upsd and upsmon. (There have been a few posts to this list about it.) I have a few attempts at patches to support generating a launchd .plist file in my local Git tree, but they need to hook into autoconf to get the install pathnames.

> Am I correct in thinking that it's you who owns the Darwin
> machine used as NUT buildslave?

Yes. It's not on all the time, but let me know and I can poke it if it starts getting behind on builds.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsdev mailing list