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 1/1] package/iputils: patch ping to link against libm
Date: Mon, 15 Feb 2016 23:17:03 +0100	[thread overview]
Message-ID: <20160215231703.2052c7e0@free-electrons.com> (raw)
In-Reply-To: <1455541206-18200-1-git-send-email-martin@barkynet.com>

Martin,

On Mon, 15 Feb 2016 13:00:06 +0000, Martin Bark wrote:
> ping fails to compile with uClibc based toolchains with the error
> 
> undefined reference to `__finite'
> 
> Add a patch to link ping against libm to resolve the math library function
> finite().
> 
> Note, this error is not seen with glibc based toolchains because finite
> seems to be resolved in both libm and libc.
> 
> Fixes:
> http://autobuild.buildroot.net/results/08f7386f75c881bc582b338824f8ccd509b2921e/
> http://autobuild.buildroot.net/results/5aeef61fbd399dd78dc72b9e7cce978e6f1f58b4/
> 
> A pull request has been sent to fix this issue upstream, see
> https://github.com/iputils/iputils/pull/42
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>

Thanks for working on this issue. However, I am not entirely happy with
the explanation.

Indeed, if you try to build iputils against uClibc, it builds just
fine. It is apparently only when the entire build is done with
BR2_ENABLE_DEBUG=y that the build failure occurs. And your commit log
doesn't explain at all why the problem only occurs when the build is
done with debugging symbols enabled.

I've tried building iputils against uClibc, it works fine. I've tried
building iputils against uClibc with BR2_ENABLE_DEBUG=y (using a
pre-built uClibc toolchain, which isn't built with debugging symbols),
and it works fine. So it seems that it only happens when the entire
build is done with debugging symbols, including uClibc itself.

While linking with -lm might be the correct fix, I am not convinced yet
due the lack of explanation for the root of the problem.

Thanks!

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

  reply	other threads:[~2016-02-15 22:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 13:00 [Buildroot] [PATCH 1/1] package/iputils: patch ping to link against libm Martin Bark
2016-02-15 22:17 ` Thomas Petazzoni [this message]
2016-02-16 10:13   ` Martin Bark
2016-02-16 19:03   ` Waldemar Brodkorb
2016-02-16 19:58     ` Martin Bark
2016-02-16 20:30       ` Thomas Petazzoni
2016-02-16 20:28     ` Thomas Petazzoni
2016-02-17  0:17       ` Arnout Vandecappelle
2016-02-17  7:56         ` Thomas Petazzoni
2016-02-20 14:51 ` Thomas Petazzoni

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=20160215231703.2052c7e0@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