[csw-users] The "sed-sed-sed" problem

Guy Shaw gshaw at acm.org
Fri Jul 13 00:00:24 CEST 2012


I am writing to this list, not because I have a problem
or question about an OpenCSW package, but because I have
a problem that I believe maintainers of OpenCSW packages
would have run across, when building OpenCSw packages from
an original software tarball.

An example
----------
I did not see an OpenCSW package for idutils,
so I downloaded the source tarball and built it myself.
The usual './configure; make; make install' works just
fine, except for the library.  I had to tweak the
Makefile in the lib sub-directory.  The change to make
it all work properly is to go from a pipeline of
three sed commands to a single sed command with
an argument list that is the concatenation
of the original three argument lists.

I guess the Autotools developers broke up the sed
into three stages, because they were worried about
systems with wimpy limits on the size of argv.
But, I am just guessing.  I see no reason why the

     sed argv1 | sed argv2 | sed argv3

pipeline would not work, but on Solaris,
that just hangs.  But, the single command:

     sed argv1 argv2 argv3

works fine.

I have tried to come up with smaller, isolated
examples that would hang, but with no success.
It seems to be only the combination of the
Makefile and the shell it uses, and its inability
to properly handle the three stage sed-sed-sed pipeline.


idutils is just an example.  I have seen the same problem
with other software that uses GNU Autotools and has a 'lib'
sub-directory, and that uses a three stage sed-sed-sed pipeline.

Has anyone on this list seen this problem?
Is it a well-known problem?

-- Guy Shaw


More information about the users mailing list