Skip to content
Advertisement

Standard C library linker issues while compiling and linking using ARM Compiler 6

I am facing some linker issues in ARM DS IDE, i am trying build code for ARMVv-8 architecture, Cortex A72 processor with ARM Compiler 6.

I think those error are related to standard libraries like stdio.h ,math.h these errors should not come as linker always looks for standard libraries paths on Linux machine.

Am i missing something or making some compiler, linker mistake ?

Building target: fresample.axf
Invoking: Arm Linker 6
armlink --userlibpath=/usr/lib/x86_64-linux-gnu --info=sizes -o "fresample.axf"  ./src/audio.o ./src/audio_format.o ./src/audio_rate.o ./src/audio_raw_load.o ./src/audio_wav_check.o ./src/audio_wav_load.o ./src/audio_wav_save.o ./src/common.o ./src/file.o ./src/main.o ./src/riff.o  ./lib/cpu.o ./lib/filter_delay.o ./lib/filter_free.o ./lib/filter_get.o ./lib/filter_new.o ./lib/filter_new_window.o ./lib/info_name.o ./lib/param.o ./lib/param_name.o ./lib/resample.o ./lib/resample_s16func.o ./lib/resample_s16n1f32_altivec.o ./lib/resample_s16n1f32_scalar.o ./lib/resample_s16n1f32_sse2.o ./lib/resample_s16n1s16_altivec.o ./lib/resample_s16n1s16_scalar.o ./lib/resample_s16n1s16_sse2.o ./lib/resample_s16n2f32_altivec.o ./lib/resample_s16n2f32_scalar.o ./lib/resample_s16n2f32_sse2.o ./lib/resample_s16n2s16_altivec.o ./lib/resample_s16n2s16_scalar.o ./lib/resample_s16n2s16_sse2.o ./lib/swap16.o ./lib/swap16_scalar.o   
Error: L6218E: Undefined symbol stderr (referred from common.o).
Error: L6218E: Undefined symbol close (referred from file.o).
Error: L6218E: Undefined symbol fstat (referred from file.o).
Error: L6218E: Undefined symbol mmap (referred from file.o).
Error: L6218E: Undefined symbol munmap (referred from file.o).
Error: L6218E: Undefined symbol open (referred from file.o).
Error: L6218E: Undefined symbol read (referred from file.o).
Error: L6218E: Undefined symbol __assert_fail (referred from main.o).
Error: L6218E: Undefined symbol getopt_long (referred from main.o).
Error: L6218E: Undefined symbol optarg (referred from main.o).
Error: L6218E: Undefined symbol optind (referred from main.o).
Error: L6218E: Undefined symbol optopt (referred from main.o).
Error: L6218E: Undefined symbol stdout (referred from main.o).
Error: L6218E: Undefined symbol __exp_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __log_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __pow_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __sqrt_finite (referred from filter_new.o).
Finished: 0 information, 0 warning and 17 error messages.
make: *** [makefile:33: fresample.axf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

Advertisement

Answer

It’s necessary to have GCC in order to build Linux application with ARM Compiler 6: the reason is that ARM Compiler 6 does not include Linux libraries so it needs to use glibc from GCC.

Here is the link: https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/building-an-armv8-linux-hello-world-with-arm-compiler-6

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement