Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd.kuhls@t-online.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] RFC: musl: Fix gettext support
Date: Mon, 01 Feb 2016 22:05:17 +0100	[thread overview]
Message-ID: <dtt4ocxf5l.ln2@ID-313208.user.individual.net> (raw)
In-Reply-To: 87mvrkcsvm.fsf@dell.be.48ers.dk

Am Mon, 01 Feb 2016 17:11:57 +0100 schrieb Peter Korsgaard:

> I now spent some quality time (!) with gettext.m4 and figured out what
> we really going on here with musl and libintl.h, and I've pushed a
> simpler / more complete patch fixing the issue.
> 
> I have therefore marked this patch as superseeded.
> 
> I've also reverted the madplay fix now that it is handled globally in
> TARGET_CONFIGURE_ARGS.

Hi Peter,

there is still a problem left, binutils contains its own intl library 
with a GNU libintl.h, similar to the one provided by gettext. It changes 
function names in libbfd.so, this leads to a link error at least with 
dropwatch:

http://autobuild.buildroot.net/results/c90/
c90f7688b3b2e07f3232db163dc747c954604442//

/home/test/autobuild/instance-2/output/host/usr/x86_64-buildroot-linux-
musl/sysroot/usr/lib/../lib64/libbfd.so: undefined reference to 
`libintl_dgettext'

This situation is still present today after your commit:

output/host/usr/bin/x86_64-linux-readelf -a output/staging/usr/lib64/
libbfd-2.24.so | grep gettext
0000002e4d50  012400000007 R_X86_64_JUMP_SLO 0000000000000000 
libintl_dgettext + 0
   292: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND 
libintl_dgettext
  1275: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND 
libintl_dgettext

Again I hacked a bit to get the problem solved in a way you will never 
accept it ;)

$ cat package/binutils/2.24/200-musl-gettext.patch
diff -uNr binutils-2.24.org/Makefile.in binutils-2.24/Makefile.in
--- binutils-2.24.org/Makefile.in	2013-12-02 10:31:21.000000000 
+0100
+++ binutils-2.24/Makefile.in	2016-02-01 21:54:49.286655138 +0100
@@ -16938,6 +16938,7 @@
 	esac; \
 	srcdiroption="--srcdir=$${topdir}/intl"; \
 	libsrcdir="$$s/intl"; \
+	gt_cv_func_gnugettext1_libc=yes \
 	$(SHELL) $${libsrcdir}/configure \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
 	  --target=${target_alias} $${srcdiroption}  \

Using this patch libbfd-2.24.so will look like this:

$ output/host/usr/bin/x86_64-linux-readelf -a output/staging/usr/lib64/
libbfd-2.24.so | grep gettext
0000002e4be0  00bb00000007 R_X86_64_JUMP_SLO 0000000000000000 dgettext + 0
   187: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dgettext
  1171: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dgettext

and dropwatch will compile fine. I tried to get the content of our 
$gt_cv_func_gnugettext1_libc variable from Makefile.in down to binutils/
intl/configure and failed :( I hope this will help anyway.

Regards, Bernd

  parent reply	other threads:[~2016-02-01 21:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 22:51 [Buildroot] [PATCH 1/1] RFC: musl: Fix gettext support Bernd Kuhls
2016-01-31  7:33 ` Thomas Petazzoni
2016-01-31  7:49   ` Bernd Kuhls
2016-01-31 20:17   ` Bernd Kuhls
2016-02-01 16:11 ` Peter Korsgaard
2016-02-01 17:45   ` Bernd Kuhls
2016-02-01 21:05   ` Bernd Kuhls [this message]
2016-02-01 22:42     ` Peter Korsgaard

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=dtt4ocxf5l.ln2@ID-313208.user.individual.net \
    --to=bernd.kuhls@t-online.de \
    --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