I'm trying to build valgrind for android-arm on my OS X (Mavericks). ./configure runs successfully but make gives me following error (I have removed some of the line from error log to keep it short):
valgrind-3.10.1 gausharm$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in include
make[2]: Nothing to be done for `all'.
Making all in VEX
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
make[3]: Nothing to be done for `all-am'.
Making all in coregrind
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
mkdir -p ../.in_place; \
for f in vgpreload_core-arm-linux.so ; do \
rm -f ../.in_place/$f; \
ln -f -s ../coregrind/$f ../.in_place; \
done
for f in ; do \
if [ ! -e $f.dSYM -o $f -nt $f.dSYM ] ; then \
echo "dsymutil $f"; \
dsymutil $f; \
fi; \
done
mkdir -p ../.in_place; \
for f in ; do \
rm -f ../.in_place/$f.dSYM; \
ln -f -s ../coregrind/$f.dSYM ../.in_place; \
done
mkdir -p ../.in_place; \
for f in m_gdbserver/32bit-core-valgrind-s1.xml m_gdbserver/32bit-core-valgrind-s2.xml m_gdbserver/32bit-core.xml m_gdbserver/32bit-linux-valgrind-s1.xml m_gdbserver/32bit-linux-valgrind-s2.xml m_gdbserver/32bit-linux.xml m_gdbserver/32bit-sse-valgrind-s1.xml m_gdbserver/32bit-sse-valgrind-s2.xml m_gdbserver/32bit-sse.xml m_gdbserver/64bit-avx-valgrind-s2.xml m_gdbserver/64bit-avx-valgrind-s1.xml m_gdbserver/64bit-avx.xml m_gdbserver/64bit-core-valgrind-s1.xml m_gdbserver/64bit-core-valgrind-s2.xml m_gdbserver/64bit-core.xml m_gdbserver/64bit-linux-valgrind-s1.xml m_gdbserver/64bit-linux-valgrind-s2.xml m_gdbserver/64bit-linux.xml m_gdbserver/64bit-sse-valgrind-s1.xml m_gdbserver/64bit-sse-valgrind-s2.xml m_gdbserver/64bit-sse.xml m_gdbserver/amd64-avx-coresse-valgrind.xml m_gdbserver/amd64-avx-coresse.xml m_gdbserver/amd64-avx-linux-valgrind.xml m_gdbserver/amd64-avx-linux.xml m_gdbserver/amd64-coresse-valgrind.xml m_gdbserver/amd64-linux-valgrind.xml m_gdbserver/arm-core-valgrind-s1.xml m_gdbserver/arm-core-valgrind-s2.xml m_gdbserver/arm-core.xml m_gdbserver/arm-vfpv3-valgrind-s1.xml m_gdbserver/arm-vfpv3-valgrind-s2.xml m_gdbserver/arm-vfpv3.xml m_gdbserver/arm-with-vfpv3-valgrind.xml m_gdbserver/arm-with-vfpv3.xml m_gdbserver/i386-coresse-valgrind.xml m_gdbserver/i386-linux-valgrind.xml m_gdbserver/power64-core-valgrind-s1.xml m_gdbserver/power64-core-valgrind-s2.xml m_gdbserver/power64-core.xml m_gdbserver/power64-linux-valgrind-s1.xml m_gdbserver/power64-linux-valgrind-s2.xml m_gdbserver/power64-linux.xml m_gdbserver/power-altivec-valgrind-s1.xml m_gdbserver/power-altivec-valgrind-s2.xml m_gdbserver/power-altivec.xml m_gdbserver/power-core-valgrind-s1.xml m_gdbserver/power-core-valgrind-s2.xml m_gdbserver/power-core.xml m_gdbserver/power-fpu-valgrind-s1.xml m_gdbserver/power-fpu-valgrind-s2.xml m_gdbserver/power-fpu.xml m_gdbserver/power-linux-valgrind-s1.xml m_gdbserver/power-linux-valgrind-s2.xml m_gdbserver/power-linux.xml m_gdbserver/powerpc-altivec32l-valgrind.xml m_gdbserver/powerpc-altivec32l.xml m_gdbserver/powerpc-altivec64l-valgrind.xml m_gdbserver/powerpc-altivec64l.xml m_gdbserver/s390-acr-valgrind-s1.xml m_gdbserver/s390-acr-valgrind-s2.xml m_gdbserver/s390-acr.xml m_gdbserver/s390-fpr-valgrind-s1.xml m_gdbserver/s390-fpr-valgrind-s2.xml m_gdbserver/s390-fpr.xml m_gdbserver/s390x-core64-valgrind-s1.xml m_gdbserver/s390x-core64-valgrind-s2.xml m_gdbserver/s390x-core64.xml m_gdbserver/s390x-generic-valgrind.xml m_gdbserver/s390x-generic.xml m_gdbserver/s390x-linux64-valgrind-s1.xml m_gdbserver/s390x-linux64-valgrind-s2.xml m_gdbserver/s390x-linux64.xml m_gdbserver/mips-cp0-valgrind-s1.xml m_gdbserver/mips-cp0-valgrind-s2.xml m_gdbserver/mips-cp0.xml m_gdbserver/mips-cpu-valgrind-s1.xml m_gdbserver/mips-cpu-valgrind-s2.xml m_gdbserver/mips-cpu.xml m_gdbserver/mips-linux.xml m_gdbserver/mips-linux-valgrind.xml m_gdbserver/mips-fpu-valgrind-s1.xml m_gdbserver/mips-fpu-valgrind-s2.xml m_gdbserver/mips-fpu.xml m_gdbserver/mips64-cp0-valgrind-s1.xml m_gdbserver/mips64-cp0-valgrind-s2.xml m_gdbserver/mips64-cp0.xml m_gdbserver/mips64-cpu-valgrind-s1.xml m_gdbserver/mips64-cpu-valgrind-s2.xml m_gdbserver/mips64-cpu.xml m_gdbserver/mips64-linux.xml m_gdbserver/mips64-linux-valgrind.xml m_gdbserver/mips64-fpu-valgrind-s1.xml m_gdbserver/mips64-fpu-valgrind-s2.xml m_gdbserver/mips64-fpu.xml; do \
rm -f ../.in_place/$f; \
ln -f -s ../coregrind/$f ../.in_place; \
done
Making all in .
mkdir -p ./.in_place
rm -f ./.in_place/default.supp
ln -s ../default.supp ./.in_place
Making all in memcheck
Making all in .
../coregrind/link_tool_exe_linux 0x38000000 /Users/gausharm/Softwares/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc -Wno-long-long --sysroot=/Users/gausharm/Softwares/android-ndk-r10b/platforms/android-14/arch-arm -fno-stack-protector -o memcheck-arm-linux -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -marm -mcpu=cortex-a8 -O2 -static -nodefaultlibs -nostartfiles -u _start -Wl,-z,noexecstack memcheck_arm_linux-mc_leakcheck.o memcheck_arm_linux-mc_malloc_wrappers.o memcheck_arm_linux-mc_main.o memcheck_arm_linux-mc_translate.o memcheck_arm_linux-mc_machine.o memcheck_arm_linux-mc_errors.o ../coregrind/libcoregrind-arm-linux.a ../VEX/libvex-arm-linux.a -lgcc
/Users/gausharm/Softwares/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: ../coregrind/libcoregrind-arm-linux.a: no archive symbol table (run ranlib)
/Users/gausharm/Softwares/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: ../VEX/libvex-arm-linux.a: no archive symbol table (run ranlib)
mc_leakcheck.c:1878: error: undefined reference to 'vgPlain_umsg'
.'vgPlain_null_ExeContext'
mc_malloc_wrappers.c:305: error: undefined reference to 'vgPlain_record_ExeContext'
mc_malloc_wrappers.c:319: error: undefined reference to 'vgPlain_record_ExeContext'
mc_malloc_wrappers.c:438: error: undefined reference to 'vgPlain_memset'
mc_malloc_wrappers.c:112: error: undefined reference to 'vgPlain_free_queue_volume'
mc_malloc_wrappers.c:112: error: undefined reference to 'vgPlain_free_queue_length'
mc_malloc_wrappers.c:193: error: undefined reference to 'vgPlain_allocEltPA'
mc_malloc_wrappers.c:165: error: undefined reference to 'vgPlain_cli_free'
mc_malloc_wrappers.c:223: error: undefined reference to 'vgPlain_freeEltPA'
mc_malloc_wrappers.c:215: error: undefined reference to 'vgPlain_tool_panic'
mc_malloc_wrappers.c:139: error: undefined reference to 'vgPlain_free_queue_volume'
mc_malloc_wrappers.c:139: error: undefined reference to 'vgPlain_free_queue_length'
mc_malloc_wrappers.c:367: error: undefined reference to 'vgPlain_HT_add_node'
mc_malloc_wrappers.c:350: error: undefined reference to 'vgPlain_cli_malloc'
mc_malloc_wrappers.c:359: error: undefined reference to 'vgPlain_memset'
mc_malloc_wrappers.c:367: error: undefined reference to 'vgPlain_HT_add_node'
mc_malloc_wrappers.c:372: error: undefined reference to 'vgPlain_get_ECU_from_ExeContext'
mc_malloc_wrappers.c:355: error: undefined reference to 'vgPlain_memset'
mc_malloc_wrappers.c:367: error: undefined reference to 'vgPlain_HT_add_node'
mc_malloc_wrappers.c:388: error: undefined reference to 'vgPlain_clo_alignment'
mc_malloc_wrappers.c:398: error: undefined reference to 'vgPlain_clo_alignment'
mc_malloc_wrappers.c:408: error: undefined reference to 'vgPlain_clo_alignment'
mc_malloc_wrappers.c:429: error: undefined reference to 'vgPlain_clo_alignment'
mc_malloc_wrappers.c:481: error: undefined reference to 'vgPlain_HT_remove'
mc_malloc_wrappers.c:527: error: undefined reference to 'vgPlain_HT_remove'
mc_malloc_wrappers.c:545: error: undefined reference to 'vgPlain_cli_malloc'
mc_malloc_wrappers.c:574: error: undefined reference to 'vgPlain_memcpy'
mc_malloc_wrappers.c:607: error: undefined reference to 'vgPlain_memset'
mc_malloc_wrappers.c:581: error: undefined reference to 'vgPlain_memcpy'
mc_malloc_wrappers.c:586: error: undefined reference to 'vgPlain_get_ECU_from_ExeContext'
mc_malloc_wrappers.c:628: error: undefined reference to 'vgPlain_HT_lookup'
mc_malloc_wrappers.c:642: error: undefined reference to 'vgPlain_HT_lookup'
mc_malloc_wrappers.c:657: error: undefined reference to 'vgPlain_record_ExeContext'
mc_malloc_wrappers.c:658: error: undefined reference to 'vgPlain_get_ECU_from_ExeContext'
mc_malloc_wrappers.c:689: error: undefined reference to 'vgPlain_HT_lookup'
mc_malloc_wrappers.c:698: error: undefined reference to 'vgPlain_HT_construct'
mc_malloc_wrappers.c:686: error: undefined reference to 'vgPlain_get_running_tid'
mc_malloc_wrappers.c:686: error: undefined reference to 'vgPlain_get_and_pp_StackTrace'
mc_malloc_wrappers.c:707: error: undefined reference to 'vgPlain_tool_panic'
mc_malloc_wrappers.c:691: error: undefined reference to 'vgPlain_clo_verbosity'
mc_malloc_wrappers.c:724: error: undefined reference to 'vgPlain_HT_remove'
mc_malloc_wrappers.c:741: error: undefined reference to 'vgPlain_HT_destruct'
mc_malloc_wrappers.c:721: error: undefined reference to 'vgPlain_get_running_tid'
mc_malloc_wrappers.c:721: error: undefined reference to 'vgPlain_get_and_pp_StackTrace'
mc_malloc_wrappers.c:727: error: undefined reference to 'vgPlain_get_running_tid'
mc_malloc_wrappers.c:839: error: undefined reference to 'vgPlain_get_and_pp_StackTrace'
mc_malloc_wrappers.c:865: error: undefined reference to 'vgPlain_get_running_tid'
mc_malloc_wrappers.c:875: error: undefined reference to 'vgPlain_get_and_pp_StackTrace'
mc_malloc_wrappers.c:917: error: undefined reference to 'vgPlain_HT_to_array'
mc_malloc_wrappers.c:1108: error: undefined reference to 'vgPlain_clo_xml'
mc_main.c:6769: error: undefined reference to 'vgPlain_free_queue_length'
mc_main.c:6769: error: undefined reference to 'vgPlain_free_queue_volume'
mc_main.c:921: error: undefined reference to 'vgPlain_OSetGen_Create_With_Pool'
mc_main.c:1015: error: undefined reference to 'vgPlain_OSetGen_Lookup'
mc_main.c:1031: error: undefined reference to 'vgPlain_OSetGen_AllocNode'
mc_main.c:1039: error: undefined reference to 'vgPlain_OSetGen_Insert'
mc_main.c:943: error: undefined reference to 'vgPlain_OSetGen_ResetIter'
mc_main.c:944: error: undefined reference to 'vgPlain_OSetGen_Next'
mc_main.c:952: error: undefined reference to 'vgPlain_OSetGen_AllocNode'
mc_main.c:955: error: undefined reference to 'vgPlain_OSetGen_Insert'
mc_main.c:966: error: undefined reference to 'vgPlain_OSetGen_Destroy'
mc_main.c:971: error: undefined reference to 'vgPlain_percentify'
mc_main.c:5399: error: undefined reference to 'vgPlain_printf'
mc_main.c:5363: error: undefined reference to 'vgPlain_printf'
mc_main.c:6819: error: undefined reference to 'vgPlain_sizeRangeMap'
mc_main.c:6823: error: undefined reference to 'vgPlain_indexRangeMap'
mc_main.c:6791: error: undefined reference to 'vgPlain_clo_xml'
mc_main.c:6791: error: undefined reference to 'vgPlain_clo_stats'
mc_main.c:6579: error: undefined reference to 'vgPlain_track_new_mem_stack_4'
mc_main.c:6580: error: undefined reference to 'vgPlain_track_new_mem_stack_8'
mc_main.c:6581: error: undefined reference to 'vgPlain_track_new_mem_stack_12'
mc_main.c:6582: error: undefined reference to 'vgPlain_track_new_mem_stack_16'
mc_main.c:6583: error: undefined reference to 'vgPlain_track_new_mem_stack_32'
mc_main.c:6584: error: undefined reference to 'vgPlain_track_new_mem_stack_112'
mc_main.c:6585: error: undefined reference to 'vgPlain_track_new_mem_stack_128'
mc_main.c:6586: error: undefined reference to 'vgPlain_track_new_mem_stack_144'
mc_main.c:6587: error: undefined reference to 'vgPlain_track_new_mem_stack_160'
mc_main.c:6589: error: undefined reference to 'vgPlain_track_new_mem_stack'
mc_main.c:6590: error: undefined reference to 'vgPlain_track_new_mem_stack_signal'
mc_main.c:6646: error: undefined reference to 'vgPlain_track_new_mem_brk'
mc_main.c:6660: error: undefined reference to 'vgPlain_newPA'
mc_main.c:6668: error: undefined reference to 'vgPlain_track_pre_reg_read'
mc_main.c:2360: error: undefined reference to 'vgPlain_am_shadow_alloc'
mc_main.c:2414: error: undefined reference to 'vgPlain_OSetGen_Create'
mc_main.c:6644: error: undefined reference to 'vgPlain_track_new_mem_brk'
mc_main.c:6564: error: undefined reference to 'vgPlain_track_new_mem_stack_4_w_ECU'
mc_main.c:6565: error: undefined reference to 'vgPlain_track_new_mem_stack_8_w_ECU'
mc_main.c:6566: error: undefined reference to 'vgPlain_track_new_mem_stack_12_w_ECU'
mc_main.c:6567: error: undefined reference to 'vgPlain_track_new_mem_stack_16_w_ECU'
mc_main.c:6568: error: undefined reference to 'vgPlain_track_new_mem_stack_32_w_ECU'
mc_main.c:6569: error: undefined reference to 'vgPlain_track_new_mem_stack_112_w_ECU'
mc_main.c:6570: error: undefined reference to 'vgPlain_track_new_mem_stack_128_w_ECU'
mc_main.c:6571: error: undefined reference to 'vgPlain_track_new_mem_stack_144_w_ECU'
mc_main.c:6572: error: undefined reference to 'vgPlain_track_new_mem_stack_160_w_ECU'
mc_main.c:6574: error: undefined reference to 'vgPlain_track_new_mem_stack_w_ECU'
mc_main.c:6575: error: undefined reference to 'vgPlain_track_new_mem_stack_signal'
mc_main.c:2362: error: undefined reference to 'vgPlain_out_of_memory_NORETURN'
mc_main.c:6655: error: undefined reference to 'vgPlain_clo_xml'
mc_main.c:301: error: undefined reference to 'vgPlain_am_shadow_alloc'
mc_main.c:305: error: undefined reference to 'vgPlain_memcpy'
mc_errors.c:1000: error: undefined reference to 'vgPlain_addr_is_in_block'
mc_errors.c:1066: error: undefined reference to 'vgPlain_initThreadInfo'
mc_errors.c:1006: error: undefined reference to 'vgPlain_addr_is_in_block'
mc_errors.c:1229: error: undefined reference to 'vgPlain_initThreadInfo'
mc_errors.c:1072: error: undefined reference to 'vgPlain_describe_addr'
mc_errors.c:313: error: undefined reference to 'vgPlain_snprintf'
mc_errors.c:311: error: undefined reference to 'vgPlain_snprintf'
mc_errors.c:410: error: undefined reference to 'vgPlain_get_error_extra'
mc_errors.c:412: error: undefined reference to 'vgPlain_get_error_kind'
mc_errors.c:446: error: undefined reference to 'vgPlain_get_error_where'
mc_errors.c:459: error: undefined reference to 'vgPlain_get_error_where'
mc_errors.c:421: error: undefined reference to 'vgPlain_get_error_string'
mc_errors.c:479: error: undefined reference to 'vgPlain_get_error_string'
mc_errors.c:501: error: undefined reference to 'vgPlain_get_error_string'
mc_errors.c:546: error: undefined reference to 'vgPlain_get_error_where'
mc_errors.c:547: error: undefined reference to 'vgPlain_get_error_address'
mc_errors.c:547: error: undefined reference to 'vgPlain_pp_addrinfo_mc'
mc_errors.c:667: error: undefined reference to 'vgPlain_get_error_where'
mc_errors.c:668: error: undefined reference to 'vgPlain_get_error_address'
mc_errors.c:668: error: undefined reference to 'vgPlain_pp_addrinfo_mc'
mc_errors.c:643: error: undefined reference to 'vgPlain_get_error_string'
mc_errors.c:703: error: undefined reference to 'vgPlain_get_error_kind'
mc_errors.c:663: error: undefined reference to 'vgPlain_get_error_address'
mc_errors.c:668: error: undefined reference to 'vgPlain_pp_addrinfo_mc'
mc_errors.c:603: error: undefined reference to 'vgPlain_get_error_address'
mc_errors.c:739: error: undefined reference to 'vgPlain_is_watched'
mc_errors.c:742: error: undefined reference to 'vgPlain_get_SP'
mc_errors.c:753: error: undefined reference to 'vgPlain_maybe_record_error'
mc_errors.c:765: error: undefined reference to 'vgPlain_maybe_record_error'
mc_errors.c:776: error: undefined reference to 'vgPlain_maybe_record_error'
mc_errors.c:784: error: undefined reference to 'vgPlain_maybe_record_error'
mc_errors.c:843: error: undefined reference to 'vgPlain_initThreadInfo'
mc_errors.c:877: error: undefined reference to 'vgPlain_unique_error'
mc_errors.c:930: error: undefined reference to 'vgPlain_get_error_extra'
mc_errors.c:931: error: undefined reference to 'vgPlain_get_error_extra'
mc_errors.c:934: error: undefined reference to 'vgPlain_get_error_kind'
mc_errors.c:934: error: undefined reference to 'vgPlain_get_error_kind'
mc_errors.c:1081: error: undefined reference to 'vgPlain_pp_addrinfo_mc'
mc_errors.c:1099: error: undefined reference to 'vgPlain_get_error_extra'
mc_errors.c:1296: error: undefined reference to 'vgPlain_set_supp_kind'
mc_errors.c:1325: error: undefined reference to 'vgPlain_get_supp_kind'
mc_errors.c:1326: error: undefined reference to 'vgPlain_get_line'
mc_errors.c:1329: error: undefined reference to 'vgPlain_get_supp_kind'
mc_errors.c:1352: error: undefined reference to 'vgPlain_get_supp_kind'
mc_errors.c:1328: error: undefined reference to 'vgPlain_strdup'
mc_errors.c:1328: error: undefined reference to 'vgPlain_set_supp_string'
mc_errors.c:1337: error: undefined reference to 'vgPlain_set_supp_extra'
mc_errors.c:1338: error: undefined reference to 'vgPlain_get_line'
mc_errors.c:1342: error: undefined reference to 'vgPlain_isspace'
mc_errors.c:1356: error: undefined reference to 'vgPlain_get_line'
mc_errors.c:1360: error: undefined reference to 'vgPlain_strdup'
mc_errors.c:1363: error: undefined reference to 'vgPlain_strchr'
mc_errors.c:1367: error: undefined reference to 'vgPlain_strchr'
mc_errors.c:1371: error: undefined reference to 'vgPlain_set_supp_extra'
mc_errors.c:1382: error: undefined reference to 'vgPlain_get_supp_kind'
mc_errors.c:1393: error: undefined reference to 'vgPlain_get_supp_string'
mc_errors.c:1393: error: undefined reference to 'vgPlain_get_supp_string'
mc_errors.c:1442: error: undefined reference to 'vgPlain_get_supp_extra'
mc_errors.c:1426: error: undefined reference to 'vgPlain_get_supp_extra'
mc_errors.c:1521: error: undefined reference to 'vgPlain_snprintf'
mc_errors.c:1510: error: undefined reference to 'vgPlain_snprintf'
mc_errors.c:1533: error: undefined reference to 'vgPlain_get_supp_extra'
mc_errors.c:1551: error: undefined reference to 'vgPlain_get_supp_extra'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/config/arm/lib1funcs.S:1335: error: undefined reference to 'raise'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/unwind-arm-common.inc:289: error: undefined reference to 'abort'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/unwind-arm-common.inc:346: error: undefined reference to 'memcpy'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/unwind-arm-common.inc:376: error: undefined reference to 'memcpy'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/unwind-arm-common.inc:505: error: undefined reference to 'abort'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/config/arm/pr-support.c:378: error: undefined reference to 'abort'
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgcc/config/arm/pr-support.c:384: error: undefined reference to 'abort'
collect2: error: ld returned 1 exit status
make[3]: *** [memcheck-arm-linux] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I am using following script to configure:
export NDK_HOME=$HOME/Softwares/android-ndk-r10b
export HWKIND=generic
export TOOLCHAIN=$NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi
#export TOOLCHAIN=$NDK_HOME/toolchains/mipsel-linux-android-4.6/prebuilt/darwin-x86_64/bin/mipsel-linux-android
#export TOOLCHAIN=$NDK_HOME/toolchains/x86-4.6/prebuilt/darwin-x86_64/bin/i686-linux-android
export AR=$TOOLCHAIN-ar
export LD=$TOOLCHAIN-ld
export CC=$TOOLCHAIN-gcc
export CXX=$TOOLCHAIN-g++
#export CPP=$TOOLCHAIN-cpp
CPPFLAGS="--sysroot=$NDK_HOME/platforms/android-14/arch-arm -DANDROID_HARDWARE_$HWKIND" \
CFLAGS="--sysroot=$NDK_HOME/platforms/android-14/arch-arm" \
./configure CPP="$CPP" CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" --prefix=/data/local/Inst \
--host=armv7-unknown-linux --target=armv7-unknown-linux \
--with-tmpdir=/sdcard
Above script gives me following output:
Maximum build arch: arm
Primary build arch: arm
Secondary build arch:
Build OS: linux
Primary build target: ARM_LINUX
Secondary build target:
Platform variant: android
Primary -DVGPV string: -DVGPV_arm_linux_android=1
Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp bionic.supp
Related
I am trying to use C, MINGW and GLFW to create a program and I keep on getting this error when compiling.
cc1.exe: warning: unrecognized gcc debugging option: y
cc1.exe: warning: unrecognized gcc debugging option: n
cc1.exe: warning: unrecognized gcc debugging option: m
cc1.exe: warning: unrecognized gcc debugging option: i
cc1.exe: warning: unrecognized gcc debugging option: c
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x127): undefined reference to `CreateDCW#16'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x160): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x179): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x1ca): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x24b): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x291): undefined reference to `DeleteDC#4'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x9ee): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0xa07): undefined reference to `GetDeviceCaps#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0xe9f): undefined reference to `CreateDCW#16'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0xeba): undefined reference to `GetDeviceGammaRamp#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0xec8): undefined reference to `DeleteDC#4'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x100e): undefined reference to `CreateDCW#16'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x1029): undefined reference to `SetDeviceGammaRamp#8'
./libs/libglfw3.a(win32_monitor.c.obj):win32_monitor.c:(.text+0x1037): undefined reference to `DeleteDC#4'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0x1f3): undefined reference to `CreateDIBSection#24'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0x262): undefined reference to `CreateBitmap#20'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0x28d): undefined reference to `DeleteObject#4'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0x37b): undefined reference to `DeleteObject#4'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0x389): undefined reference to `DeleteObject#4'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0xb55): undefined reference to `CreateRectRgn#16'
./libs/libglfw3.a(win32_window.c.obj):win32_window.c:(.text+0xc2c): undefined reference to `DeleteObject#4'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x6c4): undefined reference to `DescribePixelFormat#16'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xbbd): undefined reference to `DescribePixelFormat#16'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0xf46): undefined reference to `SwapBuffers#4'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x1254): undefined reference to `ChoosePixelFormat#8'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x126f): undefined reference to `SetPixelFormat#12'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x1592): undefined reference to `DescribePixelFormat#16'
./libs/libglfw3.a(wgl_context.c.obj):wgl_context.c:(.text+0x15d9): undefined reference to `SetPixelFormat#12'
collect2.exe: error: ld returned 1 exit status
This is my code
#include "GLFW/glfw3.h"
#include <stdio.h>
#define GLFW_INCLUDE_GLCOREARB
int main() {
GLFWwindow* window;
if (!glfwInit()) return -1;
window = glfwCreateWindow(640, 480, "Test", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
while (!glfwWindowShouldClose(window))
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwTerminate();
return 0;
}
So its basically just the given example on glfw website.
I use this command to build:
gcc -o Test.o Main.c -IGLFW -IGL -dynamic ./libs/glfw3.dll ./libs/glew32.dll -lopengl32 -static ./libs/libglfw3.a ./libs/glew32.lib ./libs/glew32s.lib
I dont have any issues with compiling the glfw but I have problems with GLEW, maybe it is because it is lib files instead of a.
I'm trying to compile the following program in Main.c:
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
int main()
{
glfwInit();
return 0;
}
I compile it with:
gcc -m64 -c -g -I"libs/vulkan/include" -I"libs/GLFW/include" -std=c11 -MMD -MP -MF "bin/main.o.d" -o bin/main.o src/Main.c
and link it with:
gcc -m64 -o bin/vulkanfirsttest.exe bin/main.o -L"libs/vulkan/lib" -L"libs/GLFW/lib" -L"C:/msys64/mingw64/lib" -lvulkan-1 -lglfw3 -lgdiplus
It compiles successfully but when I try to link it, it spits out the following errors:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0x8e): undefined reference to `__imp_CreateDCW'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xc8): undefined reference to `__imp_GetDeviceCaps'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0x123): undefined reference to `__imp_DeleteDC'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0x263): undefined reference to `__imp_GetDeviceCaps'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0x88b): undefined reference to `__imp_GetDeviceCaps'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0x9db): undefined reference to `__imp_GetDeviceCaps'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xdaa): undefined reference to `__imp_CreateDCW'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xdb9): undefined reference to `__imp_GetDeviceGammaRamp'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xdc2): undefined reference to `__imp_DeleteDC'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xf37): undefined reference to `__imp_CreateDCW'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xf46): undefined reference to `__imp_SetDeviceGammaRamp'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_monitor.c.obj):(.text+0xf4f): undefined reference to `__imp_DeleteDC'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x21a): undefined reference to `__imp_CreateDIBSection'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x253): undefined reference to `__imp_CreateBitmap'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x304): undefined reference to `__imp_DeleteObject'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x397): undefined reference to `__imp_DeleteObject'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x432): undefined reference to `__imp_CreateRectRgn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(win32_window.c.obj):(.text+0x4ab): undefined reference to `__imp_DeleteObject'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0x16a): undefined reference to `__imp_SwapBuffers'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0x42d): undefined reference to `__imp_ChoosePixelFormat'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0x43b): undefined reference to `__imp_SetPixelFormat'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0xc97): undefined reference to `__imp_DescribePixelFormat'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0xe81): undefined reference to `__imp_DescribePixelFormat'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0xe9b): undefined reference to `__imp_SetPixelFormat'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libs/GLFW/lib/libglfw3.a(wgl_context.c.obj):(.text+0x1498): undefined reference to `__imp_DescribePixelFormat'
I found a post that had a similar problem, and the answer was to also link gdi32, but there isn't a gdi32 package in mysys2. There is gdiplus (mingw64/mingw-w64-x86_64-libgdiplus 5.6.1-1), but as you can see that doesn't help.
I'm using Mingw's gcc compiler but when I started using the -std options, the linker started complaining about references (except for -std=gnuXX).
I can't find anything about this (maybe I'm really bad at research) because most of the results are on linux and/or relate to other problems with ld..
Here is the command I typed :
gcc src/main.c -o bin/main.exe -std=c11 The same occurs with c89,c99,c17 etc..
Here is my test code :
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
printf("Cool\n");
return EXIT_SUCCESS;
}
Here is the command output
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(mbrscan.o):(.text+0xb6):
undefined reference to `SetLastError#4'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(wcharmap.o):(.text+0x208): undefined reference to `WideCharToMultiByte#32'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingwex.a(codeset.o):(.text+0xbe):
undefined reference to `GetCPInfo#8'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingwex.a(codeset.o):(.text+0x143): undefined reference to `GetCPInfo#8'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_mutex_init_function':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:639: undefined reference to `CreateSemaphoreW#16'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_key_create':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:590: undefined reference to `TlsAlloc#0'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: /home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:597: undefined reference to `__mingwthr_key_dtor'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_getspecific':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:621: undefined reference to `SetLastError#4'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_mutex_lock':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:655: undefined reference to `InterlockedIncrement#4'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_mutex_unlock':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:689: undefined reference to `InterlockedDecrement#4'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: /home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:690: undefined reference to `ReleaseSemaphore#12'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_setspecific':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:629: undefined reference to `TlsSetValue#8'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_once':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:562: undefined reference to `InterlockedIncrement#4'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/libgcc_eh.a(emutls.o): in function `_gthread_mutex_lock':
/home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:656: undefined reference to `WaitForSingleObject#8'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: /home/keith/builds/mingw/gcc-9.2.0-mingw32-cross-native/mingw32/libgcc/./gthr-default.h:662: undefined reference to `InterlockedDecrement#4'
collect2.exe: error: ld returned 1 exit status
I'm also wondering if I should use Mingw-w64 or Clang/LLVM instead.. ?
EDIT : It works fine with Mingw-w64 so I switched, thanks !
I have a source, that I'd like to build and link against the libav library on Linux.
I followed the compilation guide of ffmpeg here: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
Everything works.
I build the included examples like this: FFmpeg: building example C codes
It also works.
Now, I'd like to build my own little applications, where I try to learn about using libav. My current problem is, that by using the command line
gcc muxing.c -g -I ../../../ffmpeg_build/include/ -L ../../../ffmpeg_build/lib/ -lavdevice -lavformat -lavfilter -lavcodec -lswresample -lswscale -lavutil -lm -lz -lpthread -lfdk-aac -lmp3lame -lx264 -lva -lX11
I get to this point:
muxing.c: In function ‘write_audio_frame’:
muxing.c:354:5: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_encode_audio2(codecContext, &pkt, frame, &got_packet);
^~~
In file included from ../../../ffmpeg_build/include/libavformat/avformat.h:317:0,
from muxing.c:42:
../../../ffmpeg_build/include/libavcodec/avcodec.h:5418:5: note: declared here
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
^~~~~~~~~~~~~~~~~~~~~
muxing.c: In function ‘write_video_frame’:
muxing.c:524:5: warning: ‘avcodec_encode_video2’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_encode_video2(codecContext, &pkt, frame, &got_packet);
^~~
In file included from ../../../ffmpeg_build/include/libavformat/avformat.h:317:0,
from muxing.c:42:
../../../ffmpeg_build/include/libavcodec/avcodec.h:5457:5: note: declared here
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: ../../../ffmpeg_build/lib//libx264.a(opencl-8.o): undefined reference to symbol 'dlclose##GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Then I read, in order to overcome this linker error, I have to append -ldl to my command line, but then I get this:
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_flush':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:204: undefined reference to `opus_multistream_decoder_ctl'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:169: undefined reference to `opus_multistream_decode_float'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:165: undefined reference to `opus_multistream_decode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:174: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:145: undefined reference to `opus_multistream_decoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libopusdec.o): In function `libopus_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:101: undefined reference to `opus_multistream_decoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:105: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:111: undefined reference to `opus_multistream_decoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:113: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:126: undefined reference to `opus_multistream_decoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusdec.c:129: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:487: undefined reference to `opus_multistream_encode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:483: undefined reference to `opus_multistream_encode_float'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:492: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:530: undefined reference to `opus_multistream_encoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:348: undefined reference to `opus_multistream_encoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:358: undefined reference to `opus_multistream_surround_encoder_create'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:365: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_configure_encoder':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:121: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:123: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:128: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:131: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:134: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:136: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:139: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:142: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:145: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:148: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:153: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:156: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:161: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:164: undefined reference to `opus_strerror'
../../../ffmpeg_build/lib//libavcodec.a(libopusenc.o): In function `libopus_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:410: undefined reference to `opus_multistream_encoder_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:412: undefined reference to `opus_strerror'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libopusenc.c:426: undefined reference to `opus_multistream_encoder_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:287: undefined reference to `vorbis_analysis_buffer'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:294: undefined reference to `vorbis_analysis_wrote'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:310: undefined reference to `vorbis_analysis_blockout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:311: undefined reference to `vorbis_analysis'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:313: undefined reference to `vorbis_bitrate_addblock'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:317: undefined reference to `vorbis_bitrate_flushpacket'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:302: undefined reference to `vorbis_analysis_wrote'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:180: undefined reference to `vorbis_analysis_wrote'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:182: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:183: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:184: undefined reference to `vorbis_info_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:203: undefined reference to `vorbis_info_init'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_setup':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:98: undefined reference to `vorbis_encode_setup_vbr'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:107: undefined reference to `vorbis_encode_setup_managed'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:114: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:121: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:127: undefined reference to `vorbis_encode_ctl'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:160: undefined reference to `vorbis_encode_setup_init'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisenc.o): In function `libvorbis_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:208: undefined reference to `vorbis_analysis_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:214: undefined reference to `vorbis_block_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:220: undefined reference to `vorbis_comment_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:222: undefined reference to `vorbis_comment_add_tag'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:224: undefined reference to `vorbis_analysis_headerout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisenc.c:257: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:161: undefined reference to `vpx_codec_decode'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:221: undefined reference to `vpx_codec_get_frame'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:162: undefined reference to `vpx_codec_error'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:163: undefined reference to `vpx_codec_error_detail'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:161: undefined reference to `vpx_codec_decode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:162: undefined reference to `vpx_codec_error'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_decode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:222: undefined reference to `vpx_codec_get_frame'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:201: undefined reference to `vpx_codec_vp9_dx_algo'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:201: undefined reference to `vpx_codec_vp8_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_free':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:269: undefined reference to `vpx_codec_destroy'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:271: undefined reference to `vpx_codec_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vpx_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:53: undefined reference to `vpx_codec_version_str'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:54: undefined reference to `vpx_codec_build_config'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:56: undefined reference to `vpx_codec_dec_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:59: undefined reference to `vpx_codec_error'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vp8_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:278: undefined reference to `vpx_codec_vp8_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxdec.o): In function `vp9_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxdec.c:298: undefined reference to `vpx_codec_vp9_dx_algo'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_encode':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1118: undefined reference to `vpx_codec_encode'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1126: undefined reference to `vpx_codec_encode'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `queue_frames':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:979: undefined reference to `vpx_codec_get_cx_data'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:981: undefined reference to `vpx_codec_get_cx_data'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `log_encoder_error':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:164: undefined reference to `vpx_codec_error'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:165: undefined reference to `vpx_codec_error_detail'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `codecctl_int':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:298: undefined reference to `vpx_codec_control_'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:524: undefined reference to `vpx_codec_get_caps'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:527: undefined reference to `vpx_codec_version_str'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:528: undefined reference to `vpx_codec_build_config'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:533: undefined reference to `vpx_codec_enc_config_default'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:534: undefined reference to `vpx_codec_err_to_string'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:719: undefined reference to `vpx_codec_enc_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:727: undefined reference to `vpx_codec_enc_init_ver'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:812: undefined reference to `vpx_img_wrap'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:820: undefined reference to `vpx_img_wrap'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vp8_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1279: undefined reference to `vpx_codec_vp8_cx'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vp9_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:1309: undefined reference to `vpx_codec_vp9_cx'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `codecctl_intp':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:320: undefined reference to `vpx_codec_control_'
../../../ffmpeg_build/lib//libavcodec.a(libvpxenc.o): In function `vpx_free':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:344: undefined reference to `vpx_codec_destroy'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpxenc.c:346: undefined reference to `vpx_codec_destroy'
../../../ffmpeg_build/lib//libavcodec.a(libx265.o): In function `libx265_encode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:84: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:86: undefined reference to `x265_api_get_173'
../../../ffmpeg_build/lib//libavcodec.a(libx265.o): In function `libx265_encode_init_csp':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:494: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:496: undefined reference to `x265_api_get_173'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libx265.c:498: undefined reference to `x265_api_get_173'
../../../ffmpeg_build/lib//libavcodec.a(libvpx.o): In function `ff_vp9_init_static':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpx.c:73: undefined reference to `vpx_codec_vp9_cx'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvpx.c:73: undefined reference to `vpx_codec_get_caps'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:191: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:192: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:193: undefined reference to `vorbis_info_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:194: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_frame':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:169: undefined reference to `vorbis_synthesis'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:175: undefined reference to `vorbis_synthesis_pcmout'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:179: undefined reference to `vorbis_synthesis_read'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:170: undefined reference to `vorbis_synthesis_blockin'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:48: undefined reference to `vorbis_info_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:49: undefined reference to `vorbis_comment_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:97: undefined reference to `vorbis_synthesis_headerin'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_close':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:191: undefined reference to `vorbis_block_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:192: undefined reference to `vorbis_dsp_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:193: undefined reference to `vorbis_info_clear'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:194: undefined reference to `vorbis_comment_clear'
../../../ffmpeg_build/lib//libavcodec.a(libvorbisdec.o): In function `oggvorbis_decode_init':
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:109: undefined reference to `vorbis_synthesis_init'
/home/ritter/ffmpeg_sources/ffmpeg/libavcodec/libvorbisdec.c:110: undefined reference to `vorbis_block_init'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_create':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1490: undefined reference to `vaGetDisplay'
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1514: undefined reference to `vaGetDisplayDRM'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_derive':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:1561: undefined reference to `vaGetDisplayDRM'
../../../ffmpeg_build/lib//libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_create':
/home/ritter/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:461: undefined reference to `vdp_device_create_x11'
collect2: error: ld returned 1 exit status
So, what can I do, to get it compiled and linked fully?
I want to use standard c function in one of my function
void print(const char* format,...) {
char buffer[256];
va_list args;
va_start (args, format);
vsnprintf (buffer,256,format, args);
va_end (args);
sendString(buffer);
}
Error coming is
arm-none-eabi-ld -o check.elf -T /home/sanju/Arm/check/other/ROM.ld Serial.o irq.o lowlevel.o main.o startup.o \
-L/usr/arm-none-eabi/lib -lc -lg -lm
/usr/arm-none-eabi/lib/libc.a(lib_a-svfprintf.o): In function `_svfprintf_r':
vfprintf.c:(.text+0x688): undefined reference to `__aeabi_dcmplt'
vfprintf.c:(.text+0xdfc): undefined reference to `__aeabi_dcmpeq'
vfprintf.c:(.text+0x10b4): undefined reference to `__aeabi_dcmpeq'
vfprintf.c:(.text+0x168c): undefined reference to `__aeabi_uldivmod'
vfprintf.c:(.text+0x16a8): undefined reference to `__aeabi_uldivmod'
vfprintf.c:(.text+0x1a48): undefined reference to `__aeabi_dcmpeq'
vfprintf.c:(.text+0x1eac): undefined reference to `__aeabi_dcmpeq'
/usr/arm-none-eabi/lib/libc.a(lib_a-dtoa.o): In function `quorem':
dtoa.c:(.text+0x3c): undefined reference to `__aeabi_uidiv'
/usr/arm-none-eabi/lib/libc.a(lib_a-dtoa.o): In function `_dtoa_r':
dtoa.c:(.text+0x274): undefined reference to `__aeabi_dcmpeq'
dtoa.c:(.text+0x360): undefined reference to `__aeabi_ui2d'
dtoa.c:(.text+0x37c): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x388): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x394): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0x3a4): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x3b0): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x3c4): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0x3d0): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0x3e8): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0x418): undefined reference to `__aeabi_dcmpgt'
dtoa.c:(.text+0x5a8): undefined reference to `__aeabi_ddiv'
dtoa.c:(.text+0x5ac): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0x5b4): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x5c0): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x5d4): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x608): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x61c): undefined reference to `__aeabi_dcmpeq'
dtoa.c:(.text+0x650): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x664): undefined reference to `__aeabi_dcmpeq'
dtoa.c:(.text+0x684): undefined reference to `__aeabi_ddiv'
dtoa.c:(.text+0x688): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0x690): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x69c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x6b0): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x6fc): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0x718): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0x73c): undefined reference to `__aeabi_dcmpeq'
dtoa.c:(.text+0xa94): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0xaa0): undefined reference to `__aeabi_dcmpeq'
dtoa.c:(.text+0xbf8): undefined reference to `__aeabi_ddiv'
dtoa.c:(.text+0xc2c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0xc58): undefined reference to `__aeabi_ddiv'
dtoa.c:(.text+0xc80): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0xc90): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0xc9c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0xca8): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0xce8): undefined reference to `__aeabi_ddiv'
dtoa.c:(.text+0xcf4): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xd08): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0xd10): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0xd24): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xd54): undefined reference to `__aeabi_dcmpgt'
dtoa.c:(.text+0xd78): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xd8c): undefined reference to `__aeabi_dcmpgt'
dtoa.c:(.text+0xdd0): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xddc): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0xe00): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0xe1c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0xe28): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0xe30): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0xe44): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xe64): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0xef0): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0xefc): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0xf08): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0xf24): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0xf38): undefined reference to `__aeabi_dcmpgt'
dtoa.c:(.text+0xf54): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0x10c0): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x10e8): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x1130): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x1144): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0x114c): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x1160): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x119c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x11a8): undefined reference to `__aeabi_d2iz'
dtoa.c:(.text+0x11b0): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x11c8): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x1200): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0x120c): undefined reference to `__aeabi_dcmplt'
dtoa.c:(.text+0x12cc): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x12d8): undefined reference to `__aeabi_dcmpge'
dtoa.c:(.text+0x158c): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x159c): undefined reference to `__aeabi_i2d'
dtoa.c:(.text+0x15b0): undefined reference to `__aeabi_dmul'
dtoa.c:(.text+0x15bc): undefined reference to `__aeabi_dadd'
dtoa.c:(.text+0x15ec): undefined reference to `__aeabi_dsub'
dtoa.c:(.text+0x15f8): undefined reference to `__aeabi_dcmpgt'
/usr/arm-none-eabi/lib/libc.a(lib_a-mprec.o): In function `__ratio':
mprec.c:(.text+0xbc0): undefined reference to `__aeabi_ddiv'
/usr/arm-none-eabi/lib/libc.a(lib_a-mprec.o): In function `_mprec_log10':
mprec.c:(.text+0xbf0): undefined reference to `__aeabi_dmul'
/usr/arm-none-eabi/lib/libc.a(lib_a-svfiprintf.o): In function `_svfiprintf_r':
vfprintf.c:(.text+0xf30): undefined reference to `__aeabi_uldivmod'
vfprintf.c:(.text+0xf4c): undefined reference to `__aeabi_uldivmod'
make: *** [all] Error 1
*** Failure: Exit code 2 ***
My makefile is this
TOOLCHAIN=arm-none-eabi-
ARM_CPU=arm7tdmi
VPATH= /home/sanju/Arm/check/src /home/sanju/Arm/check/other /home/sanju/Arm/check/include
INCLUDE= /home/sanju/Arm/check/include
CCFLAGS= -mcpu=$(ARM_CPU) -mthumb-interwork -ffunction-sections -Os -Wall
ASFLAGS= -mcpu=$(ARM_CPU) -mthumb-interwork -mfpu=softfpa -Wall
all: Serial.o irq.o lowlevel.o main.o startup.o
$(TOOLCHAIN)ld -o check.elf -T /home/sanju/Arm/check/other/ROM.ld Serial.o irq.o
lowlevel.o main.o startup.o \
-L/usr/arm-none-eabi/lib -lc -lg -lm
$(TOOLCHAIN)objcopy -O ihex check.elf check.hex
$(TOOLCHAIN)objcopy -O binary check.elf check.bin
Serial.o : Serial.c Serial.h
$(TOOLCHAIN)gcc $(CCFLAGS) -I$(INCLUDE) -c $<
irq.o : irq.c irq.h lpc214x.h
$(TOOLCHAIN)gcc $(CCFLAGS) -I$(INCLUDE) -c $<
lowlevel.o : lowlevel.c lowlevel.h
$(TOOLCHAIN)gcc $(CCFLAGS) -I$(INCLUDE) -c $<
main.o : main.c lpc214x.h timer0.h Asm.h lowlevel.h type.h Serial.h
$(TOOLCHAIN)gcc $(CCFLAGS) -I$(INCLUDE) -c $<
startup.o : startup.S
$(TOOLCHAIN)as $(ASFLAGS) -o startup.o $<
.PHONY: clean
clean :
rm -rf *.o *.elf *.hex *.o *.bin
In the target all it fails in linking. I have tried the example with arm-elf toolchain there also i am getting some errors.I have googled a lot for it but did not find any solution for it.
Try using gcc as ld frontend.
Change:
$(TOOLCHAIN)ld -o check.elf [...]
into
$(TOOLCHAIN)gcc -o check.elf [...]
GCC knows to add some necessary options when invoking ld.
Do things go any better when adding "-lgcc" to -L?
instead of using ld for linking i used gcc but it was including the supplied crt.o object file so i used -nostartfiles and it worked for me.