Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Build error with 2021.11.x
@ 2022-02-07 10:33 Andrey Nechypurenko
  2022-02-07 18:43 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Nechypurenko @ 2022-02-07 10:33 UTC (permalink / raw)
  To: buildroot

Hello Buildrooters,

I just updated Buildroot from 2021.08.x to 2021.11.x and got build problems.
In particular, ICU library could not be built. I was trying with ARM
external toolchain and with Linaro 2018 getting the same error.

It would be great if someone can provide hints on what might be wrong and
how to fix the problem. Below are the relevant logs and information.

Thank you,
Andrey.

➜  buildroot git:(2021.11.x) uname -a
Linux tutnix 5.4.0-97-generic #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC
2022 x86_64 x86_64 x86_64 GNU/Linux
➜  buildroot git:(2021.11.x) lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

=================== Error message: ==========================

>>> icu 69-1 Extracting
gzip -d -c /home/and/p2/download/icu/icu4c-69_1-src.tgz | tar
--strip-components=1 -C /home/and/p2/build/prodx/build/icu-69-1   -xf
-
>>> icu 69-1 Patching

Applying 0001-dont-build-static-dynamic-twice.patch using patch:
patching file source/config/mh-linux
Hunk #1 succeeded at 37 (offset 2 lines).

Applying 0002-workaround-toolchain-bugs.patch using patch:
patching file source/configure
Hunk #1 succeeded at 4478 (offset 155 lines).
Hunk #2 succeeded at 4492 (offset 155 lines).

Applying 0003-link-icudata-as-data-only.patch using patch:
patching file source/config/mh-linux
Hunk #1 succeeded at 23 (offset 2 lines).

Applying 0004-fix-static-linking-with-icu-uc.patch using patch:
patching file source/Makefile.in
Hunk #1 succeeded at 276 (offset 12 lines).

