Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] "Incorrect selection of the C library" with Emdebian toolchain
@ 2012-08-23  0:03 Evade Flow
  2012-08-23  8:50 ` Thomas Petazzoni
  2012-08-24 13:06 ` Evade Flow
  0 siblings, 2 replies; 4+ messages in thread
From: Evade Flow @ 2012-08-23  0:03 UTC (permalink / raw)
  To: buildroot

Hi. I'm having a problem similar to one reported earlier this year (see
http://goo.gl/lBYtC), namely: SYSROOT_DIR is being computed incorrectly
for my external toolchain. I'm trying to use Emdebian's ARM cross
toolchain, which I installed in my Ubuntu 12.04 VM using:

   sudo apt-get install gcc-4.6-arm-linux-gnueabi

This puts arm-linux-gnueabi-gcc-4.6 in /usr/bin, and the dependent
package binutils-arm-linux-gnueabi adds things like
arm-linux-gnueabi-ar, arm-linux-gnueabi-as, etc in the same location.
However, the latter package also drops a bunch of files in
/usr/arm-linux-gnueabi:

/usr/arm-linux-gnueabi
|-- bin
|   |-- ar
|   |-- as
|   |-- ld
|   |-- ld.bfd
|   |-- ld.gold
|   |-- nm
|   |-- objcopy
|   |-- objdump
|   |-- ranlib
|   `-- strip
|-- include
|   |-- aio.h
|   |-- aliases.h
|   <--SNIP!-->
|   |-- wait.h
|   |-- wchar.h
|   |-- wctype.h
|   |-- wordexp.h
|   |-- xen
|   `-- xlocale.h
`-- lib
     |-- crt1.o
     |-- crti.o
     |-- crtn.o
     |-- gcrt1.o
     |-- ld-2.15.so
     |-- ld-linux.so.3 -> ld-2.15.so
     |-- libanl-2.15.so
     <--SNIP--!>
     |-- libstdc++.so.6 -> libstdc++.so.6.0.16
     |-- libstdc++.so.6.0.16
     |-- libthread_db-1.0.so
     |-- libthread_db.so -> libthread_db.so.1
     |-- libthread_db.so.1 -> libthread_db-1.0.so
     |-- libutil-2.15.so
     |-- libutil.a
     |-- libutil.so -> libutil.so.1
     |-- libutil.so.1 -> libutil-2.15.so
     |-- Mcrt1.o
     `-- Scrt1.o

So, as near as I can tell, SYSROOT_DIR should be /usr/arm-linux-gnueabi
for this toolchain. The following sed command in ext-tool.mk (~ line
311) is the problem:

SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 
's:usr/lib(64)?/(.*/)?libc\.a::'` ; \

When the above is executed, LIBC_A_LOCATION has the value
"/usr/arm-linux-gnueabi/lib/libc.a" so the regex doesn't match anything,
and I get the error "Incorrect selection of the C library".

For now, I've temporarily hacked ext-tool.mk to hard-code SYSROOT_DIR to
'/usr/arm/arm-linux-gnueabi', which seems to work. Just figured I should
tell some folks who may be able to implement a 'real' fix... :-}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-24 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23  0:03 [Buildroot] "Incorrect selection of the C library" with Emdebian toolchain Evade Flow
2012-08-23  8:50 ` Thomas Petazzoni
2012-08-23 16:14   ` Evade Flow
2012-08-24 13:06 ` Evade Flow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox