public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Problem in linking with montavista toolchain for omap2420
@ 2007-01-28 11:53 Indraneel
  2007-01-30  6:16 ` Madhava Gauranga
  0 siblings, 1 reply; 5+ messages in thread
From: Indraneel @ 2007-01-28 11:53 UTC (permalink / raw)
  To: Linux-omap-open-source

Hi,
I'm trying to cross-compile a program using the montavista tool chain
for arm_v5t_le architecture for the omap2420(h4 board). I get the
following error when linking a simple c program:

$ arm_v5t_le-gcc -DPOSIX -DMD=2 rz.c
/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1/../../../../armv5tl-hardhat-linux/bin/ld: cannot find libc.so.6
collect2: ld returned 1 exit status


Surprisingly i couldn't find any file or link by the name libc.so.6 in
the toolchain, although there was
/opt/montavista/devkit/arm/v5t_le/target/usr/lib/libc.so

Other info
gcc
version 3.3.1 (MontaVista 3.3.1-7.0.15.0500230 2005-02-20)
--with-sysroot=/opt/montavista/devkit/arm/v5t_le/target

GNU ld
version 2.14 20030612 (MontaVista 2.14-11.0.7.0500230 2005-02-20)

PATH=/opt/montavista/devkit/arm/v5t_le/bin:$PATH


I have searched for the error but couldn't find anything definitive.

Can anyone provide any clues as to what is wrong and how can i solve
this linking issue?

Any pointers will be appreciated.

Regards,
Indraneel

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

* RE: Problem in linking with montavista toolchain for omap2420
  2007-01-28 11:53 Problem in linking with montavista toolchain for omap2420 Indraneel
@ 2007-01-30  6:16 ` Madhava Gauranga
  2007-01-30 11:25   ` Indraneel
  0 siblings, 1 reply; 5+ messages in thread
From: Madhava Gauranga @ 2007-01-30  6:16 UTC (permalink / raw)
  To: Indraneel, Linux-omap-open-source

Hey indranil,

I reckon u have copied the toolchain already installed somewhere,
instead of installing them. try installing(perhaps from the cd(s)
provided) the toolchain. The problem should be fixed then.

Respect,
Madhava Gauranga
 
 
Ittiam Systems | www.ittiam.com
A Red Herring Asia 100 Company, 2005
Forward Concepts' Worlds Most Preferred DSP IP Supplier, 2004, 2005

-----Original Message-----
From: linux-omap-open-source-bounces@linux.omap.com
[mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of
Indraneel
Sent: Sunday, January 28, 2007 5:23 PM
To: Linux-omap-open-source@linux.omap.com
Subject: Problem in linking with montavista toolchain for omap2420

Hi,
I'm trying to cross-compile a program using the montavista tool chain
for arm_v5t_le architecture for the omap2420(h4 board). I get the
following error when linking a simple c program:

$ arm_v5t_le-gcc -DPOSIX -DMD=2 rz.c
/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.
1/../../../../armv5tl-hardhat-linux/bin/ld: cannot find libc.so.6
collect2: ld returned 1 exit status


Surprisingly i couldn't find any file or link by the name libc.so.6 in
the toolchain, although there was
/opt/montavista/devkit/arm/v5t_le/target/usr/lib/libc.so

Other info
gcc
version 3.3.1 (MontaVista 3.3.1-7.0.15.0500230 2005-02-20)
--with-sysroot=/opt/montavista/devkit/arm/v5t_le/target

GNU ld
version 2.14 20030612 (MontaVista 2.14-11.0.7.0500230 2005-02-20)

PATH=/opt/montavista/devkit/arm/v5t_le/bin:$PATH


I have searched for the error but couldn't find anything definitive.

Can anyone provide any clues as to what is wrong and how can i solve
this linking issue?

Any pointers will be appreciated.

Regards,
Indraneel




_______________________________________________
Linux-omap-open-source mailing list
Linux-omap-open-source@linux.omap.com
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
helpdesk@ittiam.com.
**********************************************************************

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

* RE: Problem in linking with montavista toolchain for omap2420
  2007-01-30  6:16 ` Madhava Gauranga
@ 2007-01-30 11:25   ` Indraneel
  2007-01-30 14:55     ` andrzej zaborowski
  0 siblings, 1 reply; 5+ messages in thread
From: Indraneel @ 2007-01-30 11:25 UTC (permalink / raw)
  To: Madhava Gauranga; +Cc: Linux-omap-open-source

Hello Madhava,

On Tue, 2007-01-30 at 11:46 +0530, Madhava Gauranga wrote:
> Hey indranil,
> 
> I reckon u have copied the toolchain already installed somewhere,
> instead of installing them. try installing(perhaps from the cd(s)
> provided) the toolchain.


It shouldn't be a case of missing libs as i am able to build and run the
kernel from the same. I played around with the linker options

LDFLAGS= -nostdlib -L/opt/montavista/devkit/arm/v5t_le/target/usr/lib
-L/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1 -L/opt/montavista/devkit/arm/v5t_le/armv5tl-hardhat-linux/lib

With this i am past the previous error and the new error is

/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1/../../../../armv5tl-hardhat-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008074
/tmp/cc0VA6xr.o(.text+0x8): In function `main':
: undefined reference to `puts'
collect2: ld returned 1 exit status

I guess it's something to do with path but i'm not sure what exactly.

The code i'm trying to build is

#include<stdio.h>
int main (void)
{
printf("Hello World - arm linux\n");
return 0;
}


Regards,
Indraneel

