Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] lightning: add -lintl only when needed
Date: Sun, 25 Jan 2015 18:16:52 +0100	[thread overview]
Message-ID: <20150125181652.133d32ae@free-electrons.com> (raw)
In-Reply-To: <1421763861-38874-1-git-send-email-Vincent.Riera@imgtec.com>

Dear Vicente Olivert Riera,

On Tue, 20 Jan 2015 14:24:21 +0000, Vicente Olivert Riera wrote:
> Adding -lintl to LIBS causes a failure in the configure phase when using
> a toolchain which already has locale support because the intl library is
> not present in the staging area. We fix this by adding -lintl only when
> is needed.
> 
> This is the configure error:
> 
> checking whether the C compiler works... no
> configure: error: in
> `/br/output/build/lightning-2.0.5':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> 
> This is the message in the config.log:
> 
> configure:3351: /br/output/host/usr/bin/mips-linux-gnu-gcc
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> conftest.c -lintl >&5
> /br/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/4.9.1/../../../../mips-linux-gnu/bin/ld:
> cannot find -lintl
> collect2: error: ld returned 1 exit status
> 
> Fixes:
>   http://autobuild.buildroot.net/results/280/28006ab35379a9b7f380d40b99a760bec1b69e84/
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

I applied, but in a much more simplified form: only change the
condition to pass LIBS=-lintl. It's not lightning itself that needs
gettext, but only the fact that binutils uses it, and forgets to link
with libintl. So I don't think we need/should express the dependency
against gettext in lightning, only pass LIBS=-lintl when needed.

See
http://git.buildroot.net/buildroot/commit/?id=b90fa707f3a3d43d54944e7b80ad6423f2f93667.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2015-01-25 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 14:24 [Buildroot] [PATCH] lightning: add -lintl only when needed Vicente Olivert Riera
2015-01-25 17:16 ` Thomas Petazzoni [this message]

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=20150125181652.133d32ae@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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