LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2010, 01:33 PM   #1
durgeshsanagara
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Post could not read symbols: Archive has no index; run ranlib to add one


Hi,

I am trying to port c & c++ open source code onto embedded target(MIPS).It compiles fine on x86/RH4. When I try embedded platform specific tool chain as follows, I get following error.

1)mipsel-linux-uclibc-cpp -O2 -g -Wall -Werror xyz.c xyz.o
mipsel-linux-uclibc-cpp -O2 -g -Wall -Werror pqr.c pqr.o
SUCCESS.Objects are ready
2)mipsel-linux-uclibc-ar -rcsv ../libs/ttt.a xyz.o pqr.o
SUCCESS. Static Library is ready
3)mipsel-linux-uclibc-ranlib libs/ttt.a libs/ttt.a
Fine. No warnings
4)mipsel-linux-uclibc-gcc -g -o ../bin/ttt_binary ttt.o ../libs/ttt.a ../libs/abc.a
ERROR:
could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

I tried different combinations. It did not help. My idea is to port an open source code that works fine on X86/Linux to an embedded target based on MIPS.

Thankyou
 
Old 04-02-2010, 10:36 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by durgeshsanagara View Post
Hi,

I am trying to port c & c++ open source code onto embedded target(MIPS).It compiles fine on x86/RH4. When I try embedded platform specific tool chain as follows, I get following error.

1)mipsel-linux-uclibc-cpp -O2 -g -Wall -Werror xyz.c xyz.o
mipsel-linux-uclibc-cpp -O2 -g -Wall -Werror pqr.c pqr.o
SUCCESS.Objects are ready
2)mipsel-linux-uclibc-ar -rcsv ../libs/ttt.a xyz.o pqr.o
SUCCESS. Static Library is ready
3)mipsel-linux-uclibc-ranlib libs/ttt.a libs/ttt.a
Fine. No warnings
4)mipsel-linux-uclibc-gcc -g -o ../bin/ttt_binary ttt.o ../libs/ttt.a ../libs/abc.a
ERROR:
could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

I tried different combinations. It did not help. My idea is to port an open source code that works fine on X86/Linux to an embedded target based on MIPS.

Thankyou
Instead of

Code:
mipsel-linux-uclibc-ranlib
try

Code:
mipsel-linux-uclibc-ar -s -v
and publish here screen output.

Read

Code:
man ranlib
man ar
before.
 
  


Reply

Tags
archive, could, has, index, read, symbols



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add mysqldump to exisiting archive.tgz pe_ Linux - Newbie 3 02-04-2010 04:37 PM
how do i add a folder into a rar archive steve51184 Linux - Software 6 12-06-2006 04:27 PM
How to add a banner on apacheīs non index directory? stormrider_may Linux - Networking 1 03-17-2006 06:01 AM
Could not read symbols atlep Programming 0 09-09-2004 01:33 PM
How to read manual pages ??[the meaning of different symbols like brackets etc] GingoTree Linux - Software 1 07-10-2004 02:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration