public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* error in linking libraies with application
@ 2004-12-31 10:51 Devendra
  2004-12-31 10:56 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Devendra @ 2004-12-31 10:51 UTC (permalink / raw)
  To: ecos-devel

hello everyone,
 i am new buddy in ecos world. i have downloaded ecos-1.3.1-1.i386.rpm
from ecos homesite.and running it in redhat linux 9.
using ecosconfig command line utility i prepared build tree for
sythetic linux target. in /ecos-work/

------------------------------------------------------------------------------------
 [root@localhost /]# mkdir ecos-work 
[root@localhost /]# cd ecos-work/ 
[root@localhost ecos-work]# ecosconfig new linux 
[root@localhost ecos-work]# ls ecos.ecc 
------------------------------------------------------------------------------------
my gcc version is as follows so as specified in the tutorials i cahnged
 CYGBLD_GLOBAL_COMMAND_PREFIX in ecos.ecc to "". 
------------------------------------------------------------------------------------
 [root@localhost root]# gcc -v Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with:
../configure

--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking

--with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux 
Thread model: posix 
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) 
[root@localhost root]# 
----------------------------------------------------------------------------------
build tree is completed & finally use 'make' to give header files
libraries in /ecos-work/install/include & /ecos-work/install/lib.
finally i

want to run hello world application in /try/hello.c but i got following errors 
----------------------------------------------------------------------------------
[root@localhost ecos-work]# cd /try [root@localhost try]# gcc -g
-I/ecos-work/install/include hello.c -L/ecos-work/install/lib

-Ttarget.ld -nostdlib
/ecos-work/install/lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):
In

function `__static_initialization_and_destruction_0(int, int)':
/ecos-work/install/include/cyg/kernel/thread.inl:436: undefined
reference

to `__dso_handle'
/ecos-work/install/lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x48):
In

function `__static_initialization_and_destruction_0(int, int)':
/ecos-work/install/include/cyg/kernel/sched.hxx:216: undefined

reference to `__cxa_atexit' 

/ecos-work/install/lib/libtarget.a(language_c_libc_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x41):
In

function `__static_initialization_and_destruction_0': 

/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/support/mainthread.cxx:121:
undefined reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(language_c_libc_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x4d):/opt/eco

s/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/support/mainthread.cxx:121:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In function

`__static_initialization_and_destruction_0':
/ecos-work/install/include/cyg/kernel/clock.inl:63: undefined
reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/common/clock.cxx:435:
undefined

reference to `__cxa_atexit' 

/ecos-work/install/lib/libtarget.a(language_c_libc_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x57):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/clibincl/stream.inl:119:

undefined reference to `__dso_handle' 

/ecos-work/install/lib/libtarget.a(language_c_libc_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x63):/opt/ecos/ec