>  The problem should be fixed then.
> 
> Respect,
> Madhava Gauranga
>  
> 
> Ittiam Systems | www.ittiam.com
> A Red Herring Asia 100 Company, 2005
> Forward Concepts' Worlds Most Preferred DSP IP Supplier, 2004, 2005
> 
> -----Original Message-----
> From: linux-omap-open-source-bounces@linux.omap.com
> [mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of
> Indraneel
> Sent: Sunday, January 28, 2007 5:23 PM
> To: Linux-omap-open-source@linux.omap.com
> Subject: Problem in linking with montavista toolchain for omap2420
> 
> Hi,
> I'm trying to cross-compile a program using the montavista tool chain
> for arm_v5t_le architecture for the omap2420(h4 board). I get the
> following error when linking a simple c program:
> 
> $ arm_v5t_le-gcc -DPOSIX -DMD=2 rz.c
> /opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.
> 1/../../../../armv5tl-hardhat-linux/bin/ld: cannot find libc.so.6
> collect2: ld returned 1 exit status
> 
> 
> Surprisingly i couldn't find any file or link by the name libc.so.6 in
> the toolchain, although there was
> /opt/montavista/devkit/arm/v5t_le/target/usr/lib/libc.so
> 
> Other info
> gcc
> version 3.3.1 (MontaVista 3.3.1-7.0.15.0500230 2005-02-20)
> --with-sysroot=/opt/montavista/devkit/arm/v5t_le/target
> 
> GNU ld
> version 2.14 20030612 (MontaVista 2.14-11.0.7.0500230 2005-02-20)
> 
> PATH=/opt/montavista/devkit/arm/v5t_le/bin:$PATH
> 
> 
> I have searched for the error but couldn't find anything definitive.
> 
> Can anyone provide any clues as to what is wrong and how can i solve
> this linking issue?
> 
> Any pointers will be appreciated.
> 
> Regards,
> Indraneel
> 
> 
> 
> 
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> helpdesk@ittiam.com.
> **********************************************************************
> 
> 
> 

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

* Re: Problem in linking with montavista toolchain for omap2420
  2007-01-30 11:25   ` Indraneel
@ 2007-01-30 14:55     ` andrzej zaborowski
  2007-01-31 11:20       ` Indraneel
  0 siblings, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2007-01-30 14:55 UTC (permalink / raw)
  To: Indraneel; +Cc: Madhava Gauranga, Linux-omap-open-source

Hi,

On 30/01/07, Indraneel <indraneel.m@samsung.com> wrote:
> LDFLAGS= -nostdlib -L/opt/montavista/devkit/arm/v5t_le/target/usr/lib
> -L/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1 -L/opt/montavista/devkit/arm/v5t_le/armv5tl-hardhat-linux/lib
>
> With this i am past the previous error and the new error is
>
> /opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1/../../../../armv5tl-hardhat-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008074
> /tmp/cc0VA6xr.o(.text+0x8): In function `main':
> : undefined reference to `puts'
> collect2: ld returned 1 exit status
>
> I guess it's something to do with path but i'm not sure what exactly.

These function (puts, _start) are part of the C library, which you
disabled by passing -nostdlib so it's understandable that the linker
is not finding them.

Personally I'd just try a different toolchain. Tools like "scratchbox"
or "crosstool" or Gentoo's "crossdev"  make it particularly easy to
compile a working toolchain. You can also build it using only bare
gcc, binutils and glibc/uclibc sources.

If you have libc.so but not libc.so.6 try symlinking libc.so.6 ->
libc.so (not guarranted to work but may help, maybe someone forgot to
pack the link).

Regards,
Andrew

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

* Re: Problem in linking with montavista toolchain for omap2420
  2007-01-30 14:55     ` andrzej zaborowski
@ 2007-01-31 11:20       ` Indraneel
  0 siblings, 0 replies; 5+ messages in thread
From: Indraneel @ 2007-01-31 11:20 UTC (permalink / raw)
  To: balrogg; +Cc: Madhava Gauranga, Linux-omap-open-source

Hello Andrew,

On Tue, 2007-01-30 at 15:55 +0100, andrzej zaborowski wrote:
> Hi,
> 
> On 30/01/07, Indraneel <indraneel.m@samsung.com> wrote:
> > LDFLAGS= -nostdlib -L/opt/montavista/devkit/arm/v5t_le/target/usr/lib
> > -L/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1 -L/opt/montavista/devkit/arm/v5t_le/armv5tl-hardhat-linux/lib
> >
> > With this i am past the previous error and the new error is
> >
> > /opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1/../../../../armv5tl-hardhat-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008074
> > /tmp/cc0VA6xr.o(.text+0x8): In function `main':
> > : undefined reference to `puts'
> > collect2: ld returned 1 exit status
> >
> > I guess it's something to do with path but i'm not sure what exactly.
> 
> These function (puts, _start) are part of the C library, which you
> disabled by passing -nostdlib so it's understandable that the linker
> is not finding them.
> 
> Personally I'd just try a different toolchain. Tools like "scratchbox"
> or "crosstool" or Gentoo's "crossdev"  make it particularly easy to
> compile a working toolchain. You can also build it using only bare
> gcc, binutils and glibc/uclibc sources.

The tool chain should be okay as i'm "able to build and run the kernel"
using the same montavista v5t_le toolchain. But surprisingly i'm unable
to build a simple application binary using the same. I'm giving the
-nostdlib option so that it doesn't pick C libs from the host. The path
to the libs is provided in the -L option. Correct me if my understanding
is wrong.
It should be a matter of giving the correct compiler/linker options to
build the code but i haven't been able to figure that out till now.

If somebody is using the montavista v5t_le toolchain (for TI's H4
board), please let me know the options to compile and link a simple
HelloWorld program.

Other info
gcc
version 3.3.1 (MontaVista 3.3.1-7.0.15.0500230 2005-02-20)
--with-sysroot=/opt/montavista/devkit/arm/v5t_le/target

GNU ld
version 2.14 20030612 (MontaVista 2.14-11.0.7.0500230 2005-02-20)

PATH=/opt/montavista/devkit/arm/v5t_le/bin:$PATH (i keep the toolchain
here)




Regards,
Indraneel


> 
> If you have libc.so but not libc.so.6 try symlinking libc.so.6 ->
> libc.so (not guarranted to work but may help, maybe someone forgot to
> pack the link).
> 
> Regards,
> Andrew
> 
> 

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

end of thread, other threads:[~2007-01-31 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-28 11:53 Problem in linking with montavista toolchain for omap2420 Indraneel
2007-01-30  6:16 ` Madhava Gauranga
2007-01-30 11:25   ` Indraneel
2007-01-30 14:55     ` andrzej zaborowski
2007-01-31 11:20       ` Indraneel

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