Garrett,

After looking at the final committed patch for the lib6 Makefile, I saw you 
catch the hard coded ar call that I overlooked while I was concentrating on the 
error message I was given. Changing ar to $(AR) as you did obviates the need 
for the explicit "$(RANLIB) runcc.a" that I added. It doesn't hurt, but it 
looks like it is uneeded. While I was following you advice and checking our 
toolchain, I also saw that configure was not finding our cross compiler version 
of ranlib and strip, so I need to look into that.

Thanks for the comments,



-----Original Message-----
From: Garrett Cooper [mailto:[email protected]] 
Sent: Saturday, July 18, 2009 1:27 PM
To: Henry Yei
Cc: [email protected]
Subject: Re: [LTP] [PATCH] network/lb6/Makefile, mips, mips-el toolchain needs 
explicit RANLIB call to build

On Thu, Jul 16, 2009 at 3:11 PM, Henry Yei<[email protected]> wrote:
> This patch fixes the following build error on mips, mips-el toolchain: 
> "runcc.a: could not read symbols: Archive has no index; run ranlib to add 
> one."
>
> Signed-off-by: Henry Yei <[email protected]>
>
> --- ltp-full-20090531/testcases/network/lib6/Makefile   2009-01-22 
> 01:26:10.000000000 -0800
> +++ ltp/testcases/network/lib6/Makefile 2009-07-16 14:53:58.215774700 
> +++ -0700
> @@ -39,3 +39,4 @@
>
>  runcc.a: runcc.o
>        ar cr runcc.a runcc.o
> +       $(RANLIB) runcc.a
>
>
>
>
> Other architectures don't need this patch, if anyone who more familiar with 
> mips and knows why, please enlighten me.
>
>
> Actual error output this patch fixes:
> make[3]: Entering directory `/ltp-full-20090531/testcases/network/lib6'
> gcc -mel -g -O2 -I../../../include -g -D_GNU_SOURCE   -c -o runcc.o 
> runcc.c ar cr runcc.a runcc.o gcc -mel -g -O2 -I../../../include -g 
> -D_GNU_SOURCE    asapi_01.c runcc.a -L../../../lib runcc.a -lltp 
> -lpthread  -o asapi_01
> runcc.a: could not read symbols: Archive has no index; run ranlib to 
> add one
> collect2: ld returned 1 exit status

Hi Henry,
    It may be because of the compiler flags that are being passed into the 
compile -- either hardcoded when the compiler was generated, or after the fact 
with your folks' build system. I know that mips does some strange things 
compared to other architectures (at least it does with our in-house Cavium 
Networks provided compiler at Cisco). Either way, your changes look sane so I 
will check it into CVS now.
Thanks,
-Garrett

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to