linker problem installing rtems4.10

Alan Cudmore Alan.P.Cudmore at nasa.gov
Mon Nov 9 18:19:21 UTC 2009


Hi Daniel,
I just had this problem 1 hour ago!

If you have a "cpukit" RPM installed, uninstall it and it should  
compile fine.

I'm on CentOS 5 and I installed all of the RPMs for RTEMS 4.10 ( m68k  
target ) including the cpukit RPM. That RPM is much older than the  
current CVS trunk, and I think the linker was looking at those  
libraries first.
When I removed that RPM, I was able to build the RTEMS CVS Trunk.

Alan

On Nov 9, 2009, at 1:10 PM, Daniel_M wrote:

> Hello,
>
> I am new with rtems and I was trying to run the quick start example.
> I am on an i386 pc with Ubuntu 9.04 and I installed tools as debs
> (version 4.9.99.0 aka 9.10).
>
> I configure it like 'Example Application Compiling'
> <http://www.rtems.com/wiki/index.php/Example_Application_Compiling>
> I export the $PATH. execute bootstrap and create and configure a new
> folder. But when I try to compile it I get the error copied down.
>
> It is mainly a linker problem, that find 'multiple definition' of some
> functions. I try to find it, but I cannot find the calls to the
> functions in the file init.c. And I fell quite lost in the rtems file
> structure.
>
> Thank you for help.
> Daniel M.
>
> End of make, where error shows.
> -----------8<---------------------
> make[3]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/optman'
> Making all in testsuites
> make[3]: Entering directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/testsuites'
> Making all in samples
> make[4]: Entering directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples'
> Making all in hello
> make[5]: Entering directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello'
> i386-rtems4.10-gcc -B../../../../../pc586/lib/ -specs bsp_specs - 
> qrtems
> -DPACKAGE_NAME=\"rtems-c-src-tests-samples\"
> -DPACKAGE_TARNAME=\"rtems-c-src-tests-samples\"
> -DPACKAGE_VERSION=\"4.9.99.0\"
> -DPACKAGE_STRING=\"rtems-c-src-tests-samples\ 4.9.99.0\"
> -DPACKAGE_BUGREPORT=\"http://www.rtems.org/bugzilla\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -I.
> -I../../../../../../../rtems/c/src/../../testsuites/samples/hello
> -mtune=pentium -O2 -g -Wall -Wimplicit-function-declaration
> -Wstrict-prototypes -Wnested-externs -MT init.o -MD -MP -MF
> .deps/init.Tpo -c -o init.o
> ../../../../../../../rtems/c/src/../../testsuites/samples/hello/init.c
> mv -f .deps/init.Tpo .deps/init.Po
> i386-rtems4.10-gcc -B../../../../../pc586/lib/ -specs bsp_specs - 
> qrtems
> -mtune=pentium -O2 -g -Wall -Wimplicit-function-declaration
> -Wstrict-prototypes -Wnested-externs   -Wl,-Ttext,0x00100000
> -mtune=pentium   -o hello.exe init.o
> ../../../../../pc586/lib/no-barrier.rel
> ../../../../../pc586/lib/no-dpmem.rel
> ../../../../../pc586/lib/no-event.rel
> ../../../../../pc586/lib/no-msg.rel ../../../../../pc586/lib/no-mp.rel
> ../../../../../pc586/lib/no-part.rel
> ../../../../../pc586/lib/no-region.rel
> ../../../../../pc586/lib/no-signal.rel
> ../../../../../pc586/lib/no-timer.rel
> ../../../../../pc586/lib/no-rtmon.rel ../../../../../pc586/lib/no- 
> ext.rel
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x0):
> multiple definition of `rtems_libio_init_helper'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:31:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x4):
> multiple definition of `rtems_libio_supp_helper'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:31:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x8):
> multiple definition of `rtems_fs_init_helper'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:32:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0xc):
> multiple definition of `rtems_libio_number_iops'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:32:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.bss+0x0):
> multiple definition of `rtems_telnetd_maximum_ptys'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:31:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x10):
> multiple definition of `imfs_rq_memfile_bytes_per_block'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:33:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.rodata+0x0):
> multiple definition of `configuration_mount_table'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:31:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x14):
> multiple definition of `rtems_filesystem_mount_table'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:33:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.rodata+0x10):
> multiple definition of `rtems_filesystem_mount_table_size'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:33:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x18):
> multiple definition of `RTEMS_Malloc_Heap'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:34:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.bss+0x5):
> multiple definition of `rtems_unified_work_area'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:31:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.bss+0x8):
> multiple definition of `rtems_malloc_statistics_helpers'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:32:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.bss+0xc):
> multiple definition of `rtems_malloc_sbrk_helpers'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:32:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.bss+0x10):
> multiple definition of `rtems_malloc_dirty_helper'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:33:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x1c):
> multiple definition of `Initialization_tasks'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:34:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x40):
> multiple definition of `Device_drivers'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/bin/ld:
> Warning: size of symbol `Device_drivers' changed from 24 in init.o  
> to 48
> in
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o)
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x80):
> multiple definition of `Configuration_Initial_Extensions'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0xa0):
> multiple definition of `Configuration_RTEMS_API'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0xd0):
> multiple definition of `rtems_minimum_stack_size'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0xd4):
> multiple definition of `rtems_maximum_priority'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0xe0):
> multiple definition of `Configuration'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x120):
> multiple definition of `_RTEMS_tasks_Initialize_user_tasks_p'
> init.o:/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello/../../../../../../../rtems/c/src/../../ 
> testsuites/samples/hello/init.c:35:
> first defined here
> ../../../../../pc586/lib/librtemsbsp.a(console.o): In function  
> `conSetAttr':
> /home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/lib/libbsp/ 
> i386/pc386/../../../../../../../../rtems/c/src/lib/libbsp/i386/pc386/ 
> console/console.c:471:
> undefined reference to `rtems_termios_baud_to_number'
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/librtemscpu.a(dummy.o):(.data+0x2c):
> undefined reference to `main'
> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.2/../../../../i386- 
> rtems4.10/lib/mpentium/libc.a(lib_a-makebuf.o):
> In function `__smakebuf_r':
> /builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.2/build/i386- 
> rtems4.10/mpentium/newlib/libc/stdio/../../../../../../gcc-4.4.2/ 
> newlib/libc/stdio/makebuf.c:110:
> undefined reference to `_isatty_r'
> collect2: ld returned 1 exit status
> make[5]: *** [hello.exe] Error 1
> make[5]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples/hello'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/ 
> testsuites/samples'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586/testsuites'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c/pc586'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/home/daniel/workspace/rtems/pc586/i386-rtems4.10/c'
> make: *** [all-recursive] Error 1
>
> --
> ------------------------------------------------------------------------------
> - Grupo de Computadores y Tiempo Real                www.ctr.unican.es
> - Dpto. de Electrónica y Computadores
> - Universidad de Cantabria                           www.unican.es
> - Avda. de los Castros s/n 39005-Santander (Spain)
> ------------------------------------------------------------------------------
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users




More information about the users mailing list