libtool-patches
[Top][All Lists]
Advanced

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

Re: workaround for virtualpc bug


From: Christoph Egger
Subject: Re: workaround for virtualpc bug
Date: Sat, 29 Oct 2005 01:20:00 +0200 (MEST)

> Hi Christoph,
> 
> * Christoph Egger wrote on Fri, Oct 28, 2005 at 09:56:09PM CEST:
> > > * Christoph Egger wrote on Fri, Oct 28, 2005 at 03:00:21PM CEST:
> > > >
> > > > When the conditions are met and the error appears, then you see
> > > > this error:
> > > > 
> > > > Cannot export : symbol not defined
> > > > Creating library file: $output_objdir/$libname.dll.a
> > > > collect2: ld returned 1 exit status *snip*
> > > > The patch works around the bug in virtualpc by not operating
> > > > on an empty file.
> > > 
> > > Wouldn't this rather be a bug in sed?
> > 
> > If this is a bug in sed, why wouldn't it have been catched earlier?
> 
> Hey, I don't know.  Apparently it isn't.
> 
> > I mean, if it is a sed bug rather one in virtualpc, then there
> > should be more platforms where this issue is reproducable.
> > 
> > > > The patch has been reviewed and okey'd by Peter Ekberg (who
> > > > originally wrote the piece of code the patch touches).
> > > 
> > > Does this simpler patch also work?
> > 
> > No, this patch does not work. hmm... so my patch is more likely
> > to work around a bug in sed than in virtualpc then ...?
> 
> Likely.

Maybe not. See below.


> > > Which sed version is this, by the way?
> > 
> > This is GNU sed 4.1.4.
> 
> OK.  I would like to understand the issue before applying your patch:
> I dislike very much any 'fix' where the issue isn't fully analyzed, for
> several reasons: there might be other places that need fixing, the issue
> might be solved easier or more thoroughly in a different way, some other
> component might need fixing instead of Libtool (or additionally).
> 
> Could you please find out for me:
> - whether empty files in general get messed up in your setup
> - whether newline encoding is the issue
> - whether the
>    sed -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' 
>   outputs something weird.


I created a small script, which tests all these cases.
If it is really a sed bug, then it should reproduce the issue.

----------------------------------------------------------
#!/bin/sh

SED="/usr/bin/sed"

# Use file mapped from MacOSX into VirtualPC
orig_export_symbols="/cygdrive/z/ggi/ggi-core/libgii/input/null/EXPSYMS"

# Steal .libs/null.exp from building error. This safes me to copy
# tons of libtool code into here...
$SED -e '/[ ,]DATA/!d;s,\(.*\)\([ ,].*\),s|^\1$|\1\2|,' < .libs/null.exp >
null.filter

# This is the (failing) command in question
$SED -f null.filter < $orig_export_symbols > null.def

# octal dump output to see if content is garbaged which
# would be the reproduced error
od -a null.def

-- 
Greetings,

Christoph

Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]