* Problems building util-linux when wide character support is disabled in distro
@ 2013-09-17 15:09 Hans Beckérus
2013-09-17 19:14 ` Hans Beckerus
0 siblings, 1 reply; 4+ messages in thread
From: Hans Beckérus @ 2013-09-17 15:09 UTC (permalink / raw)
To: yocto@yoctoproject.org
Hi. We are having som problems building our rootfs now that our custom
distro (based on poky-tiny) no longer includes wide character support
in libc.
Here is an example of the errors we get:
| arm-poky-linux-gnueabi-libtool: link: arm-poky-linux-gnueabi-gcc
-march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mtune=cortex-a9
--sysroot=/home/qhanbec/poky/build/tmp/sysroots/zynq-zc706 -std=gnu99
-fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra
-Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes
-Wno-missing-field-initializers -Wredundant-decls -Wsign-compare
-Wtype-limits -Wuninitialized -Wunused-but-set-parameter
-Wunused-but-set-variable -Wunused-parameter -Wunused-result
-Wunused-variable -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -o ul text-utils/ul.o -ltinfo
| text-utils/rev.o: In function `main':
| /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:139:
undefined reference to `fgetws'
| /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:151:
undefined reference to `fgetws'
| /home//poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:154:
undefined reference to `wcslen'
| /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:160:
undefined reference to `putwchar'
| /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:162:
undefined reference to `putwchar'
| collect2: error: ld returned 1 exit status
The problem is that util-linux still thinks we have wide character
support (from configure.ac):
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <wchar.h>
#include <wctype.h>
#include <stdio.h>
]], [[
wchar_t wc;
wint_t w;
w = fgetwc(stdin);
if (w == WEOF) exit(1);
wc = w;
fputwc(wc,stdout);
]])],
[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
])
Since no linking is performed due to x-compilation, all that this does
is basically checking if wchar.h exists or not.
And that is also were the problem is. Even if we have disabled wide
character support in eglibc, the wchar.h header files is still copied
to our sysroot!?
Is that really how it should be when DISTRO_FEATURES_LIBC does not
include 'libc-posix-clang-wchar libc-posix-wchar-io'?
Here is our DISTRO_FEATURES (as reported by bitbake -e) and build environment:
DISTRO_FEATURES="ipv4 usbhost usbgadget ${DISTRO_FEATURES_WIFI}
libc-libm libc-crypt libc-utmp libc-getlogin libc-posix-regexp
libc-inet libc-nis sysvinit largefile nfs"
Build Configuration:
BB_VERSION = "1.19.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "SUSE-LINUX-11"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "zynq-zc706"
DISTRO = "poky-chris"
DISTRO_VERSION = "1.4+snapshot-20130917"
TUNE_FEATURES = "armv7a vfp cortexa9"
TARGET_FPU = "vfp"
meta
meta-yocto
meta-yocto-bsp = "master:3b38c898a4647c6a639d0dbd416b0bbacbf278f5"
meta-oe = "master:7c292ce28756824b1fa377d516aedd979fa41f19"
Any ideas how what might be wrong here?
Thanks.
Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems building util-linux when wide character support is disabled in distro
2013-09-17 15:09 Problems building util-linux when wide character support is disabled in distro Hans Beckérus
@ 2013-09-17 19:14 ` Hans Beckerus
2013-09-18 8:12 ` Paul Eggleton
0 siblings, 1 reply; 4+ messages in thread
From: Hans Beckerus @ 2013-09-17 19:14 UTC (permalink / raw)
To: yocto@yoctoproject.org
On 2013-09-17 5:09, Hans Beckérus wrote:
> Hi. We are having som problems building our rootfs now that our custom
> distro (based on poky-tiny) no longer includes wide character support
> in libc.
> Here is an example of the errors we get:
>
> | arm-poky-linux-gnueabi-libtool: link: arm-poky-linux-gnueabi-gcc
> -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mtune=cortex-a9
> --sysroot=/home/qhanbec/poky/build/tmp/sysroots/zynq-zc706 -std=gnu99
> -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra
> -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes
> -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare
> -Wtype-limits -Wuninitialized -Wunused-but-set-parameter
> -Wunused-but-set-variable -Wunused-parameter -Wunused-result
> -Wunused-variable -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed -o ul text-utils/ul.o -ltinfo
> | text-utils/rev.o: In function `main':
> | /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:139:
> undefined reference to `fgetws'
> | /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:151:
> undefined reference to `fgetws'
> | /home//poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:154:
> undefined reference to `wcslen'
> | /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:160:
> undefined reference to `putwchar'
> | /home/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/util-linux/2.22.2-r3/util-linux-2.22.2/text-utils/rev.c:162:
> undefined reference to `putwchar'
> | collect2: error: ld returned 1 exit status
>
> The problem is that util-linux still thinks we have wide character
> support (from configure.ac):
>
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include <wchar.h>
> #include <wctype.h>
> #include <stdio.h>
> ]], [[
> wchar_t wc;
> wint_t w;
> w = fgetwc(stdin);
> if (w == WEOF) exit(1);
> wc = w;
> fputwc(wc,stdout);
> ]])],
> [AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
> ])
>
> Since no linking is performed due to x-compilation, all that this does
> is basically checking if wchar.h exists or not.
Actually, I think what is missing here is a AC_TRY_LINK.
But it does not seem to matter much. There are also numerous of places in the util-linux code that are
completely missing out on checks if wide character support is available or not.
The way forward as I can see right now is to revert and put back the wide character support in libc.
Unless I can figure out why util-linux is actually being built in the first place? What can cause dependencies to this
package? It is not part of our IMAGE_FEATURES directly, nor indirectly and is not installed in our rootfs.
But something requires it. Any hints on how to trace this back?
> And that is also were the problem is. Even if we have disabled wide
> character support in eglibc, the wchar.h header files is still copied
> to our sysroot!?
> Is that really how it should be when DISTRO_FEATURES_LIBC does not
> include 'libc-posix-clang-wchar libc-posix-wchar-io'?
> Here is our DISTRO_FEATURES (as reported by bitbake -e) and build environment:
>
> DISTRO_FEATURES="ipv4 usbhost usbgadget ${DISTRO_FEATURES_WIFI}
> libc-libm libc-crypt libc-utmp libc-getlogin libc-posix-regexp
> libc-inet libc-nis sysvinit largefile nfs"
>
> Build Configuration:
> BB_VERSION = "1.19.0"
> BUILD_SYS = "x86_64-linux"
> NATIVELSBSTRING = "SUSE-LINUX-11"
> TARGET_SYS = "arm-poky-linux-gnueabi"
> MACHINE = "zynq-zc706"
> DISTRO = "poky-chris"
> DISTRO_VERSION = "1.4+snapshot-20130917"
> TUNE_FEATURES = "armv7a vfp cortexa9"
> TARGET_FPU = "vfp"
> meta
> meta-yocto
> meta-yocto-bsp = "master:3b38c898a4647c6a639d0dbd416b0bbacbf278f5"
> meta-oe = "master:7c292ce28756824b1fa377d516aedd979fa41f19"
>
> Any ideas how what might be wrong here?
>
> Thanks.
> Hans
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems building util-linux when wide character support is disabled in distro
2013-09-17 19:14 ` Hans Beckerus
@ 2013-09-18 8:12 ` Paul Eggleton
2013-09-18 9:00 ` Hans Beckérus
0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2013-09-18 8:12 UTC (permalink / raw)
To: Hans Beckerus; +Cc: yocto
Hi Hans,
On Tuesday 17 September 2013 21:14:50 Hans Beckerus wrote:
> The way forward as I can see right
> now is to revert and put back the wide character support in libc. Unless I
> can figure out why util-linux is actually being built in the first place?
> What can cause dependencies to this package? It is not part of our
> IMAGE_FEATURES directly, nor indirectly and is not installed in our rootfs.
> But something requires it. Any hints on how to trace this back?
Look at the dot graphs produced by bitbake -g (too large to be viewed in a
viewer, but you can look at them in text form) or use bitbake -g -u depexp
which provides a UI for exploring dependencies.
FWIW, looking at the graphs here for core-image-minimal, udev is the most
likely culprit unless you have something else that needs it (e.g. e2fsprogs).
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems building util-linux when wide character support is disabled in distro
2013-09-18 8:12 ` Paul Eggleton
@ 2013-09-18 9:00 ` Hans Beckérus
0 siblings, 0 replies; 4+ messages in thread
From: Hans Beckérus @ 2013-09-18 9:00 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
On Wed, Sep 18, 2013 at 10:12 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Hi Hans,
>
> On Tuesday 17 September 2013 21:14:50 Hans Beckerus wrote:
>> The way forward as I can see right
>> now is to revert and put back the wide character support in libc. Unless I
>> can figure out why util-linux is actually being built in the first place?
>> What can cause dependencies to this package? It is not part of our
>> IMAGE_FEATURES directly, nor indirectly and is not installed in our rootfs.
>> But something requires it. Any hints on how to trace this back?
>
> Look at the dot graphs produced by bitbake -g (too large to be viewed in a
> viewer, but you can look at them in text form) or use bitbake -g -u depexp
> which provides a UI for exploring dependencies.
>
> FWIW, looking at the graphs here for core-image-minimal, udev is the most
> likely culprit unless you have something else that needs it (e.g. e2fsprogs).
>
Thanks Paul. I think it is e2fsprogs.
Actually, now after I enabled wide support again, I am having problems
building e2fsprogs instead.
e4defrag.c:1906: undefined reference to `nftw64'
AFAIK, nftw64 is part of the large file support, but that we have not
changed in our DISTRO_FEATURES so that came as a surprise really :(
Hans
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-18 9:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 15:09 Problems building util-linux when wide character support is disabled in distro Hans Beckérus
2013-09-17 19:14 ` Hans Beckerus
2013-09-18 8:12 ` Paul Eggleton
2013-09-18 9:00 ` Hans Beckérus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.