helpAutoconf - Support: sr #108092, AC_PROG_GREP can select...


sr #108092: AC_PROG_GREP can select /usr/xpg4/bin/grep under Solaris 9 but it doesn't support long lines

Submitted by:  Yann Rouillard <yann>
Submitted on:  Sun 22 Jul 2012 12:14:05 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 22 Jul 2012 12:14:05 AM UTC, original submission:


According to the autoconf manual page, AC_PROG_GREP should select an grep binary that accepts the longest input lines possible, but it is not explained what "longest lines" means.

During the compilation of netsnmp under Solaris 9, I fought with a difficult bug caused by the fact that AC_PROG_GREP selected /usr/xpg4/bin/grep but this one doesn't work realiably when the length of lines exceed 2048 bytes.
(see )

(According to the man page:
"The results are unspecified if input files contain lines
longer than LINE_MAX bytes or contain binary data. LINE_MAX
is defined in /usr/include/limits.h.")

After having a look at the manual
, I understand that we can't rely on $GREP to process long lines as it was already mentioned that AIX truncates lines.

So I wonder if "longest lines" is misleading here because:
- there seems to be no test about the length of lines supported,
- anyway, if we want to be portable, we should only count on $GREP supporting the minimum length supported among all architectures.

Maybe some numbers about the length of lines supported could be added in the manual ?


Yann Rouillard <yann>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by yann (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.4