Busybox build problem
Denis Vlasenko
vda.linux at googlemail.com
Sat Feb 3 12:51:44 UTC 2007
On Saturday 03 February 2007 06:14, Brion Finlay wrote:
> Thanks for the responses. It helped knowing that my gnu compiler/c library
> configuration was correct. It also helped knowing what the
> bbconfigopts.hwas supposed to look like.
>
> I did some digging into the problem and found the following. The immediate
> cause of my problem is that Ubuntu 6.1 uses the "dash" shell 0.5.3-3 for
> /bin/sh. At the same time, scripts/mkconfigs uses an echo "`...`"
> construction for generating bbconfigopts.h. This construction contains a
> "\n" sequence, which the dash echo command interprets literally. (See the
> attached bbconfigopts.h production to see what happens.)
>
> Linking /bin/sh to /bin/bash resolved this problem and allowed the build to
> complete successfully.
>
> The fix that could be made to scripts/mkconfigs in order to work more
> generally, be less indirect, and avoid some of the backslash quoting would
> be to eliminate the echo "`...`" construction and just execute the command
> directly. That is, change this:
>
> echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print
> "\\"" $0 "\\\\n\\"";}'`"
>
> to this:
>
> sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0
> "\\n\"";}'
>
> I tested this change under bash and dash and it works in both shells.
There is presumably a reason why it is done that way. Is bbconfig.h different?
Another question, does it (unmodified version, that is) work with bbox ash?
--
vda
More information about the busybox
mailing list