Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] can't compile ccache with static uClibc
@ 2007-01-26 21:35 Eric Schwartz
  2007-01-27  5:06 ` Erik Andersen
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Schwartz @ 2007-01-26 21:35 UTC (permalink / raw)
  To: buildroot

I'm actually working on xm-test, a xen testing tool, but it uses 
buildroot to create a disk
image for things like creating guests, running small programs in them, 
that sort of thing.  The platform I'm working on is a bit unusual for 
buildroot-- ia64-- and uClibc does not, to the best of my current 
knowledge, compile a shared library for ia64, only static.

I added ia64 to the toplevel Config.in file like so:

--- Config.in.orig      2007-01-26 14:34:19.000000000 -0700
+++ Config.in   2007-01-24 18:53:32.000000000 -0700
@@ -40,6 +40,8 @@
        bool "sparc"
 config BR2_x86_64
        bool "x86_64"
+config BR2_ia64
+       bool "ia64"
 endchoice
 
 #
@@ -163,12 +165,13 @@
        default "sh64"          if BR2_sh64
        default "sparc"         if BR2_sparc
        default "x86_64"        if BR2_x86_64
+       default "ia64"          if BR2_ia64
 
 config BR2_ENDIAN
        string
        default "LITTLE" if BR2_arm || BR2_cris || BR2_i386 || 
BR2_mipsel || \
                            BR2_sh3 || BR2_sh4 || BR2_x86_64 || 
BR2_nios2 || \
-                           BR2_sh64
+                           BR2_sh64 || BR2_ia64
        default "BIG"    if BR2_alpha || BR2_armeb || BR2_m68k || 
BR2_mips || \
                            BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb 
|| \
                            BR2_sh3eb || BR2_sh4eb || BR2_sparc

A quick 'make menuconfig', and I was off and running-- the only other 
thing I had to tweak was the ./toolchain/uClibc/uclibc.mk to not always 
try to install ldd, as since uClibc only compiles a static library, 
there is no ldd.

Well, that out of the way, I managed to get uClibc to compile static, 
and then the build process goes on to try to compile ccache:

make -C 
/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/uClibc 
\
                
PREFIX=/root/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/root \
                DEVEL_PREFIX=/usr/ \
                RUNTIME_PREFIX=/ \
                install_runtime
make[1]: Entering directory 
`/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/uClibc'
make[1]: Nothing to be done for `install_runtime'.
make[1]: Leaving directory 
`/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/uClibc'
touch -c 
/root/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/root/lib/libc.so.0
mkdir -p 
/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/ccache-2.4
(cd 
/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/ccache-2.4; 
rm -rf config.cache; \
                CC="gcc" \
                
/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/ccache-2.4/configure 
\
                --target=ia64-pc-linux-gnu \
                --host=ia64-pc-linux-gnu \
                --build=ia64-pc-linux-gnu \
                --prefix=/usr \
        );
configure: Configuring ccache
checking for ia64-pc-linux-gnu-gcc... gcc
checking for C compiler default output file name... configure: error: C 
compiler cannot create executables
See `config.log' for more details.
make: *** 
[/root/working.hg/tools/xm-test/ramdisk/buildroot/toolchain_build_ia64/ccache-2.4/.configured] 
Error 77

Examining the relevant config.log shows:

configure:1652: gcc    conftest.c  >&5
/usr/lib/gcc/ia64-linux-gnu/4.1.2/../../../crt1.o: In function `_start':
libc/sysdeps/linux/ia64/crt1.S:(.text+0x72): undefined reference to 
`__uClibc_main'
collect2: ld returned 1 exit status
configure:1655: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }

I nm'd the crt1.o file, and sure enough, it's there:

# nm /usr/lib/gcc/ia64-linux-gnu/4.1.2/../../../crt1.o    
0000000000000000 D __data_start
0000000000000008 C __libc_ia64_register_backing_store_base
                 U __uClibc_main
                 U _fini
                 U _init
0000000000000000 T _start
0000000000000000 W data_start
                 U main

So clearly there's some sort of path error here, but I'm not sure who's 
fault it is, or how to go about fixing it.  If there are FAQs about this 
sort of thing feel free to tell me to RTFM-- just please, point me at 
the FM to R while you're at it. :)


Thanks,

-=Eric Schwartz
-- 
Eric Schwartz  <eric.schwartz@hp.com>
Hewlett-Packard Open Source & Linux Organization

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

* [Buildroot] can't compile ccache with static uClibc
  2007-01-26 21:35 [Buildroot] can't compile ccache with static uClibc Eric Schwartz
@ 2007-01-27  5:06 ` Erik Andersen
  2007-01-30 17:59   ` Eric Schwartz
  0 siblings, 1 reply; 4+ messages in thread
From: Erik Andersen @ 2007-01-27  5:06 UTC (permalink / raw)
  To: buildroot

On Fri Jan 26, 2007 at 02:35:48PM -0700, Eric Schwartz wrote:
> I'm actually working on xm-test, a xen testing tool, but it uses 
> buildroot to create a disk
> image for things like creating guests, running small programs in them, 
> that sort of thing.  The platform I'm working on is a bit unusual for 
> buildroot-- ia64-- and uClibc does not, to the best of my current 
> knowledge, compile a shared library for ia64, only static.
> 
> I added ia64 to the toplevel Config.in file like so:

Were you using uClibc 0.9.28 or the latest uClibc snapshot?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

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

* [Buildroot] can't compile ccache with static uClibc
  2007-01-27  5:06 ` Erik Andersen
