Linking problem with libtelnetd

Tim Cussins timcussins at eml.cc
Fri Sep 12 12:22:40 UTC 2008


On Friday 12 September 2008 12:32:16 Ralf Corsepius wrote:
> On Fri, 2008-09-12 at 12:33 +0100, Tim Cussins wrote:
> > On Friday 12 September 2008 12:12:49 Ralf Corsepius wrote:
> > > On Fri, 2008-09-12 at 12:01 +0100, Tim Cussins wrote:
> > > > Hi all
> > > >
> > > > Attempting to call 'rtems_telnetd_initialize()' generates a linker
> > > > error: "undefined reference to `rtems_telnetd_initialize'"
> > > >
> > > > What have I missed?
> > >
> > > Adding -ltelnetd?
> > >
> > > Ralf
> >
> > Yeap - should've mentioned I tried that :)
> >
> > gcc's -B option, according to docs, seems like it would allow us to link
> > to symbols in libtelnetd.a in the same way as symbols in any other rtems
> > lib (e.g. librtemscpu.a)
> >
> > http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Directory-Options.html#Direct
> >ory- Options
> >
> > I can't understand how the process could be fine for librtemscpu.a but
> > not for libtelnetd.a
>
> How did your call to the linker exactly look like?
>
> Ralf

powerpc-rtems4.9-gcc -B../../../../../virtex/lib/ -specs bsp_specs -qrtems -
mcpu=403 -Dppc405 -Dvirtex -O2 -g -fno-keep-inline-functions    -mcpu=403 -
Dppc405 -Dvirtex    -o hello.exe init.o ../../../../../virtex/lib/no-
barrier.rel ../../../../../virtex/lib/no-dpmem.rel 
../../../../../virtex/lib/no-event.rel ../../../../../virtex/lib/no-msg.rel 
../../../../../virtex/lib/no-mp.rel ../../../../../virtex/lib/no-part.rel 
../../../../../virtex/lib/no-region.rel ../../../../../virtex/lib/no-
signal.rel ../../../../../virtex/lib/no-timer.rel 
../../../../../virtex/lib/no-rtmon.rel ../../../../../virtex/lib/no-ext.rel

init.o: In function `Init':
/${MY_ABSOLUTE_PATH}/rtemscvs/rtems-4-9-branch/build/powerpc-
rtems4.9/c/virtex/testsuites/samples/hello/../../../../../../../RTEMS-2008-09-11/c/src/../../testsuites/samples/hello/init.c:37: 
undefined reference to `rtems_telnetd_initialize'
collect2: ld returned 1 exit status
make: *** [hello.exe] Error 1

../../../../../virtex/lib/ contains all the usual (AFAIK) libs:

-rw-r--r--  1      346 2008-09-12 11:21 bsp_specs
-rwxr-xr-x  1   409199 2008-09-12 11:21 dirutils.rel
drwxr-xr-x 20     4096 2008-09-12 11:21 include
-rw-r--r--  1  1515488 2008-09-12 11:21 libcsupport.a
-rw-r--r--  1    56608 2008-09-12 11:22 libftpd.a
-rw-r--r--  1   465380 2008-09-12 11:22 libhttpd.a
-rw-r--r--  1   235892 2008-09-12 11:21 libnfs.a
-rw-r--r--  1  3424022 2008-09-12 11:21 libposix.a
-rw-r--r--  1   462902 2008-09-12 11:22 libpppd.a
-rw-r--r--  1   954366 2008-09-12 11:22 librtemsbsp.a
-rw-r--r--  1 17303370 2008-09-12 11:22 librtemscpu.a
-rw-r--r--  1   277206 2008-09-12 11:22 libshttpd.a
-rw-r--r--  1   102202 2008-09-12 11:22 libtelnetd.a
-rw-r--r--  1   218118 2008-09-12 11:22 libz.a
-rw-r--r--  1     7230 2008-09-12 11:21 linkcmds
-rwxr-xr-x  1   810555 2008-09-12 11:21 nfs.rel
-rwxr-xr-x  1    16703 2008-09-12 11:22 no-barrier.rel
-rwxr-xr-x  1     2116 2008-09-12 11:22 no-console.rel
-rwxr-xr-x  1    16740 2008-09-12 11:22 no-dpmem.rel
-rwxr-xr-x  1    16531 2008-09-12 11:22 no-event.rel
-rwxr-xr-x  1    16701 2008-09-12 11:22 no-ext.rel
-rwxr-xr-x  1    20763 2008-09-12 11:22 no-filesystem.rel
-rwxr-xr-x  1    18664 2008-09-12 11:22 no-io.rel
-rwxr-xr-x  1     1762 2008-09-12 11:22 no-mp.rel
-rwxr-xr-x  1    16725 2008-09-12 11:22 no-msg.rel
-rwxr-xr-x  1    16702 2008-09-12 11:22 no-part.rel
-rwxr-xr-x  1    16697 2008-09-12 11:22 no-region.rel
-rwxr-xr-x  1    16728 2008-09-12 11:22 no-rtmon.rel
-rwxr-xr-x  1    16761 2008-09-12 11:22 no-sem.rel
-rwxr-xr-x  1    16537 2008-09-12 11:22 no-signal.rel
-rwxr-xr-x  1    16687 2008-09-12 11:22 no-timer.rel
-rwxr-xr-x  1   441117 2008-09-12 11:21 rpcio.rel
-rw-r--r--  1     1524 2008-09-12 11:22 rtems_crti.o

Ideas?

Tim




More information about the users mailing list