Thanks for the responses. It helped knowing that my gnu compiler/c library configuration was correct. It also helped knowing what the bbconfigopts.h was supposed to look like.<br><br>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.) <br><br>Linking /bin/sh to /bin/bash resolved this problem and allowed the build to complete successfully.<br><br>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:
<br><br>echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\\"" $0 "\\\\n\\"";}'`"<br><br>to this:<br><br>sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
<br><br>I tested this change under bash and dash and it works in both shells.<br><br><br>Alternatively, since awk is being invoked anyway, this line could be changed to just a single line awk invocation to do away with the sed, the grep, and the echo:
<br><br>awk '/^#? ?CONFIG_/ {gsub(/\"/,"\\\\\"",$0); print "\"" $0 "\\n\"";}' $config<br><br>I tested this change under bash and dash and it also works in both shells.
<br><br>I have also attached a patch file to mkconfigs for the single line awk version.<br><br><br><div><span class="gmail_quote">On 2/1/07, <b class="gmail_sendername">Denis Vlasenko</b> <<a href="mailto:vda.linux@googlemail.com">
vda.linux@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Thursday 01 February 2007 07:26, Brion Finlay wrote:
<br>> This seems like it should be a simple question that other people have had<br>> problems with, but I cannot get Busybox to build. I have tried google-ing<br>> for similar problems, searching the mail archives, and reading the FAQs and
<br>> all of the documentation, but I cannot figure out what is going on.<br>><br>> I am using a fairly fresh install of Ubuntu 6.1, and I have installed enough<br>> of the development packages to build a custom kernel. (I mention this
<br>> because Ubuntu does not preinstall many development packages, so it is<br>> possible I am still missing some, but I have installed quite a few.)<br>><br>> The GCC version is 4.1.2.<br>> sed is GNU Sed version
4.1.5<br>><br>> Here are the compile problems that I get:<br>><br>> Busybox 1.4.1<br>> # make defconfig; make<br>><br>> ...<br>> include/bbconfigopts.h:1088: error: missing terminating " character
<br>> (repeated for each line)<br>> include/bbconfigopts.h:1089: error: expected expression before ';' token<br>> make[1]: *** [miscutils/bbconfig.o] Error 1<br>> make: *** [miscutils] Error 2<br><br>gcc
4.1.1, glibc 2.4, gnu sed 4.1.5, bbox 1.4.1:<br><br># make defconfig; make<br> HOSTCC scripts/basic/fixdep<br> HOSTCC scripts/basic/split-include<br> HOSTCC scripts/basic/docproc<br> HOSTCC scripts/kconfig/conf.o<br>
HOSTCC scripts/kconfig/kxgettext.o<br> HOSTCC scripts/kconfig/mconf.o<br> SHIPPED scripts/kconfig/zconf.tab.c<br> SHIPPED scripts/kconfig/lex.zconf.c<br> SHIPPED scripts/kconfig/zconf.hash.c<br> HOSTCC scripts/kconfig/zconf.tab.o
<br> HOSTLD scripts/kconfig/conf<br>scripts/kconfig/conf -d <a href="http://Config.in">Config.in</a><br>/.local/tmp/busybox-1.4.1/scripts/defconfig:351:warning: trying to assign nonexistent symbol E2FSCK<br>/.local/tmp/busybox-
1.4.1/scripts/defconfig:354:warning: trying to assign nonexistent symbol MKE2FS<br>/.local/tmp/busybox-1.4.1/scripts/defconfig:355:warning: trying to assign nonexistent symbol TUNE2FS<br>/.local/tmp/busybox-1.4.1/scripts/defconfig:356:warning: trying to assign nonexistent symbol E2LABEL
<br>/.local/tmp/busybox-1.4.1/scripts/defconfig:357:warning: trying to assign nonexistent symbol FINDFS<br>/.local/tmp/busybox-1.4.1/scripts/defconfig:635:warning: symbol value '' invalid for FEATURE_COMMAND_HISTORY
<br>*<br>* Busybox Configuration<br>*<br>*<br>* Busybox Settings<br>*<br>*<br>* General Configuration<br>*<br>See lots more (probably unnecessary) configuration options. (NITPICK) [N/y/?] n<br>Enable options for full-blown desktop systems (DESKTOP) [N/y/?] n
<br>...<br>envdir (ENVDIR) [Y/n/?] y<br>softlimit (SOFTLIMIT) [Y/n/?] y<br> SPLIT include/autoconf.h -> include/config/*<br> GEN include/bbconfigopts.h<br> HOSTCC applets/usage<br> GEN include/usage_compressed.h
<br> CC applets/applets.o<br> CC applets/busybox.o<br>...<br> CC util-linux/switch_root.o<br> CC util-linux/umount.o<br> AR util-linux/lib.a<br> LINK busybox_unstripped<br><br>include/bbconfigopts.h from build tree is attached.
<br>--<br>vda<br><br><br></blockquote></div><br>