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] Problem linking xlib_libXpm-3.5.12/sxpm
Date: Wed, 3 Jan 2018 23:23:01 +0100	[thread overview]
Message-ID: <20180103232301.5950e32f@windsurf.lan> (raw)
In-Reply-To: <20180103143552.477325fd@windsurf.lan>

Hello,

On Wed, 3 Jan 2018 14:35:52 +0100, Thomas Petazzoni wrote:

> This config fails to build here, with the exact same error as the one
> you had:
> 
>   CCLD     sxpm
> sxpm.o: In function `Usage':
> sxpm.c:(.text+0x14): undefined reference to `libintl_gettext'
> sxpm.c:(.text+0x30): undefined reference to `libintl_gettext'
> sxpm.o: In function `ErrorMessage':
> sxpm.c:(.text+0x170): undefined reference to `libintl_gettext'
> sxpm.c:(.text+0x186): undefined reference to `libintl_gettext'
> sxpm.c:(.text+0x1ba): undefined reference to `libintl_gettext'
> sxpm.o:sxpm.c:(.text+0x1d0): more undefined references to `libintl_gettext' follow
> sxpm.o: In function `main':
> sxpm.c:(.text.startup+0x3a): undefined reference to `libintl_bindtextdomain'
> sxpm.c:(.text.startup+0x46): undefined reference to `libintl_textdomain'
> sxpm.c:(.text.startup+0x81): undefined reference to `libintl_gettext'
> sxpm.c:(.text.startup+0xa17): undefined reference to `libintl_gettext'
> collect2: error: ld returned 1 exit status
> make[3]: *** [sxpm] Error 1
> make[3]: Leaving directory `/home/test/buildroot/output/build/xlib_libXpm-3.5.12/sxpm'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/test/buildroot/output/build/xlib_libXpm-3.5.12'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/test/buildroot/output/build/xlib_libXpm-3.5.12'
> make: *** [/home/test/buildroot/output/build/xlib_libXpm-3.5.12/.stamp_built] Error 2
> 
> I'll have to investigate.

The problem is due to the fact that xlib_libXpm doesn't use the proper
autoconf/automake integration for gettext.

Due to this, it forgets to link with libintl when intl functions are in
an external library. It is also the reason why libXpm fails to build in
other configurations because xgettext is missing, even if --disable-nls
has been passed.

The most correct solution is to rework the gettext integration in
xlib_libXpm.

Best regards,

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

      reply	other threads:[~2018-01-03 22:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03  3:24 [Buildroot] Problem linking xlib_libXpm-3.5.12/sxpm Ormund Williams
2018-01-03 10:17 ` Thomas Petazzoni
2018-01-03 11:37   ` Ormund Williams
2018-01-03 12:06     ` Ormund Williams
2018-01-03 13:35       ` Thomas Petazzoni
2018-01-03 22:23         ` 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=20180103232301.5950e32f@windsurf.lan \
    --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