Applying 0005-ICU-21587-Fix-memory-bug-w-baseName.patch using patch:
patching file source/common/locid.cpp
Hunk #2 succeeded at 2700 (offset 15 lines).
patching file source/test/intltest/loctest.cpp
Hunk #1 succeeded at 282 (offset -2 lines).
Hunk #2 succeeded at 6479 (offset -43 lines).
patching file source/test/intltest/loctest.h
Hunk #1 succeeded at 154 (offset -2 lines).
>>> icu 69-1 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find
/home/and/p2/build/prodx/build/icu-69-1 -name $file); do cp
support/gnuconfig/$file $i; done; done
>>> icu 69-1 Patching libtool
>>> icu 69-1 Configuring
(cd /home/and/p2/build/prodx/build/icu-69-1/source && rm -rf
config.cache &&
PATH="/home/and/p2/build/prodx/host/bin:/home/and/p2/build/prodx/host/sbin:/home/and/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/and/.dotnet/tools:/usr/local/go/bin"
AR="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-ar"
AS="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-as"
LD="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-ld"
NM="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-nm"
CC="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gcc"
GCC="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gcc"
CPP="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-cpp"
CXX="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-g++"
FC="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gfortran"
F77="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gfortran"
RANLIB="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-ranlib"
READELF="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-readelf"
STRIP="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-strip"
OBJCOPY="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-objcopy"
OBJDUMP="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-objdump"
AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as"
CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc"
CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld"
CPPFLAGS_FOR_BUILD="-I/home/and/p2/build/prodx/host/include"
CFLAGS_FOR_BUILD="-O2 -I/home/and/p2/build/prodx/host/include"
CXXFLAGS_FOR_BUILD="-O2 -I/home/and/p2/build/prodx/host/include"
LDFLAGS_FOR_BUILD="-L/home/and/p2/build/prodx/host/lib
-Wl,-rpath,/home/and/p2/build/prodx/host/lib" FCFLAGS_FOR_BUILD=""
DEFAULT_ASSEMBLER="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-as"
DEFAULT_LINKER="/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-ld"
CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0
-D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -O3 -g0 -D_FORTIFY_SOURCE=1" LDFLAGS=""
FCFLAGS=" -O3 -g0" FFLAGS=" -O3 -g0"
PKG_CONFIG="/home/and/p2/build/prodx/host/bin/pkg-config"
STAGING_DIR="/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot"
INTLTOOL_PERL=/usr/bin/perl CFLAGS="-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0
-D_FORTIFY_SOURCE=1
-I/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm"
LDFLAGS=" -ldrm" ac_cv_lbl_unaligned_fail=yes
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_memcmp_working=yes
ac_cv_have_decl_malloc=yes gl_cv_func_malloc_0_nonnull=yes
ac_cv_func_malloc_0_nonnull=yes ac_cv_func_calloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
lt_cv_sys_lib_search_path_spec="" ac_cv_c_bigendian=no
LIBS="-latomic" CONFIG_SITE=/dev/null ./configure
--target=arm-buildroot-linux-gnueabihf
--host=arm-buildroot-linux-gnueabihf --build=x86_64-pc-linux-gnu
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--localstatedir=/var --program-prefix="" --disable-gtk-doc
--disable-gtk-doc-html --disable-doc --disable-docs
--disable-documentation --with-xmlto=no --with-fop=no
--disable-dependency-tracking --enable-ipv6 --enable-nls
--disable-static --enable-shared
--with-cross-build=/home/and/p2/build/prodx/build/host-icu-69-1/source
--disable-samples --disable-tests )
configure: WARNING: unrecognized options: --disable-gtk-doc,
--disable-gtk-doc-html, --disable-doc, --disable-docs,
--disable-documentation, --with-xmlto, --with-fop,
--disable-dependency-tracking, --enable-ipv6, --enable-nls
checking for ICU version numbers... release 69.1, library 69.1,
unicode version 13.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-buildroot-linux-gnueabihf
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking for arm-buildroot-linux-gnueabihf-clang...
/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gcc
checking whether the C compiler works... no
configure: error: in `/home/and/p2/build/prodx/build/icu-69-1/source':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [package/pkg-generic.mk:285:
/home/and/p2/build/prodx/build/icu-69-1/.stamp_configured] Error 77
make: *** [Makefile:23: _all] Error 2


=================== From config.log =============================

configure:3057: checking whether the C compiler works
configure:3079:
/home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3
-g0 -D_FORTIFY_SOURCE=1
-I/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-ldrm conftest.c -latomic >&5
/home/and/p2/build/prodx/host/opt/ext-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -ldrm
collect2: error: ld returned 1 exit status
configure:3083: $? = 1
configure:3121: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "ICU"
| #define PACKAGE_TARNAME "International Components for Unicode"
| #define PACKAGE_VERSION "69.1"
| #define PACKAGE_STRING "ICU 69.1"
| #define PACKAGE_BUGREPORT "http://icu-project.org/bugs"
| #define PACKAGE_URL "http://icu-project.org"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3126: error: in `/home/and/p2/build/prodx/build/icu-69-1/source':
configure:3128: error: C compiler cannot create executables

=================== In build directory =========================

$ find . -name "*drm*"
./build/buildroot-config/br2/package/libdrm
./build/buildroot-config/br2/package/libdrm.h
./build/buildroot-config/br2/package/glmark2/flavor/drm
./build/buildroot-config/br2/package/weston/default/drm.h
./build/buildroot-config/br2/package/weston/drm.h
./build/buildroot-config/br2/package/sdl2/kmsdrm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/msm_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/drm_sarea.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/sis_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/r128_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/i915_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/amdgpu_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/qxl_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/via_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/radeon_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/savage_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/virtgpu_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/nouveau_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/exynos_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/vmwgfx_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/mga_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/tegra_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/i810_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/vc4_drm.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/drm_fourcc.h
./host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm/drm_mode.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/msm_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/drm_sarea.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/sis_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/r128_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/i915_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/amdgpu_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/qxl_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/via_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/radeon_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/savage_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/virtgpu_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/nouveau_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/exynos_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/vmwgfx_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/mga_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/tegra_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/i810_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/vc4_drm.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/drm_fourcc.h
./host/opt/ext-toolchain/arm-linux-gnueabihf/libc/usr/include/drm/drm_mode.h
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] Build error with 2021.11.x
  2022-02-07 10:33 [Buildroot] Build error with 2021.11.x Andrey Nechypurenko
