On Tuesday 23 September 2003 08:38, Rafael Laboissiere wrote:
| * Alan W. Irwin <irwin@...> [2003-09-22 17:20]:
| > On 2003-09-22 14:09-0700 Rob Managan (forwarded by AWI) wrote:
| > > checking for swig... swig
| > > sed: 1: "s/^SWIG Version //;tEND ...": undefined label
| > > 'END;d;:END;q' ./configure: < 17: syntax error: operand expected
| > > (error token is "< 17")
| > >
| > >
| > > At the command line I get
| > > swig -version 2>&1 | sed 's/^SWIG Version //;tEND;d;:END;q'
| > > Ambiguous output redirect.
| >
| > You actually don't need swig since the tarball already includes all
| > the swig-generated files so this test doesn't matter for your
| > situation. However, the test should just happen quietly in the
| > background and should not be generating a syntax error. Does
| > anybody have a clue how to avoid this sed syntax error? I must say
| > I rarely use sed labels. Is there a simpler
| > lowest-common-denominator way to do the swig test that will avoid
| > syntax errors on machines with non-Linux sed?
|
| The "Ambiguous output redirect" error message above is obscuring the
| problem, since it seems to be rather a shell problem. To Rob: are
| you sure that you are using a Bourne shell? Could you please try the
| follwoing and report back the result:
|
| echo "SWIG Version 1.3.17u-20021128-1508" | sed 's/^SWIG Version
| //;tEND;d;:END;q'
|
| If that fails with the "undefined label" error message, could you
| please try this slightly modified version:
|
| echo "SWIG Version 1.3.17u-20021128-1508"| sed 's/^SWIG Version
| // ; t END ; d ; :END ; q'
|
| Notice that the second version have spaces among the sed commands.
| My sed here accepts this syntax and it was the original one when I
| wroite the swig tests in configure.ac. However, Joao complained
| later that it was not accepted by the some Unix system he uses
| (AIX?).
OSF1 V4.0 1229 alpha
The only way I can get it to work is breaking the commands into separate
lines:
> echo "SWIG Version 1.3.17" | sed 's/SWIG Version//;\
? tCO;\
? p;\
? :CO;\
? q'
1.3.17
If I put it in a single line it fails:
> echo "SWIG Version 1.3.17" | sed 's/SWIG Version//;tCO;p;:CO;q'
sed: The label s/SWIG Version//;tCO;p;:CO;q is greater than eight
characters.
GNU bash, version 2.01.1(1)-release (alpha-dec-osf4.0)
"sed" is the OS native one
The shell does not seems to make any difference, as the behavior is the
same under tcsh.
If I put the sed commands in a file and do
echo "SWIG Version 1.3.17" | sed -f foo
the behavior is the same, i.e., it only works with the commands split
over several lines.
Do, this one seems to be a broken sed.
Joao
|
| If the problem happens to be this, then I think I could find a fix
| for it. Rob: could you please send to me the config.log you obtained
| in MacOSX?
|
| > > Tried ./configure --disable-f77 --disable-python
| > > --disable-lj_hpgl then
| > > gcc -g -O2 -o get-drv-info get_drv_info-get-drv-info.o
| > > ../libltdl/.libs/libltdlc.a
| > > ./get-drv-info `echo dg300.la | sed 's/.la//'` > dg300.rc
| > > ltdl.c:2458: failed assertion `dirname'
| > > make[2]: *** [dg300.rc] Error 134
| > > make[1]: *** [all-recursive] Error 1
| > > make: *** [all] Error 2
| >
| > It appears ./get-drv-info (or libltdl from the libtool-1.5 package
| > upon which it depends) does not work properly on macosx. This
| > might be a showstopper for dynamic drivers on macosx. Rafael, can
| > you recommend some debugging steps Rob might try to get an idea
| > what is wrong with your get-drv-info code or libltd on this
| > platform?
|
| Rob: could you please send me the dg300.la file that is obtained
| during the build in your system?
|