libtool
[Top][All Lists]
Advanced

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

Re: solaris link line length problem == buggy sed


From: Robert Boehne
Subject: Re: solaris link line length problem == buggy sed
Date: Tue, 17 Jul 2001 18:33:06 -0500

Alex Hornby wrote:
> 
> My earlier link line truncation problem on solaris was not due to
> command line length restrictions (getconf reports a healthy 109kb for
> ARG_MAX).
> 
> Solaris 2.6 /usr/bin/sed, as used by libtool during the link, has
> problems with "long" lines of > 3999 characters, truncating them as it
> sees fit.
> 
> By putting GNU sed ahead of solaris sed on my PATH the build succeeds.
> 
> Should libtool work around such broken sed's during the build phase,
> and would patches be considered that did this?
> 
> Regards,
> Alex.
> 

Ok, I'm trying to write a macro for libtool.m4 that will check for
bugs such as this one in sed.  However, if I create a file inline
with 8202 characters on one line, Linux bash segfaults!
It does work under IRIX and Solaris, so my approach seems OK.
Here is what it basically does:

  cat > conftest.$ac_ext <<EOF
XXXXXXXXXX<SNIP 8200 'X' characters>
EOF
  sed 's/Y/Z/g' conftest.$ac_ext > conftest.out
  lt_cv_buggy_sed="yes"
  cmp conftest.$ac_ext conftest.out >/dev/null && lt_cv_buggy_sed="no"
2>&1
  ls -al conftest.$ac_ext conftest.out
  cat conftest.$ac_ext
fi

Since bash 1.14.7 under Linux (Redhat 6.2) seems to have a
problem with such a long inline file, is there a way to
concatenate a character or characters into a file without
adding newlines?
Granted, I can simply skip this if GNU sed is found, but
I'm sure it will come up again on some other sed/shell
combination.

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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