Bug 5865 - poky-tiny qemux86 uclibc build fails
Summary: poky-tiny qemux86 uclibc build fails
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.6
Hardware: x86 x86
: Medium normal
Target Milestone: 1.6
Assignee: valentin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-02-22 11:05 UTC by Jonathan Liu
Modified: 2014-04-08 11:53 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Liu 2014-02-22 11:05:43 UTC
Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Arch-rolling"
TARGET_SYS        = "i586-poky-linux-uclibc"
MACHINE           = "qemux86"
DISTRO            = "poky-tiny"
DISTRO_VERSION    = "1.5+snapshot-20140222"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:8d7dd9ae471ad6154cd4e59152560ff5f24b3c2a"

Changes to local.conf:
DISTRO ?= "poky-tiny"
PACKAGE_CLASSES ?= "package_ipk"
TCLIBC = "uclibc"

It fails compiling uclibc-initial.

extra/locale/gen_wc8bit `cat extra/locale/codesets.txt` > extra/locale/c8tables.h
for locale in en_US en_US en_GB; do \
	extra/locale/gen_wctype -v -v $locale > extra/locale/wctables.h || \
	extra/locale/gen_wctype -v -v $locale.UTF-8 > extra/locale/wctables.h || \
	extra/locale/gen_wctype -v -v $locale.iso8859-1 > extra/locale/wctables.h && break; \
done
setlocale(LC_CTYPE,en_US) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_US.UTF-8) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_US.iso8859-1) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_US) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_US.UTF-8) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_US.iso8859-1) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_GB) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_GB.UTF-8) failed!  Skipping this locale...
setlocale(LC_CTYPE,en_GB.iso8859-1) failed!  Skipping this locale...
extra/locale/Makefile.in:173: recipe for target 'extra/locale/wctables.h' failed
make: *** [extra/locale/wctables.h] Error 1

BB_NUMBER_THREADS and PARALLEL_MAKE is automatically set to 8.
Comment 1 Khem Raj 2014-02-26 20:50:31 UTC
most probably its some messed up locale on build host. Can you reproduce the same on another build host ?
Comment 2 Saul Wold 2014-02-27 09:06:14 UTC
Please verify your host locale setup as Khem Suggested
Comment 3 Jonathan Liu 2014-02-27 10:41:51 UTC
Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Arch-rolling"
TARGET_SYS        = "i586-poky-linux-uclibc"
MACHINE           = "qemux86"
DISTRO            = "poky-tiny"
DISTRO_VERSION    = "1.5+snapshot-20140227"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:5ab9d7e28f987fba8bab03bb7851c263f746c208"

I didn't have en_US and en_GB locales enabled on my host so I have enabled it and uclibc-initial builds.

However, I get the following now when it tries to build uclibc-git:
| i586-poky-linux-uclibc-gcc  -m32 -march=i586 --sysroot=/home/net147/git/poky-minimal/build/tmp/sysroots/qemux86-tcbootstrap -c libc/sysdeps/linux/common/sethostname.c -o libc/sysdeps/linux/common/sethostname.os -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -std=gnu99 -m32 -fno-stack-protector -nostdinc -I./include -I./include -include libc-symbols.h -I./libc/sysdeps/linux/i386 -I./libc/sysdeps/linux -I./ldso/ldso/i386 -I./ldso/include -I. -O2 -pipe -g -feliminate-unused-debug-types  -Os -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fomit-frame-pointer -mpreferred-stack-boundary=4 -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -O2 -pipe -g -feliminate-unused-debug-types -DHAVE_FORCED_UNWIND -I./libpthread/nptl -I./libpthread/nptl -I./libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686 -I./libpthread/nptl/sysdeps/unix/sysv/linux/i386 -I./libpthread/nptl/sysdeps/i386 -I./libpthread/nptl/sysdeps/i386 -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/pthread -I./libpthread/nptl/sysdeps/pthread/bits -I./libpthread/nptl/sysdeps/generic -I./libc/sysdeps/linux/common -isystem /home/net147/git/poky-minimal/build/tmp/sysroots/x86_64-linux/usr/lib/i586-poky-linux-uclibc.gcc-cross-initial/gcc/i586-poky-linux-uclibc/4.8.2/include-fixed -isystem /home/net147/git/poky-minimal/build/tmp/sysroots/x86_64-linux/usr/lib/i586-poky-linux-uclibc.gcc-cross-initial/gcc/i586-poky-linux-uclibc/4.8.2/include -I/home/net147/git/poky-minimal/build/tmp/sysroots/qemux86/usr/include/ -DNDEBUG -D__USE_STDIO_FUTEXES__ -fPIC     -MT libc/sysdeps/linux/common/sethostname.os -MD -MP -MF libc/sysdeps/linux/common/.sethostname.os.dep
| libc/sysdeps/linux/common/posix_fadvise.c:26:29: error: unknown type name 'off64_t'
|  int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
|                              ^
| libc/sysdeps/linux/common/posix_fadvise.c:26:45: error: unknown type name 'off64_t'
|  int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
|                                              ^
| libc/sysdeps/linux/common/posix_fadvise.c: In function 'posix_fadvise':
| libc/sysdeps/linux/common/posix_fadvise.c:32:2: warning: implicit declaration of function 'posix_fadvise64' [-Wimplicit-function-declaration]
|   return posix_fadvise64(fd, offset, len, advice);
|   ^
| Makerules:363: recipe for target 'libc/sysdeps/linux/common/posix_fadvise.os' failed
| make: *** [libc/sysdeps/linux/common/posix_fadvise.os] Error 1
Comment 4 valentin 2014-03-28 14:15:11 UTC
The problem seems to be with the commit 00571b43df2e0554d1b0716681832ba9975177c5 from uclibc repo. I've sent an email on the uclibc mailing list asking the author to send a patch that fixes the xtensa issue that also doesn't break the other platforms. If get no response I'll try to send a fix for this (although I might break xtensa).
Comment 5 Khem Raj 2014-03-28 17:56:35 UTC
can you enable 'largefile' in distro features ?
Comment 6 valentin 2014-03-31 15:23:51 UTC
Thanks Khem for the suggestion! 
Indeed adding "largefile" to DISTRO_FEATURES fixes the build problem. 
I'm not sure yet if this avoids the real problem (building without large file support doesn't work) or is the right "fix" (building without large file support is "deprecated" in uclibc).
Comment 7 Khem Raj 2014-03-31 16:43:52 UTC
(In reply to comment #6)
> Thanks Khem for the suggestion! 
> Indeed adding "largefile" to DISTRO_FEATURES fixes the build problem. 
> I'm not sure yet if this avoids the real problem (building without large
> file support doesn't work) or is the right "fix" (building without large
> file support is "deprecated" in uclibc).

this is actually bypassing the problem in uclibc and its a known one. but then
largefile support is essential now a days, so enabling it in poky-tiny might not be a bad idea in general.
Comment 8 valentin 2014-04-04 10:34:37 UTC
Sent a patch that enables LFS for uclibc.