All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] php / snmp / iconv problem
Date: Tue, 22 Apr 2014 22:25:54 +0200	[thread overview]
Message-ID: <20140422222554.2d601379@skate> (raw)
In-Reply-To: <535556F6.3050807@lucaceresoli.net>

Dear Luca Ceresoli,

On Mon, 21 Apr 2014 19:35:50 +0200, Luca Ceresoli wrote:

> My bad, it built perfectly here! Tried uninstalling net-snmp from my
> host, as well as installing it with -dev packages. It always built fine.
> 
> FWIW, my build machine is a 64-bit Ubuntu 13.10.
> 
> Can you share the output/build/php-5.5.11/config.log file from your
> build server please?

Sure. So, as expected, the error is:

===============================================
checking OpenSSL dir for SNMP... no
checking for init_snmp in -lnetsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for more information.
make: *** [/home/test/outputs/5a7fd0de2747e876a182117d7f7d8f16b20cadea/output/build/php-5.5.11/.stamp_configured] Error 1
===============================================

In config.log, we see that:

===============================================
configure:83770: checking for init_snmp in -lnetsnmp
configure:83795: /home/test/outputs/5a7fd0de2747e876a182117d7f7d8f16b20cadea/output/host/usr/bin/arm-none-linux-gnueabi-gcc -o conftest -I/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  -fvisibility=hidden -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L/lib  -L/home/test/outputs/5a7fd0de2747e876a182117d7f7d8f16b20cadea/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib conftest.c -lnetsnmp  -lgmp -lz -lpcre -lcrypto -lssl -lcrypto -lm  -lxml2 -lz -lm -ldl -
lxml2 -lz -lm -ldl -lnetsnmp -lcrypto -lm >&5
/home/test/outputs/5a7fd0de2747e876a182117d7f7d8f16b20cadea/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/lib" is unsafe for cross-compilation
/lib/libgcc_s.so.1: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
===============================================

So the problem is due to /lib being present in the -L flags. This is
most likely due to:

ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
ifeq ($(BR2_PACKAGE_LIBICONV),y)
        PHP_CONF_OPT += --with-iconv=$(STAGING_DIR)/usr
        PHP_DEPENDENCIES += libiconv
else
        PHP_CONF_OPT += --with-iconv
endif
endif

We are in a case where BR2_PACKAGE_PHP_EXT_ICONV=y but
BR2_PACKAGE_LIBICONV is not enabled (glibc toolchain). So the iconv
test of PHP starts looking in /lib for iconv. I think we already
discussed this problem with Gustavo. See "[PATCH] php: fix wrong -L and
-I paths added by iconv tests" in the mailing list archive.

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

  reply	other threads:[~2014-04-22 20:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-20  6:30 [Buildroot] [autobuild.buildroot.net] Build results for 2014-04-19 Thomas Petazzoni
2014-04-20  8:48 ` [Buildroot] Analysis of build " Thomas Petazzoni
2014-04-20 13:09   ` Mike Zick
2014-04-21 17:35   ` Luca Ceresoli
2014-04-22 20:25     ` Thomas Petazzoni [this message]
2014-04-23  1:17       ` [Buildroot] php / snmp / iconv problem Gustavo Zacarias
2014-04-22 16:41   ` [Buildroot] Analysis of build results for 2014-04-19 Arnout Vandecappelle
2014-04-22 20:19     ` Thomas Petazzoni
2014-04-22 22:14       ` Arnout Vandecappelle
2014-04-23  7:22         ` Thomas Petazzoni
2014-04-23  8:51           ` Arnout Vandecappelle
2014-04-23  8:56             ` Jeremy Rosen
2014-04-23  9:02               ` Arnout Vandecappelle
2014-04-23  9:05               ` Thomas Petazzoni
2014-04-23  8:59             ` 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=20140422222554.2d601379@skate \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.