@ 2022-02-07 18:43 ` Peter Korsgaard
  2022-02-07 19:44   ` Andrey Nechypurenko
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2022-02-07 18:43 UTC (permalink / raw)
  To: Andrey Nechypurenko; +Cc: buildroot

>>>>> "Andrey" == Andrey Nechypurenko <andreynech@gmail.com> writes:

 > Hello Buildrooters,
 > I just updated Buildroot from 2021.08.x to 2021.11.x and got build problems.
 > In particular, ICU library could not be built. I was trying with ARM
 > external toolchain and with Linaro 2018 getting the same error.

 > It would be great if someone can provide hints on what might be wrong and
 > how to fix the problem. Below are the relevant logs and information.

 > Thank you,
 > Andrey.

 >>>> icu 69-1 Configuring

[snip]

 > INTLTOOL_PERL=/usr/bin/perl CFLAGS="-D_LARGEFILE_SOURCE
 > -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0
 > -D_FORTIFY_SOURCE=1
 > -I/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm"
 > LDFLAGS=" -ldrm" ac_cv_lbl_unaligned_fail=yes

Hmm, is this a pristine upstream Buildroot 2021.11 without any external
packages? You seem to be passing some extra CFLAGS / LDFLAGS to the
configure script.

Variables like TARGET_CONFIGURE_OPTS are global, so you cannot change it
in a custom package without causing problems, like this:

 > configure:3057: checking whether the C compiler works
 > configure:3079:
 > /home/and/p2/build/prodx/host/bin/arm-linux-gnueabihf-gcc
 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3
 > -g0 -D_FORTIFY_SOURCE=1
 > -I/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm
 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 > -ldrm conftest.c -latomic >&5
 > /home/and/p2/build/prodx/host/opt/ext-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/7.3.1/../../../../arm-linux-gnueabihf/bin/ld:
 > cannot find -ldrm

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] Build error with 2021.11.x
  2022-02-07 18:43 ` Peter Korsgaard
@ 2022-02-07 19:44   ` Andrey Nechypurenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Nechypurenko @ 2022-02-07 19:44 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

Hi Peter,

> >>>> icu 69-1 Configuring
>
> [snip]
>
> > INTLTOOL_PERL=/usr/bin/perl CFLAGS="-D_LARGEFILE_SOURCE
> > -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0
> > -D_FORTIFY_SOURCE=1
> > -I/home/and/p2/build/prodx/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/drm"
> > LDFLAGS=" -ldrm" ac_cv_lbl_unaligned_fail=yes
>
> Hmm, is this a pristine upstream Buildroot 2021.11 without any external
> packages? You seem to be passing some extra CFLAGS / LDFLAGS to the
> configure script.
>
> Variables like TARGET_CONFIGURE_OPTS are global, so you cannot change it
> in a custom package without causing problems, like this:

Indeed, I am using an external tree and one custom package did modify
TARGET_CONFIGURE_OPTS. Somehow I did not realize that these variables are
global.

Thank you very much! Really appreciate the help.

Best regards,
Andrey.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-02-07 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-07 10:33 [Buildroot] Build error with 2021.11.x Andrey Nechypurenko
2022-02-07 18:43 ` Peter Korsgaard
2022-02-07 19:44   ` Andrey Nechypurenko

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