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] Host libraries - status
Date: Wed, 23 Jun 2010 11:20:22 +0200	[thread overview]
Message-ID: <20100623112022.4bb9cab0@surf> (raw)
In-Reply-To: <20100623090015.199dd823@surf>

Hello,

On Wed, 23 Jun 2010 09:00:15 +0200
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> > - fix fakeroot, so it works with rpath. Might require a huge amount
> > of work.
> 
> I'm not sure what the exact problem with fakeroot is. Maybe we should
> dig into this.

Ok, I took the time to investigate this. I tried:

HOST_LDFLAGS += -Wl,-rpath -Wl,$(HOST_DIR)/usr/lib

and I could reproduce the fakeroot problem: "preload library not
found". This happens because libfakeroot.so doesn't get compiled. This
in turn happens because ./configure detects that LD doesn't support
shared libraries, which in turn happens because ./configure detects
that LD isn't GNU LD, which happens because for ld, "-Wl,-rpath
-Wl,$(HOST_DIR)/usr/lib" are incorrect options. And it's true, since
the ld option is just "-rpath", the -Wl thing being here to tell gcc to
pass these options down to ld.

So, I decided to try :

HOST_LDFLAGS += -rpath $(HOST_DIR)/usr/lib

unfortunately, it breaks host-genext2fs, because this stupid guy passes
those LDFLAGS directly to gcc :

configure:2562: checking for C compiler default output file name
configure:2589: /usr/bin/gcc -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include -I/home/test/outputs/arm-2009q
3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include  -L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/lib -L/home/test/outputs
/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib -rpath /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib conftest.c  >&5
gcc: /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib: No such file or directory
gcc: unrecognized option '-rpath'

I have therefore looked at the ./configure options and environment we
are passing to host-genext2fs ./configure script, and we *never* pass
the -rpath option in CFLAGS. Here is the full command line that is used
to run host-genext2fs ./configure, formatted for readability:

(
cd /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/build/host-genext2fs-1.4/ && rm -rf config.cache;
PATH=/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/bin:/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
AR="/usr/bin/ar"
AS="/usr/bin/as"
LD="/usr/bin/ld -L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/lib -L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib -rpath /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib"
NM="/usr/bin/nm"
CC="/usr/bin/gcc -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
GCC="/usr/bin/gcc -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
CXX="/usr/bin/g++ -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
CPP="/usr/bin/cpp -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
AR_FOR_BUILD="/usr/bin/ar"
AS_FOR_BUILD="/usr/bin/as"
CC_FOR_BUILD="/usr/bin/gcc"
GCC_FOR_BUILD="/usr/bin/gcc"
CXX_FOR_BUILD="/usr/bin/g++"
LD_FOR_BUILD="/usr/bin/ld"
FC_FOR_BUILD="/usr/bin/ld"
CFLAGS_FOR_BUILD="-I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
CXXFLAGS_FOR_BUILD="-I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
LDFLAGS_FOR_BUILD="-L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/lib -L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib -rpath /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib"
FCFLAGS_FOR_BUILD=""
AR_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-ar"
AS_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-as"
CC_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-gcc"
LD_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-ld"
NM_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-nm"
RANLIB_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-ranlib"
STRIP_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-strip"
OBJCOPY_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-objcopy"
OBJDUMP_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-objdump"
DEFAULT_ASSEMBLER="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-as"
DEFAULT_LINKER="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-ld"
ORIGINAL_AS_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-as"
ORIGINAL_LD_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-ld"
ORIGINAL_NM_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-nm"
ORIGINAL_OBJDUMP_FOR_TARGET="/home/test/arm-2009q3/bin/arm-none-linux-gnueabi-objdump"
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/bin/pkg-config"
PKG_CONFIG_LIBDIR="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib/pkgconfig"
PERLLIB="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib/perl"
LD_LIBRARY_PATH="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib:"
CFLAGS="-I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/include -I/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/include"
LDFLAGS="-L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/lib -L/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib -rpath /home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr/lib"
./configure
--verbose
--prefix="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/usr"
--sysconfdir="/home/test/outputs/arm-2009q3-2010-06-23-08-58-40/output/host/etc"
)

Do you see anything wrong here ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2010-06-23  9:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 22:45 [Buildroot] Host libraries - status Yann E. MORIN
2010-06-23  7:00 ` Thomas Petazzoni
2010-06-23  9:20   ` Thomas Petazzoni [this message]
2010-06-23 11:18     ` Thomas Petazzoni
2010-06-23 12:48       ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2010-06-24  2:21 Mitch Davis
2010-06-24  7:38 ` Thomas Petazzoni
2010-06-24 12:37   ` Mitch Davis

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=20100623112022.4bb9cab0@surf \
    --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