Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Busybox build fails on raspberrypi defconfig
@ 2015-06-17 13:27 Johan Oudinet
  2015-06-17 14:02 ` Johan Oudinet
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Oudinet @ 2015-06-17 13:27 UTC (permalink / raw)
  To: buildroot

Hi,
I've just updated my master branch to origin/master (ebe2968 with no
extra commit) and did the following commands:
$ make clean
$ make raspberrypi_defconfig
$ make

And busybox build fails with the following error:
----------8<----------8<----------8<----------8<----------8<----------8<----------
>>> linux-headers 3.12.28 Installing to target
>>> busybox 1.23.2 Building
PATH="/home/johan/Documents/buildroot/output/host/bin:/home/johan/Documents/buildroot/output/host/sbin:/home/johan/Documents/buildroot/output/host/usr/bin:/home/johan/Documents/buildroot/output/host/usr/sbin:/home/johan/cov-analysis-linux64-6.6.1/bin:/home/johan/bin:/home/johan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64   -Os " CFLAGS_busybox="" /usr/bin/make -j9
CC="/home/johan/Documents/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc"
ARCH=arm PREFIX="/home/johan/Documents/buildroot/output/target"
EXTRA_LDFLAGS=""
CROSS_COMPILE="/home/johan/Documents/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-"
CONFIG_PREFIX="/home/johan/Documents/buildroot/output/target"
SKIP_STRIP=y -C
/home/johan/Documents/buildroot/output/build/busybox-1.23.2
make[1]: Entering directory
'/home/johan/Documents/buildroot/output/build/busybox-1.23.2'
  CC      applets/applets.o
In file included from include/busybox.h:8:0,
                 from applets/applets.c:9:
include/libbb.h:87:19: fatal error: utmp.h: No such file or directory
 # include <utmp.h>
                   ^
compilation terminated.
scripts/Makefile.build:197: recipe for target 'applets/applets.o' failed
make[2]: *** [applets/applets.o] Error 1
Makefile:372: recipe for target 'applets_dir' failed
make[1]: *** [applets_dir] Error 2
make[1]: Leaving directory
'/home/johan/Documents/buildroot/output/build/busybox-1.23.2'
package/pkg-generic.mk:156: recipe for target
'/home/johan/Documents/buildroot/output/build/busybox-1.23.2/.stamp_built'
failed
make: *** [/home/johan/Documents/buildroot/output/build/busybox-1.23.2/.stamp_built]
Error 2
----------8<----------8<----------8<----------8<----------8<----------8<----------

Any idea how to solve this error?

Best regards,
-- 
Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Busybox build fails on raspberrypi defconfig
  2015-06-17 13:27 [Buildroot] Busybox build fails on raspberrypi defconfig Johan Oudinet
@ 2015-06-17 14:02 ` Johan Oudinet
  2015-06-17 14:41   ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Oudinet @ 2015-06-17 14:02 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 17, 2015 at 3:27 PM, Johan Oudinet <johan.oudinet@gmail.com> wrote:
> And busybox build fails with the following error:
> include/libbb.h:87:19: fatal error: utmp.h: No such file or directory
>  # include <utmp.h>
>                    ^

Reverting from uClibc-ng to uClibc-0.9.33 fixes this error.

-- 
Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Busybox build fails on raspberrypi defconfig
  2015-06-17 14:02 ` Johan Oudinet
@ 2015-06-17 14:41   ` Thomas Petazzoni
  2015-06-18  8:54     ` Johan Oudinet
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-06-17 14:41 UTC (permalink / raw)
  To: buildroot

Dear Johan Oudinet,

On Wed, 17 Jun 2015 16:02:10 +0200, Johan Oudinet wrote:
> On Wed, Jun 17, 2015 at 3:27 PM, Johan Oudinet <johan.oudinet@gmail.com> wrote:
> > And busybox build fails with the following error:
> > include/libbb.h:87:19: fatal error: utmp.h: No such file or directory
> >  # include <utmp.h>
> >                    ^
> 
> Reverting from uClibc-ng to uClibc-0.9.33 fixes this error.

This seems weird, since UTMP is enabled in our uClibc-ng configuration:

$ grep UTMP *.config
uClibc-0.9.33.config:UCLIBC_HAS_UTMPX=y
uClibc-ng.config:UCLIBC_HAS_UTMP=y
uClibc-ng.config:UCLIBC_HAS_UTMPX=y
uClibc-snapshot.config:UCLIBC_HAS_UTMP=y
uClibc-snapshot.config:UCLIBC_HAS_UTMPX=y

And it's really UCLIBC_HAS_UTMP that controls whether utmp.h is
installed or not:

HEADERS_RM-$(UCLIBC_HAS_UTMP)               += bits/utmp.h utmp.h
HEADERS_RM-$(UCLIBC_HAS_UTMPX)               += bits/utmpx.h utmpx.h

Are you sure you did a full rebuild from scratch, and you didn't select
uClibc-ng but using package/uclibc/uClibc-0.9.33.config as the
configuration file ? That could explain the problem, because the
UCLIBC_HAS_UTMP option didn't exist in uClibc-0.9.33.config, so if you
use that config file with uClibc-ng, UTMP support will be disabled.

Can you double check this?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Busybox build fails on raspberrypi defconfig
  2015-06-17 14:41   ` Thomas Petazzoni
@ 2015-06-18  8:54     ` Johan Oudinet
  2015-06-18  9:02       ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Oudinet @ 2015-06-18  8:54 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

On Wed, Jun 17, 2015 at 4:41 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Are you sure you did a full rebuild from scratch, and you didn't select
> uClibc-ng but using package/uclibc/uClibc-0.9.33.config as the
> configuration file ? That could explain the problem, because the
> UCLIBC_HAS_UTMP option didn't exist in uClibc-0.9.33.config, so if you
> use that config file with uClibc-ng, UTMP support will be disabled.
>
> Can you double check this?

As I don't know how to do better than make clean and make defconfig to
rebuild from scratch, I've cloned the repository elsewhere.
Indeed, this time, it successfully compiles.

I still don't know why it didn't compile before, as I'm pretty sure
the .config was using uClibc-ng configuration file (because I've
manually changed it to uClibc-0.9.33.config when I reverted to uClibc
0.9.33). At least, I know the problem is not in the git master branch.

Thanks for your help.
-- 
Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Busybox build fails on raspberrypi defconfig
  2015-06-18  8:54     ` Johan Oudinet
@ 2015-06-18  9:02       ` Thomas Petazzoni
  2015-06-18 16:08         ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-06-18  9:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 18 Jun 2015 10:54:23 +0200, Johan Oudinet wrote:

> As I don't know how to do better than make clean and make defconfig to
> rebuild from scratch, I've cloned the repository elsewhere.
> Indeed, this time, it successfully compiles.
> 
> I still don't know why it didn't compile before, as I'm pretty sure
> the .config was using uClibc-ng configuration file (because I've
> manually changed it to uClibc-0.9.33.config when I reverted to uClibc
> 0.9.33). At least, I know the problem is not in the git master branch.

I told you in my previous e-mail, but maybe it wasn't clear. It's due
to a kconfig limitation/bug. Basically, here is the scenario:

 * You start from a fresh configuration.

 * You select uClibc 0.9.33, and exit menuconfig.

 * Automatically, the file package/uclibc/uClibc-0.9.33.config is used
   as the uclibc configuration file (option BR2_UCLIBC_CONFIG)

 * Now, you go back to menuconfig, and you decide to switch to
   uClibc-ng.

-> And now, instead of automatically switching to
package/uclibc/uClibc-ng.config, package/uclibc/uClibc-0.9.33.config is
kept as the value of BR2_UCLIBC_CONFIG. This is the limitation of
kconfig I'm talking about above.

See the log below:

$ make distclean
$ make menuconfig
[ no changes, so uClibc 0.9.33 is chosen, at least as long as you are
using Buildroot 2015.05 or older ]
$ grep -E "(BR2_UCLIBC_VERSION|BR2_UCLIBC_CONFIG)" .config
[...]
BR2_UCLIBC_VERSION_0_9_33=y
# BR2_UCLIBC_VERSION_NG is not set
[...]
BR2_UCLIBC_CONFIG="package/uclibc/uClibc-0.9.33.config"
$ make menuconfig
[ switch to uClibc-ng, save and exit ]
$ grep -E "(BR2_UCLIBC_VERSION|BR2_UCLIBC_CONFIG)" .config
[...]
# BR2_UCLIBC_VERSION_0_9_33 is not set
BR2_UCLIBC_VERSION_NG=y
[...]
BR2_UCLIBC_CONFIG="package/uclibc/uClibc-0.9.33.config"

So you end up doing a build of uClibc-ng, but using the uClibc 0.9.33
configuration file, which does not have UTMP=y (because that option did
not exist back in uClibc 0.9.33). So from the point of view of
uClibc-ng, UTMP support is disabled.

One way we could get around this problem is by making the
BR2_UCLIBC_CONFIG option visible only if the user selects another
option like "Use a custom uClibc configuration file".

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Busybox build fails on raspberrypi defconfig
  2015-06-18  9:02       ` Thomas Petazzoni
@ 2015-06-18 16:08         ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-06-18 16:08 UTC (permalink / raw)
  To: buildroot

On 06/18/15 11:02, Thomas Petazzoni wrote:
[snip]
> I told you in my previous e-mail, but maybe it wasn't clear. It's due
> to a kconfig limitation/bug. Basically, here is the scenario:
> 
>  * You start from a fresh configuration.
> 
>  * You select uClibc 0.9.33, and exit menuconfig.
> 
>  * Automatically, the file package/uclibc/uClibc-0.9.33.config is used
>    as the uclibc configuration file (option BR2_UCLIBC_CONFIG)
> 
>  * Now, you go back to menuconfig, and you decide to switch to
>    uClibc-ng.
> 
> -> And now, instead of automatically switching to
> package/uclibc/uClibc-ng.config, package/uclibc/uClibc-0.9.33.config is
> kept as the value of BR2_UCLIBC_CONFIG. This is the limitation of
> kconfig I'm talking about above.
[snip]
> One way we could get around this problem is by making the
> BR2_UCLIBC_CONFIG option visible only if the user selects another
> option like "Use a custom uClibc configuration file".

 Or let the default be empty, and choose a default from the .mk file when it's
empty. But we've discussed that before and some people didn't like it.

 Note: this applies for all string options for which we have multiple defaults:
BR2_TARGET_GRUB2_BUILTIN_MODULES, BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-18 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 13:27 [Buildroot] Busybox build fails on raspberrypi defconfig Johan Oudinet
2015-06-17 14:02 ` Johan Oudinet
2015-06-17 14:41   ` Thomas Petazzoni
2015-06-18  8:54     ` Johan Oudinet
2015-06-18  9:02       ` Thomas Petazzoni
2015-06-18 16:08         ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox