07-06-2015 12:31 AM
Hi,
1.Have written the code factorial.c as said in the document 819-IOx-SDK-cookbook.
2.Have created the make file named "makefile".
Path of SDK- /opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/
path of my example programs(followed the procedure of cookbook) - /home/user/iox_c/src
Error is as follows
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1//tools/toolchain/powerpc-linux-gnu/bin/powerpc-linux-gnu-gcc -te500v2 -L/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1//tools/toolchain/powerpc-linux-gnu/powepc-linux-gnu/libc/lib -L/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1//tools/toolchain/powerpc-linux-gnu/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/ -o "factorial.bin" factorial.o
factorial.o: In function `_start':
(.text+0x0): multiple definition of `_start'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../powerpc-linux-gnu/libc/te500v2/usr/lib/crt1.o:(.text+0x0): first defined here
factorial.o: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../powerpc-linux-gnu/libc/te500v2/usr/lib/crti.o:(.fini+0x0): first defined here
factorial.o:(.rodata+0x10): multiple definition of `_IO_stdin_used'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../powerpc-linux-gnu/libc/te500v2/usr/lib/crt1.o:(.rodata.cst4+0x0): first defined here
factorial.o: In function `__data_start':
(.data+0x0): multiple definition of `__data_start'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../powerpc-linux-gnu/libc/te500v2/usr/lib/crt1.o:(.data+0x0): first defined here
factorial.o: In function `__data_start':
(.data+0x4): multiple definition of `__dso_handle'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../lib/gcc/powerpc-linux-gnu/4.5.1/te500v2/crtbegin.o:(.data+0x0): first defined here
factorial.o: In function `_init':
(.init+0x0): multiple definition of `_init'
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../powerpc-linux-gnu/libc/te500v2/usr/lib/crti.o:(.init+0x0): first defined here
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../lib/gcc/powerpc-linux-gnu/4.5.1/te500v2/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
factorial.o:(.dtors+0x4): first defined here
/opt/ciscoiox/cisco_iox_sdk-x86_64-v0.1/tools/toolchain/powerpc-linux-gnu/bin/../lib/gcc/powerpc-linux-gnu/4.5.1/../../../../powerpc-linux-gnu/bin/ld: error in factorial.o(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
make: *** [factorial.bin] Error 1
Attached:
factorial.c
makefile
Need help in understanding the error and debugging it.
07-06-2015 04:16 AM
Hi ,
Problem solved by "make clean".
Thanks,
Darshan.S.R
07-06-2015 08:28 PM
Hi Darshan,
It should be working well if you follow the Cook book.
Regarding the error, could you please check your Makefile? I guess the error is caused by the LDFLAGS. There should be blankspaces before "\" in LDFLAGS.
Thanks,
Steve
07-06-2015 09:04 PM
Hi Steve,
Thanks for the reply. Solved it.
Is there any detailed explanation of running the OVA files on Vmware or VMbox??
07-07-2015 06:24 PM
Duplicated. See the reply in Running .ova files on Oracle VM virtual box
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide