[oi-dev] Desktop Illumos Still Matters
Alasdair Lumsden
alasdairrr at gmail.com
Wed Sep 5 19:53:07 UTC 2012
On 05/09/2012 19:49, Joerg Schilling wrote:
> The buildsystem for sfw is a nightmare:
>
> - It only works if the whole set of tools has already been
> installed in /usr on the compiling system before with exactly
> the same version as the one that is going to be compiled.
>
> This causes that you need an unknown number of iteration to
> compile and install on the build machine before you are able
> to compile everything at all.
>
> You need at least one additional install/compile cycle before you
> can be sure that the compile/link results will no longer change.
It sounds like what you want is a completely self contained build
system, like pkgsrc, which bootstraps itself, requires only a compiler,
knows how to build things in the correct order, and installs everything
to a custom destination prefix.
That approach is fine for building 3rd party software, but not for
maintaining system software which ships to /usr.
Why? Because even in a minimal zone, bootstrapping involves overwriting
things in /usr that are already maintained by the packaging system. You
could build software and upgrade to those packages as you go, but that's
very hard to do especially when refactoring packages.
If you instead tried to install everything to a custom destination
prefix, you couldn't then just package it up and install it to /usr,
because lots of software embeds their build prefix in the binary. If you
built stuff with /foo as your prefix, then packaged it and delivered it
to /usr, /usr/bin/someprogram would be looking for
/foo/etc/someconfigfile.conf
It's far easier just to use a build zone and install the dependencies
you need, and ensure your build zone is running the latest bits from the
package repository.
> - It may be that you would need to manually install at least older
> versions of strategic tools before you may start to compile at all.
> The programs in question are gmake, bash, gm4, ...
That is not an issue with userland-gate or oi-build. You do have to
install gmake, bash and a bunch of dependencies, but they're all
available in the package repo.
> - It installs unmodified autoconf results in /usr/include with the
> effect that you cannot compile depending other software using
> an older version of the compilers than the one you used to compile
> sfw.
Can you supply an example? I'm not sure I understand this complaint.
I do find it highly annoying that a lot of software jots down the
compiler flags it was built with and stores them in a
[softwarename]_config file, such as mysql_config, which is used by
extensions to get the CFLAGS/LDFLAGS/etc. On OSOL/OI these are often Sun
Studio flags that aren't compatible with gcc.
You then end up in a situation where if you're doing "gem install
somelibrary" or "pecl install somelibrary" with gcc as your compiler, it
chokes when linking against a system program that supplies Sun Studio
CFLAGS/LDFLAGS.
SFW was a nightmare for many reasons, but not the reasons you listed.
More information about the oi-dev
mailing list