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] [autobuild.buildroot.net] Build results for 2014-11-19
Date: Fri, 21 Nov 2014 09:20:47 +0100	[thread overview]
Message-ID: <20141121092047.2970fd83@free-electrons.com> (raw)
In-Reply-To: <1416513506.25116.9.camel@abrodkin-8560l.internal.synopsys.com>

Dear Alexey Brodkin,

On Thu, 20 Nov 2014 19:58:26 +0000, Alexey Brodkin wrote:

> > device-linux.o: In function `check_ip6_forwarding':
> > /home/test/autobuild/instance-1/output/build/radvd-2.8/device-linux.c:189: undefined reference to `sysctl'
> > 
> > Alexey, can you have a look at this one?
> 
> This happens because for ARC in Linux kernel we don't have
> __ARCH_WANT_SYSCALL_DEPRECATED.
> 
> So a number of syscalls is not enabled in
> "include/asm-generic/unistd.h".
> 
> From the name of this define I would assume that we should avoid using
> those syscalls. So probably "radvd" should be updated.
> 
> Any thoughts?

Ok, thanks for the analysis. Going a bit further, the issue is that
when __NR_sysctl is not defined, uClibc will not provide an
implementation of sysctl(), but it will continue to install
<sys/sysctl.h>, which provides the prototype for sysctl().

Looking at the radvd code, the call to sysctl() is actually optional,
depending on whether the configure script has found <sys/sysctl.h>. So
it breaks in our case, because <sys/sysctl.h> is there, but the
sysctl() function is not actually implemented.

So I see two possible solutions (possibly non exclusive) :

 1) Fix uClibc so that it doesn't install <sys/sysctl.h> when sysctl()
    is not available.

 2) Fix radvd configure check so that instead of checking if
    <sys/sysctl.h> is available, check if the sysctl() function is
    actually present. I don't remember if AC_CHECK_FUNCS() so a
    compile+link test or just a compile test. If it does just a compile
    test, then it will not detect the problem. If that's the case, then
    use AC_TRY_LINK() would work.

Best regards,

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

  reply	other threads:[~2014-11-21  8:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20  7:30 [Buildroot] [autobuild.buildroot.net] Build results for 2014-11-19 Thomas Petazzoni
2014-11-20  8:42 ` Baruch Siach
2014-11-20  9:38   ` Peter Korsgaard
2014-11-20  8:44 ` Thomas Petazzoni
2014-11-20  9:09   ` Baruch Siach
2014-11-20  9:16     ` Thomas Petazzoni
2014-11-20  9:36   ` Peter Korsgaard
2014-11-20 10:27     ` Thomas Petazzoni
2014-11-20 10:48       ` Peter Korsgaard
2014-11-20 18:37   ` Bernd Kuhls
2014-11-20 21:41     ` Peter Korsgaard
2014-11-20 19:58   ` Alexey Brodkin
2014-11-21  8:20     ` Thomas Petazzoni [this message]
2014-11-20 20:07   ` Bernd Kuhls
2014-11-21 18:43   ` Bernd Kuhls

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=20141121092047.2970fd83@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