#1962: Glibc fails to build using dash
------------------------------------------+---------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  [EMAIL PROTECTED]
     Type:  defect                        |       Status:  assigned             
       
 Priority:  normal                        |    Milestone:  6.3                  
       
Component:  Book                          |      Version:  SVN                  
       
 Severity:  normal                        |   Resolution:                       
       
 Keywords:                                |  
------------------------------------------+---------------------------------
Changes (by [EMAIL PROTECTED]):

  * owner:  [email protected] => [EMAIL PROTECTED]
  * status:  new => assigned

Comment:

 Dash advertises itself as a POSIX compatible shell at
 http://gondor.apana.org.au/~herbert/dash/.  POSIX states:

   The following operands shall be supported:

   string
     A string to be written to standard output. If the first operand is -n,
 or if any of the operands contain a backslash ( '\' ) character, the
 results are implementation-defined.

 Backslash escape sequences, such as '\n' are an XSI extension.  Assuming
 Dash is POSIX-only and therefore doesn't implement any XSI extensions, any
 escape sequences can be treated however Dash sees fit.

 Note that under "Application Usage", POSIX says:

   It is not possible to use echo portably across all POSIX systems unless
 both -n (as the first argument) and escape sequences are omitted.

 Patching Glibc to fix these issues is trivial in this case:

 {{{
 echo "\"Available extensions:\\n\"";
 }}}

 becomes

 {{{
 echo '"Available extensions:';
 echo '"'
 }}}

 Note that POSIX also recommends:

   New applications are encouraged to use printf instead of echo.

 In which case, this becomes:

 {{{
 printf "%s\n" '"Available extensions:\n"'
 }}}

 All of this is purely for information only though, as I'm sure there are
 many other cases of non-POSIX syntax in Glibc's sources and they won't
 entertain such patches anyway.

 We'll just go with option number 1 and pass "SHELL=/bin/bash" through to
 Glibc's make processes.  If any other packages show similar issues, the
 same workaround can be applied to them too, making it nice and consistent.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/1962#comment:3>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to