9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Enrico Weigelt <weigelt@metux.de>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Plan9 development
Date: Thu, 18 Nov 2010 00:48:18 +0100	[thread overview]
Message-ID: <20101117234817.GA10365@nibiru.local> (raw)
In-Reply-To: <ABFE2C76-EB0E-4A44-9909-65F015E5C4AD@vaughan.pe>

* Gary V. Vaughan <gary@vaughan.pe> wrote:

> I have never used sysroot in all that time,

Maybe that's the problem. ;-p

I'm using sysroot all the time, since I don't want to tweak
every single package so that the right pathes are found, at
build- as well as runtime.

W/ sysroot you build and install everything as it would be on
the target system (despite that certain unneeded filesnwill be
removed from the production target image). Most packages wont
need any special handling for that, as long as there's nobody
in the middle who messes up the pathes.

> and no else offered patches until quite recently.

Actually, I was trying to fix it several years ago, but the whole
codebase was so utterly complex that I decided to write some new
universal toolchain wrapper with an consistent and platform-agnostic
interface and additionally an drop-in replacement for libtool
(ltmain.sh).

> Libtool has been immeasurably useful to me entirely without
> that particular feature.

For my projects it had been an absolutely catastrope, since
I simply *need* sysroot. And in the end it was much easier
replacing it completely than trying to fix it.

> > The whole idea of libtool essentially being a command line filter
> > instead of defining an own coherent abstraction interface
>
> What is incoherent or unabstract about offering a static-library
> like interface to building shared libraries, or an ELF like
> library versioning scheme?

I'm talking about libtool, the big script, not the ltdl library.

The main design problem here is that it's called instead of the
direct toolchain commands, but with an derivative of their
command line interface, changing commands in unobvious ways.
It's interface varies between platforms/toolchains.

With "coherent abstraction interface" I mean some completely
differnet interface that wraps behind all the platform/toolchain
specific things, which stays the same everywhere.

> > and one
> > implementation/configuration instance per target instead of an
> > autofooled instance per individual package build.
>
> How does that scale in the face of a dozen or more OSes,

For each platform you'll need an proper target configuration.
But only once per platform. And you can easily tweak it to your
specific needs, w/o touching all the invidual packages.

> each with at least a handful of supported library releases

Libraries simply have provide an coherent interface, across
releases. Otherwise they're simply broken. Either fix them or
dont use them. Everyting else gives to maintainance overhead
of exponential complexity.

> and compiler revisions each with a

Same as w/ OS'es. Configure the target config once and for all.
(most likely the job of the distro maintainers).

> handful of vendor maintenance patches, each with several hundred API
> entry-points of which several dozen of each have non-conformances or
> outright bugs.

Fix the bugs instead of "supporting" broken stuff.

If you can't fix the system itself, the fixes can be put into the
toolchain (eg. use fixed versions of broken/missing libc functions).

> Worse, many of my clients mix and match gcc with vendor ldd and
> runtime in various combinations or install and support 3 or more
> compilers per architecture.

They simply shouldn't do this. If the vendor's toolchain/libc is
broken, use a fixed one.

> Libtool figures out what to do in all of those thousands of combinations,
> by probing the environment at build time...

There're sometimes cases where these things cannot be guessed at
build time or it simply guesses wrong. I dont see that libtool
offers some clean interface for _specifying_ those things once
per target type.

> I'd *much* rather wait 90 seconds for each build that try to maintain a giant
> tabulation with thousands of entries, which go out of date every time a new
> patch or revision of libc or the compiler or the os or the linker comes along.

You dont need either. Just have one exact configuration per target
(which itself *might* be created in assistance of some separate
detection tool). Normally the job of the distro maintainers.

> > See git://pubgit.metux.de/projects/unitool.git
>
> Java? For a bootstrapping tool?

This is just an reference implementation, an proof-of-concept.

> Does Java even get worthwhile support outside of Windows and Solaris these days?

Yes, works fine for example on GNU/Linux - gcc builds ELF executables
out of it easily.

> If it works for you, that's great, but I would have an extremely
> hard sell on my hands if I told my clients they would need to have
> a working Java runtime on Tru64 Unix before I could provide a zlib
> build recipe for them :-o

In my model, unitool is part of the toolchain. In a way, it *is* the
toolchain (or at least the front side).

BTW: zlib doesnt use neither libtool nor autoconf.

> > That's an issue of individual platform backends, which should be
> > completely transparent to the calling package.
>
> Agreed, that's what libtool provides, but to do that it needs to be intimately
> familiar with how each combination works. It certainly shouldn't be trying
> to do that without calling the vendor compiler and linker.

Still it's not completely transparent. It rewrites parts of the
command line and passes the rest through. Similar to m4, it's an
filter, not an real abstraction.

> >>  3. There's no use in fighting against GNU Autoconf and GNU Automake,
> >
> > Ah, resistance is futile ? ;-o
>
> Without user acceptance, that 2 man years of effort I could sink into a new
> all singing all dancing build system would be a waste of my time.

That's not necessary. Just clean up the code of the packages you need.
It doesnt take any new super-duper build system - in very most cases,
clean Makefiles and an _properly_ written shell script (where most of
the functions can come from a separate library package, so collecting
the knowledge) will suffice. All that's now done via complex and
error-prone m4 macros could be easily done using shell functions.

> Yep. If I'm porting a cmake package (for example) to the 30 architectures
> we support, and shared libraries are required - calling the installed libtool
> from the cmake rules is an order of magnitude less work than trying to
> encode all the different link flags, install and post install rules or other
> system specific peculiarities into the compile and link rules in every build
> file...

