[Toybox] Make Errors
Rob Landley
rob at landley.net
Sun Aug 30 21:27:57 PDT 2015
On 08/30/2015 08:57 PM, Brent Hostetler wrote:
> I could use some help trying to build toybox.
>
>
> I have tried building the last three versions and get the same basic errors:
>
> [rking at rkmini toybox-0.5.2]$ make defconfig
> cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
> -DPROJECT_NAME=\"ToyBox\"
> In file included from kconfig/zconf.tab.c:158:0:
> kconfig/zconf.hash.c:161:43: warning: ‘kconf_id_strings_contents’ is
> static but used in inline function ‘kconf_id_lookup’ which is not static
> #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
> ^
How is that inline? The code in kconfig/zconf.hash.c doesn't mark it
inline. It's just a function. zconf.hash.c is #included from zconf.tab.c
which is compiled via:
kconfig/conf: $(SHIPPED)
$(HOSTCC) -o $@ kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"$(KCONFIG_PROJECT)\"
So in theory you should be able to go something like:
gcc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
-DPROJECT_NAME=\"toybox\"
And eliminate make as a variable...
> kconfig/zconf.hash.c:233:44: note: in expansion of macro ‘kconf_id_strings’
> register const char *s = o + kconf_id_strings;
> ^
> kconfig/zconf.hash.c:226:26: warning: ‘kconf_id_hash’ is static but used
> in inline function ‘kconf_id_lookup’ which is not static
> register int key = kconf_id_hash (str, len);
> ^
> kconfig/zconf.hash.c:177:26: warning: ‘wordlist’ is static but declared
> in inline function ‘kconf_id_lookup’ which is not static
> static struct kconf_id wordlist[] =
> ^
> /tmp/cc8dkAWm.o: In function `zconfparse':
> zconf.tab.c:(.text+0xa59): undefined reference to `kconf_id_lookup'
> /tmp/cc8dkAWm.o: In function `zconflex':
> zconf.tab.c:(.text+0x23ed): undefined reference to `kconf_id_lookup'
> zconf.tab.c:(.text+0x253f): undefined reference to `kconf_id_lookup'
> collect2: error: ld returned 1 exit status
> kconfig/Makefile:61: recipe for target 'kconfig/conf' failed
> make: *** [kconfig/conf] Error 1
As kconfig/README says:
This is a snapshot of linux 2.6.12 kconfig as washed through busybox
and further modified by Rob Landley.
While I do intend to eventually replace that entire directory (it's the
last remaining GPL code in the build, and even though none of it ships
it's still ugly and won't build on BSD)... you're basically saying your
build environment couldn't build a 2.6 kernel.
> [rking at rkmini toybox-0.5.2]$ uname -a
> Linux rkmini 4.1.6-1-ARCH #1 SMP PREEMPT Mon Aug 17 08:52:28 CEST 2015
> x86_64 GNU/Linux
>
> [rking at rkmini toybox-0.5.2]$ gcc --version
> gcc (GCC) 5.2.0
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I generally trust newer gcc versions about as far as I can throw them.
This built fine with older gcc, and with llvm.
That said, it could still be something else in the build environment.
This is a link error but you didn't specify your linker version,
you didn't say what distro this was... I can't currently reproduce
this from the information provided.
Thanks,
Rob
1440995277.0
More information about the Toybox
mailing list