@ 2007-01-30 17:59   ` Eric Schwartz
  2007-01-30 22:04     ` Eric Schwartz
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Schwartz @ 2007-01-30 17:59 UTC (permalink / raw)
  To: buildroot

Erik Andersen wrote:
> On Fri Jan 26, 2007 at 02:35:48PM -0700, Eric Schwartz wrote:
>   
>> I'm actually working on xm-test, a xen testing tool, but it uses 
>> buildroot to create a disk
>> image for things like creating guests, running small programs in them, 
>> that sort of thing.  The platform I'm working on is a bit unusual for 
>> buildroot-- ia64-- and uClibc does not, to the best of my current 
>> knowledge, compile a shared library for ia64, only static.
>>
>> I added ia64 to the toplevel Config.in file like so:
>>     
>
> Were you using uClibc 0.9.28 or the latest uClibc snapshot?
>
>  -Erik
I was using uClibc 0.9.28. I'll go ahead and try with the snapshot, 
shall I, unless you know it's going to fail in the same way?

-=Eric

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

* [Buildroot] can't compile ccache with static uClibc
  2007-01-30 17:59   ` Eric Schwartz
@ 2007-01-30 22:04     ` Eric Schwartz
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Schwartz @ 2007-01-30 22:04 UTC (permalink / raw)
  To: buildroot

Eric Schwartz wrote:
> I was using uClibc 0.9.28. I'll go ahead and try with the snapshot, 
> shall I, unless you know it's going to fail in the same way?
>   
Using the latest uClibc snapshot, I get the following 
interesting-looking failure:

/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/staging_dir/bin/ia64-linux-uclibc-gcc 
-Os -pipe  -o ccache ccache.o mdfour.o hash.o execute.o util.o args.o 
stats.o cleanup.o snprintf.o unify.o
/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/staging_dir/bin-ccache/../lib/gcc/ia64-linux-uclibc/4.1.1/../../../../ia64-linux-uclibc/lib/libc.a(vsnprintf.os): 
In function `vsnprintf':
vsnprintf.c:(.text+0x0): multiple definition of `vsnprintf'
snprintf.o:snprintf.c:(.text+0x630): first defined here
/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/staging_dir/bin-ccache/../lib/gcc/ia64-linux-uclibc/4.1.1/../../../../ia64-linux-uclibc/bin/ld: 
Warning: size of symbol `vsnprintf' changed from 5696 in snprintf.o to 
448 in 
/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/staging_dir/bin-ccache/../lib/gcc/ia64-linux-uclibc/4.1.1/../../../../ia64-linux-uclibc/lib/libc.a(vsnprintf.os)
collect2: ld returned 1 exit status
make[2]: *** [ccache] Error 1
make[2]: Leaving directory 
`/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/ccache-2.4'
make[1]: *** 
[/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot/build_ia64/ccache-2.4/ccache] 
Error 2
make[1]: Leaving directory 
`/home/emschwar/working.hg/tools/xm-test/ramdisk/buildroot'
make: *** [buildroot/rootfs.ia64.ext2] Error 2

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

end of thread, other threads:[~2007-01-30 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 21:35 [Buildroot] can't compile ccache with static uClibc Eric Schwartz
2007-01-27  5:06 ` Erik Andersen
2007-01-30 17:59   ` Eric Schwartz
2007-01-30 22:04     ` Eric Schwartz

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