os-1.3.1/packages/language/c/libc/v1_3_1/src/clibincl/stream.inl:119:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(language_c_libc_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In

function `__static_initialization_and_destruction_0': 

/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/stdio/common/stdiofiles.cxx:71:
undefined reference to `__dso_handle'

/ecos-work/install/lib/libtarget.a(language_c_libc_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):/opt/ecos/

ecos-1.3.1/packages/language/c/libc/v1_3_1/src/stdio/common/stdiofiles.cxx:71:
undefined reference to `__cxa_atexit'

/ecos-work/install/lib/libtarget.a(language_c_libc_errno.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2b):
In function

`__static_initialization_and_destruction_0':
/opt/ecos/ecos-1.3.1/packages/language/c/libc/v1_3_1/src/errno/errno.cxx:104:

undefined reference to `__dso_handle' 

/ecos-work/install/lib/libtarget.a(language_c_libc_errno.o)(.text._Z41__static_initialization_and_destruction_0ii+0x37):/opt/ecos/eco

s-1.3.1/packages/language/c/libc/v1_3_1/src/errno/errno.cxx:105:
undefined reference to `__cxa_atexit' collect2: ld returned 1 exit
status
[root@localhost try]#
 ----------------------------------------------------------------------------------

 somebody please help me in getting out of this. 

~ Devendra Vyavahare.

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

* Re: error in linking libraies with application
  2004-12-31 10:51 error in linking libraies with application Devendra
@ 2004-12-31 10:56 ` Andrew Lunn
  2005-01-09  5:11   ` Devendra
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2004-12-31 10:56 UTC (permalink / raw)
  To: Devendra; +Cc: ecos-devel

On Fri, Dec 31, 2004 at 04:20:59PM +0530, Devendra wrote:
> hello everyone,
>  i am new buddy in ecos world. i have downloaded ecos-1.3.1-1.i386.rpm
> from ecos homesite.and running it in redhat linux 9.

1.3.1 is ancient. I suggest you upgrade to a newer version. See

http://ecos.sourceware.org/getstart.html

A newer version will also fix your linker errors.

        Andrew

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

* Re: error in linking libraies with application
  2004-12-31 10:56 ` Andrew Lunn
@ 2005-01-09  5:11   ` Devendra
  2005-01-09 20:17     ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Devendra @ 2005-01-09  5:11 UTC (permalink / raw)
  To: ecos-devel

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

On Fri, 31 Dec 2004 11:56:26 +0100, Andrew Lunn <andrew@lunn.ch> wrote:
> On Fri, Dec 31, 2004 at 04:20:59PM +0530, Devendra wrote:
> > hello everyone,
> >  i am new buddy in ecos world. i have downloaded ecos-1.3.1-1.i386.rpm
> > from ecos homesite.and running it in redhat linux 9.
> 
> 1.3.1 is ancient. I suggest you upgrade to a newer version. See
> 
> http://ecos.sourceware.org/getstart.html
> 
> A newer version will also fix your linker errors.
> 
>        Andrew
> 

as you said we have downloaded the eCos 2.0. 

now tried to "make" install tree for i386 pc target with default template. 
there is error during make . i tried both with configtool as well as
ecosconfig .error appears to be samei couldn't get it's meaning .

somebody please help me in solving that.

attached is the output at my console

~ Devendra

[-- Attachment #2: make err log.txt --]
[-- Type: text/plain, Size: 6961 bytes --]

root@localhost yogi]# ecosconfig new pc
[root@localhost yogi]# ecosconfig tree
[root@localhost yogi]# ls
devs  ecos.ecc  error  hal  infra  install  io  isoinfra  kernel  language  makefile  services
[root@localhost yogi]# make
make -r -C hal/i386/arch/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/hal/i386/arch/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/hal/i386/arch/v2_0'
make -r -C hal/i386/generic/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/hal/i386/generic/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/hal/i386/generic/v2_0'
make -r -C hal/i386/pc/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/hal/i386/pc/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/hal/i386/pc/v2_0'
make -r -C hal/i386/pcmb/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/hal/i386/pcmb/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/hal/i386/pcmb/v2_0'
make -r -C io/pci/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/io/pci/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/io/pci/v2_0'
make -r -C devs/wallclock/dallas/ds12887/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/devs/wallclock/dallas/ds12887/v2_0'
make[1]: Nothing to be done for `headers'.
make[1]: Leaving directory `/ecos-work/yogi/devs/wallclock/dallas/ds12887/v2_0'
make -r -C devs/wallclock/i386/pc/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/devs/wallclock/i386/pc/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/devs/wallclock/i386/pc/v2_0'
make -r -C hal/common/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/hal/common/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/hal/common/v2_0'
make -r -C io/common/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/io/common/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/io/common/v2_0'
make -r -C io/serial/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/io/serial/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/io/serial/v2_0'
make -r -C infra/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/infra/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/infra/v2_0'
make -r -C kernel/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/kernel/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/kernel/v2_0'
make -r -C services/memalloc/common/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/services/memalloc/common/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/services/memalloc/common/v2_0'
make -r -C isoinfra/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/isoinfra/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/isoinfra/v2_0'
make -r -C language/c/libc/common/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/common/v2_0'
make[1]: Nothing to be done for `headers'.
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/common/v2_0'
make -r -C language/c/libc/i18n/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/i18n/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/i18n/v2_0'
make -r -C language/c/libc/setjmp/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/setjmp/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/setjmp/v2_0'
make -r -C language/c/libc/signals/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/signals/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/signals/v2_0'
make -r -C language/c/libc/startup/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/startup/v2_0'
make[1]: Nothing to be done for `headers'.
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/startup/v2_0'
make -r -C language/c/libc/stdio/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/stdio/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/stdio/v2_0'
make -r -C language/c/libc/stdlib/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/stdlib/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/stdlib/v2_0'
make -r -C language/c/libc/string/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/string/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/string/v2_0'
make -r -C language/c/libc/time/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libc/time/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libc/time/v2_0'
make -r -C language/c/libm/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/language/c/libm/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/language/c/libm/v2_0'
make -r -C io/wallclock/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/io/wallclock/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/io/wallclock/v2_0'
make -r -C error/v2_0 headers
make[1]: Entering directory `/ecos-work/yogi/error/v2_0'
make[1]: Leaving directory `/ecos-work/yogi/error/v2_0'
headers finished
make -r -C services/memalloc/common/v2_0 heapgeninc.tcl
make[1]: Entering directory `/ecos-work/yogi/services/memalloc/common/v2_0'
i386-elf-gcc -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority  -I/ecos-work/yogi/install/include -I/opt/ecos/ecos-2.0/packages/services/memalloc/common/v2_0 -I/opt/ecos/ecos-2.0/packages/services/memalloc/common/v2_0/src -I/opt/ecos/ecos-2.0/packages/services/memalloc/common/v2_0/tests -I. -Wp,-MD,heapgen.tmp -E /opt/ecos/ecos-2.0/packages/services/memalloc/common/v2_0/src/heapgen.cpp -o heapgeninc.tcl
make[1]: Leaving directory `/ecos-work/yogi/services/memalloc/common/v2_0'
make -r -C services/memalloc/common/v2_0 heaps.cxx
make[1]: Entering directory `/ecos-work/yogi/services/memalloc/common/v2_0'
XPWD=`pwd` ; cd /opt/ecos/ecos-2.0/packages/services/memalloc/common/v2_0/src ; sh heapgen.tcl "/ecos-work/yogi/install" "$XPWD"
make[1]: Leaving directory `/ecos-work/yogi/services/memalloc/common/v2_0'
make -r -C hal/i386/arch/v2_0 build
make[1]: Entering directory `/ecos-work/yogi/hal/i386/arch/v2_0'
i386-elf-gcc -c  -I/ecos-work/yogi/install/include -I/opt/ecos/ecos-2.0/packages/hal/i386/arch/v2_0 -I/opt/ecos/ecos-2.0/packages/hal/i386/arch/v2_0/src -I/opt/ecos/ecos-2.0/packages/hal/i386/arch/v2_0/tests -I. -I/opt/ecos/ecos-2.0/packages/hal/i386/arch/v2_0/src/ -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -Wp,-MD,src/hal_misc.tmp -o src/hal_i386_arch_hal_misc.o /opt/ecos/ecos-2.0/packages/hal/i386/arch/v2_0/src/hal_misc.c
make[1]: *** No rule to make target `src/context.o.d', needed by `libtarget.a.stamp'.  Stop.
make[1]: Leaving directory `/ecos-work/yogi/hal/i386/arch/v2_0'
make: *** [build] Error 2









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

* Re: error in linking libraies with application
  2005-01-09  5:11   ` Devendra
@ 2005-01-09 20:17     ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2005-01-09 20:17 UTC (permalink / raw)
  To: Devendra; +Cc: ecos-devel

On Sun, Jan 09, 2005 at 10:41:16AM +0530, Devendra wrote:
> On Fri, 31 Dec 2004 11:56:26 +0100, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Fri, Dec 31, 2004 at 04:20:59PM +0530, Devendra wrote:
> > > hello everyone,
> > >  i am new buddy in ecos world. i have downloaded ecos-1.3.1-1.i386.rpm
> > > from ecos homesite.and running it in redhat linux 9.
> > 
> > 1.3.1 is ancient. I suggest you upgrade to a newer version. See
> > 
> > http://ecos.sourceware.org/getstart.html
> > 
> > A newer version will also fix your linker errors.
> > 
> >        Andrew
> > 
> 
> as you said we have downloaded the eCos 2.0. 
> 
> now tried to "make" install tree for i386 pc target with default template. 
> there is error during make . i tried both with configtool as well as
> ecosconfig .error appears to be samei couldn't get it's meaning .
> 
> somebody please help me in solving that.
> 
> attached is the output at my console
> 
> ~ Devendra

> root@localhost yogi]# ecosconfig new pc
> [root@localhost yogi]# ecosconfig tree

Basic securtiy tip. Don't use root! The only time you should be logged
in as root is to install and configure software. Your day to day
normal work should be done with a normal user account.

My guess is you did not start from a clean directory. You now have a
mix of 1.3.1 and 2.0 in your work directory, which is not going to
work. rm -fr your work directory and start again.

You might also find that v2.0 is too old as well, depending on your
toolchain. You might need anoncvs.

        Andrew

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

end of thread, other threads:[~2005-01-09 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-31 10:51 error in linking libraies with application Devendra
2004-12-31 10:56 ` Andrew Lunn
2005-01-09  5:11   ` Devendra
2005-01-09 20:17     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).