hmm, cmake doesnt support including an common file which contains
several variables and that is generated by some well-written
shellscript or could be tweaked manually when required ?


cu
--
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------



  parent reply	other threads:[~2010-11-17 23:48 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04  9:36 Admiral Fukov
2010-11-04  9:47 ` Lucio De Re
2010-11-04 10:20   ` Steve Simon
2010-11-04 11:30 ` Brantley Coile
2010-11-04 15:39 ` David Leimbach
2010-11-04 15:55   ` Stanley Lieber
2010-11-04 16:01     ` John Floren
2010-11-04 16:39       ` ron minnich
2010-11-04 16:57         ` Stanley Lieber
2010-11-04 17:01         ` Don Bailey
2010-11-04 17:19         ` Jeff Sickel
2010-11-04 22:20           ` Charles Forsyth
2010-11-05  1:41             ` Venkatesh Srinivas
2010-11-05  3:50               ` Bruce Ellis
2010-11-05  7:11                 ` Lucio De Re
2010-11-05  7:55                   ` Bruce Ellis
2010-11-05 13:31                     ` Eric Van Hensbergen
2010-11-05 15:16                       ` C H Forsyth
2010-11-05 17:07                       ` dexen deVries
2010-11-05 17:18                         ` Nick LaForge
2010-11-05 17:32                           ` dexen deVries
2010-11-05 17:39                             ` andrey mirtchovski
2010-11-05 17:55                               ` dexen deVries
2010-11-05 17:45                             ` David Leimbach
2010-11-05 18:14                               ` erik quanstrom
2010-11-05 18:37                                 ` roger peppe
2010-11-05 19:06                                   ` erik quanstrom
2010-11-08 11:04                                     ` roger peppe
2010-11-08 21:24                                       ` Bruce Ellis
2010-11-08 22:22                                         ` Charles Forsyth
2010-11-08 22:25                                           ` Bruce Ellis
2010-11-08 22:33                                           ` Charles Forsyth
2010-11-09  2:10                                             ` Jeff Sickel
2010-11-09  3:18                                               ` EBo
2010-11-09  8:10                                                 ` Bruce Ellis
2010-11-13 19:15                                             ` Enrico Weigelt
2010-11-05 20:37                         ` Eric Van Hensbergen
2010-11-06  0:55                           ` Charles Forsyth
2010-11-06  2:20                         ` Bruce Ellis
2010-11-06 20:24                           ` dexen deVries
2010-11-05 18:43             ` Bakul Shah
2010-11-13 19:24         ` Enrico Weigelt
2010-11-14  2:17           ` Gary V. Vaughan
2010-11-14  5:47             ` Anthony Sorace
2010-11-14  6:24               ` erik quanstrom
2010-11-14  8:13                 ` Gary V. Vaughan
2010-11-14 15:56                   ` Jacob Todd
2010-11-14 16:24                     ` ron minnich
2010-11-14  6:26               ` Russ Cox
2010-11-14  8:03                 ` Anthony Sorace
2010-11-14 15:23                 ` erik quanstrom
2010-11-14 17:46                   ` Russ Cox
2010-11-14 22:16                     ` erik quanstrom
2010-11-14  9:10             ` tlaronde
2010-11-14  9:32               ` Gary V. Vaughan
2010-11-14 10:22                 ` tlaronde
2010-11-14 10:50               ` Carl-Daniel Hailfinger
2010-11-14 11:47                 ` tlaronde
2010-11-14 21:44                 ` Charles Forsyth
2010-11-14 21:47                   ` Ori Bernstein
2010-11-18  5:30                   ` Joel C. Salomon
2010-11-18  5:57                     ` erik quanstrom
2010-11-18 22:50                     ` Federico G. Benavento
2010-11-19  2:06                       ` Joel C. Salomon
2010-11-19  3:13                         ` Federico G. Benavento
2010-11-25  9:39                       ` Greg Comeau
2010-11-15  4:29                 ` Gary V. Vaughan
2010-11-15  5:05                   ` Carl-Daniel Hailfinger
2010-11-15 15:48                   ` Dan Cross
2010-11-15 16:24                     ` Lucio De Re
2010-11-15 17:26                       ` Brian L. Stuart
2010-11-16  3:32                         ` lucio
2010-11-16  4:53                           ` erik quanstrom
2010-11-16  5:09                             ` lucio
2010-11-16 22:18                           ` Christopher Nielsen
2010-11-15 18:11                   ` Dave Eckhardt
2010-11-15 20:04                     ` Steve Simon
     [not found]           ` <79E9F966-3C4E-44D9-8B1F-D22C9548CE74@gnu.org>
2010-11-15  1:02             ` Enrico Weigelt
2010-11-15  4:17               ` Gary V. Vaughan
2010-11-15 16:22                 ` erik quanstrom
2010-11-17 23:48                 ` Enrico Weigelt [this message]
2010-11-04 16:00   ` erik quanstrom
2010-11-04 17:12     ` Admiral Fukov
2010-11-04 17:19       ` andrey mirtchovski
2010-11-04 17:30         ` Admiral Fukov
2010-11-04 20:27     ` David Leimbach
2010-11-04 12:15 dexen deVries
2010-11-04 12:48 ` Venkatesh Srinivas
2010-11-04 17:14   ` Admiral Fukov
2010-11-17  7:38 Pavel Zholkover
2010-11-17  7:44 ` Lucio De Re

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101117234817.GA10365@nibiru.local \
    --to=weigelt@metux.de \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).