From: Christian Stewart <christian@paral.in>
To: buildroot@busybox.net
Subject: [Buildroot] build failure against libintl on alpine
Date: Tue, 26 Dec 2017 20:46:11 -0800 [thread overview]
Message-ID: <871sjgg4mk.fsf@paral.in> (raw)
Hi all,
Here with another build error today, this time against Alpine linux.
Building under an Alpine container with the following world set:
alpine-baselayout
alpine-keys
alpine-sdk
apk-tools
bash
bc
busybox
curl
file
gettext
libc-utils
libintl
libtool
make
musl-dev
ncurses
patch
perl
python
rsync
wget
I get the following error attempting to build:
libtool: link: /usr/bin/gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=26214
4 -I./../zlib -O2 -I/home/buildroot/output/host/include -static-libstdc++ -static-libgcc -
Wl,-rpath -Wl,/home/buildroot/output/host/lib -o bfdtest2 bfdtest2.o /home/buildroot/skiff
/buildroot/output/host/lib/libintl.so -Wl,-rpath -Wl,/home/buildroot/output/host/lib -L/h
ome/buildroot/skiff/buildroot/output/host/lib ../bfd/.libs/libbfd.a -L/home/buildroot/outp
ut/build/host-binutils-2.27/zlib -lz ../libiberty/libiberty.a
../bfd/.libs/libbfd.a(elflink.o): In function `undefined_reference':
elflink.c:(.text+0x450): undefined reference to `libintl_dgettext'
../bfd/.libs/libbfd.a(elflink.o): In function `init_reloc_cookie':
elflink.c:(.text+0x580): undefined reference to `libintl_dgettext'
../bfd/.libs/libbfd.a(elflink.o): In function `elf_link_read_relocs_from_section.part.17':
elflink.c:(.text+0x18ca): undefined reference to `libintl_dgettext'
elflink.c:(.text+0x197e): undefined reference to `libintl_dgettext'
../bfd/.libs/libbfd.a(elflink.o): In function `check_dynsym.isra.18.part.19':
elflink.c:(.text+0x19d4): undefined reference to `libintl_dgettext'
../bfd/.libs/libbfd.a(elflink.o):elflink.c:(.text+0x1ca5): more undefined references to `libintl_dgettext'
follow
A reproduction in Docker is possible with the following Dockerfile:
FROM alpine:edge
RUN apk --update upgrade
RUN apk add make git bash ncurses gcc wget curl \
musl-dev file g++ perl python rsync bc patch \
libintl libtool alpine-sdk gettext
RUN adduser -D -u 1000 -g 1001 buildroot && \
mkdir -p /home/buildroot && chown buildroot:buildroot /home/buildroot
USER buildroot
WORKDIR /home/buildroot
Then:
cd buildroot/
docker build -t "buildroot:latest" .
docker run -v $(pwd):/home/buildroot/ --rm -it buildroot:latest sh
$ make clean
$ make defconfig BR2_DEFCONFIG=configs/raspberrypi3_defconfig
$ make
I would assume this is some incompatibility when trying to link against
the latest versions of libintl or gettext or so.
In addition to my own config, I attempted the uclibc-based pi 3
defconfig:
$ make clean
$ make defconfig BR2_DEFCONFIG=configs/raspberrypi3_defconfig
$ make
Result:
make[1]: Entering directory '/home/buildroot/output/build/uclibc-1.0.26/utils'
HOSTCC utils/getconf.host
HOSTCC utils/ldconfig.host
HOSTCC utils/ldd.host
../utils/getconf.c:439:29: error: '_SC_CHARCLASS_NAME_MAX' undeclared here (not in a function)
{ "CHARCLASS_NAME_MAX", _SC_CHARCLASS_NAME_MAX, SYSCONF },
^~~~~~~~~~~~~~~~~~~~~~
../utils/getconf.c: In function 'print_all':
../utils/getconf.c:1092:24: error: '_SC_UINT_MAX' undeclared (first use in this function)
if (c->call_name == _SC_UINT_MAX
^~~~~~~~~~~~
../utils/getconf.c:1092:24: note: each undeclared identifier is reported only once for each function it appears in
../utils/getconf.c:1092:21: warning: comparison between pointer and integer
if (c->call_name == _SC_UINT_MAX
^~
../utils/getconf.c:1093:25: error: '_SC_ULONG_MAX' undeclared (first use in this function)
|| c->call_name == _SC_ULONG_MAX)
^~~~~~~~~~~~~
../utils/getconf.c:1093:22: warning: comparison between pointer and integer
|| c->call_name == _SC_ULONG_MAX)
^~
../utils/getconf.c: In function 'main':
../utils/getconf.c:1306:23: error: '_SC_UINT_MAX' undeclared (first use in this function)
if (c->call_name == _SC_UINT_MAX
^~~~~~~~~~~~
../utils/getconf.c:1306:20: warning: comparison between pointer and integer
if (c->call_name == _SC_UINT_MAX
^~
../utils/getconf.c:1307:26: error: '_SC_ULONG_MAX' undeclared (first use in this function)
|| c->call_name == _SC_ULONG_MAX)
^~~~~~~~~~~~~
../utils/getconf.c:1307:23: warning: comparison between pointer and integer
|| c->call_name == _SC_ULONG_MAX)
^~
../utils/ldd.c: In function 'elf_find_dynamic':
../utils/ldd.c:233:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (void *)byteswap_to_host(dynp->d_un.d_val);
^
make[1]: *** [Makefile.in:114: ../utils/getconf.host] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/buildroot/output/build/uclibc-1.0.26/utils'
Best,
Christian
next reply other threads:[~2017-12-27 4:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 4:46 Christian Stewart [this message]
2017-12-27 8:34 ` [Buildroot] build failure against libintl on alpine Waldemar Brodkorb
2017-12-27 13:55 ` Stefan Fröberg
2017-12-27 14:07 ` Stefan Fröberg
2017-12-27 20:03 ` Christian Stewart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871sjgg4mk.fsf@paral.in \
--to=christian@paral.in \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox