[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: List of FTBFS in Ubuntu

On Mon, Dec 06, 2010 at 02:57:59PM +0100, Olaf van der Spek wrote:
> On Mon, Dec 6, 2010 at 2:50 PM, Roger Leigh <rleigh@codelibre.net> wrote:
> >> >> These are using proprietary vendor-specific #pragmas.  It's pretty
> >> >
> >> > True, but IMO the concept seems pretty useful.
> >> >
> >> > Why do you think it's horrible? It appears to work well.
> >> >
> >> >> horrible, not to mention fragile--if any header fails to include the
> >> >> correct bits of magic, it all falls apart.  If they had spent just
> >> >> a fraction of the time implementing that to support pkg-config, we
> >> >> wouldn't have a problem.
> >> >
> >> > g++ and MSVC don't use pkg-config (AFAIK).
> >> > So the complexity is pushed down instead of up.
> > Yes?  I didn't really have anything further to add to the discussion,
> > unless I've missed something.  Were you wanting something specific?
> I was wondering why you considered the auto linking stuff to be so horrible.
> IMO the best solution would be to get auto link support into GCC too.

It's non standard
- it's not specified by ISO C
- it's not specified by SUS/POSIX

It's not portable
- it uses vendor-specific #pragma magic

It's fragile
- every header must include the auto-link magic, either directly or
  indirectly.  If you forget to do this just once in a single file,
  linking will break

If it were incorporated into GCC, we still couldn't use it
- it's not backward compatible with other UNIX compilers
- it's not backward compatible with itself

So we would always need an alternative mechanism for standards-
conforming compilers which did not support this non-standard

Now, pkg-config isn't standardised /either/, but it's useful because
it will work with any standards-conforming compiler.  It's just a
generalisation of existing practice (in the form of foo-config
scripts generated during a package build).

But this is all moot.  I've written the pkg-config support into the
auto-link header, and we just need to integrate it into the build
system to get the job done.


  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature

Reply to: