HelloWolrd - error in loading shared libraries

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

katolecho
Location: Valence, France
Posts: 22
Joined: Tue Mar 01, 2005 12:54 pm

HelloWolrd - error in loading shared libraries

Tue Apr 05, 2005 4:56 pm

Hi all

I have a little problem with my embedded linux (on a RM9200DL)
Indeed, i wrote a little .C file that normally print "hello wolrd"

Code: Select all

#include <stdio.h>

int main(){
  printf("Hello world!\n");
  return 0;
}
I CrossCompiled it with the arm-linux-gcc version 3.0

and next, i tried to launch it from the board
the result was the following error
./helloworld: error in loading shared libraries: ./helloworld: symbol __register_frame_info, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
and i have a same error with another apps
/root/vmkaffe/jre/bin/kaffe-bin: error in loading shared libraries: /root/vmkaffe/jre/bin/kaffe-bin: symbol __register_frame_info, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
:(

Does somebody know how i can resolve it?

with regards

katolecho
pratyush
Contact:
Location: india
Posts: 19
Joined: Fri May 21, 2004 7:16 am

Wed Apr 06, 2005 11:06 am

can u tell me , from where have u put this lib.so.6 i in /lib/ directory of ur target's rot file system. this lib.so.6 must be the same which is present in the tool-chain u r using.
katolecho
Location: Valence, France
Posts: 22
Joined: Tue Mar 01, 2005 12:54 pm

Wed Apr 06, 2005 11:59 am

I used the one from my toolchain
but i've resolved the problem, one hour ago

i used an selfmade .so

i'll put the explanation during the day
katolecho
Location: Valence, France
Posts: 22
Joined: Tue Mar 01, 2005 12:54 pm

Wed Apr 06, 2005 1:55 pm

1. create the missing symbols in a shared library

* copy/paste the following C program as libfix.c:
--begin libfix.c--
void __register_frame_info(void) {}
void __deregister_frame_info(void) {}
void __unregister_frame_info(void) {}
--end libfix.c--

* compile it:
$XGCC/bin/arm-linux-gcc -shared -o libfix.so libfix.c

2. setup the needed environment

* copy libfix.so in /lib on the target system

* copy $XGCC/arm-linux/lib/libgcc_s.so.1 in /lib on the target system

* at a shell prompt, do:
export LD_PRELOAD="/lib/libfix.so"
pratap
Location: india
Posts: 19
Joined: Sat Jan 22, 2005 4:05 pm

need help on launch "Hellow world"

Tue May 17, 2005 1:23 pm

Hai katolecho,
i try to port the hellow world application in AT91RM9200. i cross compiled the programme as given by you.bu i dont know to how to launch in to the board.
launch using ramdisk image?
(or )
through debug port?

Can you please give step by step launch method to help this newbie.
LIVE WITH LINUX
katolecho
Location: Valence, France
Posts: 22
Joined: Tue Mar 01, 2005 12:54 pm

Wed May 18, 2005 2:41 pm

hi
to run the helloworld application?
i just run "helloworld" at prompt or a.out if the executable is a.out
jdupre
Location: Petaluma, California
Posts: 44
Joined: Sat Apr 16, 2005 12:47 am

Thu May 26, 2005 10:38 pm

Pratap,

Is your question how to move the cross-compiled a.out file to the dev board? If so, you need to modify the ramdisk that is loaded when you boot the dev board. (That is, you need to mount the ramdisk image, copy the compiled program to some place like /opt/helloworld, unmount the ramdisk image, reboot the devboard.)

Details:

Easiest to start with pre-made image file.
For example "ramdisk_minimal" provided by Atmel.
If it doesn't have .gz extension, add it:
mv ramdisk_minimal ramdisk_minimal.gz

uncompress it:
gunzip ramdisk_minimal

Mount it:
mkdir /ramd (if not allready done)
mount -o loop -t ext2 ramdisk_minimal /ramd

Now you can go into /ramd and make any changes.

unmount:
umount /ramd

Note: Although changes have been made to the ramdisk_minimal image file, the timestamp will not be changed for some reason. You may want to do this:
touch ramdisk_minimal

[I actual have a "mount ramdisk" script that makes a backup copy of the ramdisk image, mounts it, then edits the /etc/issue file with a timestamp. That way you know what ramdisk you are using when the board boots]

Compress:
gzip ramdisk_minimal

Now you can move it to /tftpboot or wherever else it will be used.


-jmd
20050427
pratap
Location: india
Posts: 19
Joined: Sat Jan 22, 2005 4:05 pm

Wed Jun 01, 2005 5:42 am

Verymuch Thanks JDUPRE,
i am very new to linux.i think u have understand my problem.Now i got cleared. i am not using ramdisk_minimal.i got ramdisk_rmk7 from atmel C.D. where can i get ramdisk_minimal? is it contain microwindow/nano-x applications?

:cry: sorry for asking more questions.

while using ramdisk_rmk7, i would like to change screen resolution. how can i change this.

Thanks in advance
S.Pratap
LIVE WITH LINUX

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests