Bug 635 - util-linux fails to build in 2009.08
Summary: util-linux fails to build in 2009.08
Status: VERIFIED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 critical
Target Milestone: 2010.02
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-30 09:18 UTC by igor
Modified: 2010-08-11 19:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
all my .config files from 'make saveconfig' (21.33 KB, application/gzip)
2009-09-30 09:18 UTC, igor
Details
last .config (19.62 KB, text/plain)
2010-07-28 19:14 UTC, Sérgio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description igor 2009-09-30 09:18:42 UTC
Created attachment 677 [details]
all my .config files from 'make saveconfig'

this is absolutely a showstopper for me. i seem to have continuous problems building util-linux with several of the past buildroot releases - if nobody else is having these problems, maybe it's something about my build environment?

a google search shows that these errors might result from large file support not being turned on, but it definitely is.

/provisioning/buildroot/buildroot-2009.08/build_i686/staging_dir/usr/bin/i686-linux-uclibc-gcc  -g -O2   -o pivot_root  pivot_root.o  
swapon.c:86: error: expected declaration specifiers or '...' before 'swapon'
swapon.c:86: error: expected declaration specifiers or '...' before 'path'
swapon.c:86: error: expected declaration specifiers or '...' before 'flags'
swapon.c:88: error: expected declaration specifiers or '...' before 'swapoff'
swapon.c:88: error: expected declaration specifiers or '...' before 'path'
swapon.c: In function 'swapon_all':
swapon.c:328: error: 'R_OK' undeclared (first use in this function)
swapon.c:328: error: (Each undeclared identifier is reported only once
swapon.c:328: error: for each function it appears in.)
make[3]: *** [swapon.o] Error 1
make[3]: Leaving directory `/provisioning/buildroot/buildroot-2009.08/build_i686/util-linux-2.13-pre7/mount'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/provisioning/buildroot/buildroot-2009.08/build_i686/util-linux-2.13-pre7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/provisioning/buildroot/buildroot-2009.08/build_i686/util-linux-2.13-pre7'
make: *** [/provisioning/buildroot/buildroot-2009.08/build_i686/util-linux-2.13-pre7/misc-utils/chkdupexe] Error 2

please let me know if there's anything else i can supply to help troubleshoot this
Comment 1 igor 2009-09-30 10:05:48 UTC
according to a conversation @ http://ibot.rikers.org/%23uclibc/20031113.html.gz, adding

#include <fcntl.h>

to swapon.c seems to fix half the problem - the part about R_OK undeclared. This still leaves the other half:

swapon.c:86: error: expected declaration specifiers or '...' before 'swapon'
swapon.c:86: error: expected declaration specifiers or '...' before 'path'
swapon.c:86: error: expected declaration specifiers or '...' before 'flags'
swapon.c:88: error: expected declaration specifiers or '...' before 'swapoff'
swapon.c:88: error: expected declaration specifiers or '...' before 'path'
Comment 2 Peter Korsgaard 2009-11-29 21:08:56 UTC
(In reply to comment #0)

> this is absolutely a showstopper for me. i seem to have continuous problems
> building util-linux with several of the past buildroot releases - if nobody
> else is having these problems, maybe it's something about my build environment?

I haven't been able to reproduce it here atleast.
Comment 3 Peter Korsgaard 2010-03-23 09:12:14 UTC
Still unable to reproduce, so closing.
Comment 4 Sérgio 2010-07-27 15:30:01 UTC
Have have this show stopper also , with from today buildroot git version.

Making all in text-utils
(...)
In file included from more.c:56:
buildroot/output/staging/usr/include/a.out.h:1:25: error: linux/a.out.h: No such file or directory
more.c: In function 'magic':
more.c:507: error: 'OMAGIC' undeclared (first use in this function)
more.c:507: error: (Each undeclared identifier is reported only once
more.c:507: error: for each function it appears in.)
more.c:508: error: 'NMAGIC' undeclared (first use in this function)
more.c:509: error: 'ZMAGIC' undeclared (first use in this function)
make[3]: *** [more.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `buildroot/output/build/util-linux-2.13-pre7/text-utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `buildroot/output/build/util-linux-2.13-pre7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `buildroot/output/build/util-linux-2.13-pre7'
make: *** [buildroot/output/build/util-linux-2.13-pre7/misc-utils/chkdupexe] Error 2

furthermore I do a couple of commands like cd .. , cd - (or I wait sometime ?!), do a make , and make forget this package and go to the finish , but never built the more binary and others.
Comment 5 Thomas Petazzoni 2010-07-27 15:43:12 UTC
Please provide your Buildroot .config to allow us to reproduce the issue.
Comment 6 Sérgio 2010-07-28 19:14:28 UTC
Created attachment 2269 [details]
last .config

(In reply to comment #5)
> Please provide your Buildroot .config to allow us to reproduce the issue.

linux/a.out.h seems to belongs to kernel headers and I don't have a kernel cross-compiled. which make more.c depends on kernel-headers, because needs 3 constants ?! OMAGIC NMAGIC ZMAGIC. 

I got a CPU "core i5", which I can compile this in more or less one hour , 
I need do 2 or 3 times :
make flush
make
Comment 7 Peter Korsgaard 2010-07-29 07:08:18 UTC
(In reply to comment #6)
> Created attachment 2269 [details]
> last .config
> 
> (In reply to comment #5)
> > Please provide your Buildroot .config to allow us to reproduce the issue.
> 
> linux/a.out.h seems to belongs to kernel headers and I don't have a kernel
> cross-compiled. which make more.c depends on kernel-headers, because needs 3
> constants ?! OMAGIC NMAGIC ZMAGIC. 

Yes, kernel headers are seperate from building a kernel for your target.

linux/a.out.h is a legacy header (for the a.out format), which is only available on the following archs:

ls arch/*/include/asm/a.out.h                      ~/source/linux-2.6
arch/alpha/include/asm/a.out.h  arch/m68k/include/asm/a.out.h
arch/arm/include/asm/a.out.h    arch/x86/include/asm/a.out.h

So that won't work on mipsel.

I'll see what we can do about it.
Comment 8 Thomas Petazzoni 2010-08-10 17:25:43 UTC
I have added a fix for the util-linux build failure on MIPS reported in this bug to my for-2010.08 branch. See http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=for-2010.08&id=55f70939b839cd5ad826ea01fcb6d363d63ee15d.

This branch will be pushed to Peter before the 2010.08 release.