build fails if the input exceeds 8000 symbols

Bug #1442975 reported by Amomum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Invalid
Undecided
Unassigned

Bug Description

That's a bug similar in manifestation and conditions to this https://answers.launchpad.net/gcc-arm-embedded/+question/236792.

I am using arm gcc 4.9 2015q1 on windows 7. I'm using eclipse cdt with GNU Make (Sourcery CodeBench Lite 2013.05-23) 3.81.
I'm trying to compile ARM CMSIS DSP Lib which has a lot of files:

arm-none-eabi-g++ -o "Flutilizer" ./src/Startup/system_stm32f4xx.o ./src/STM_Discovery_Audio/stm32f4_discovery_audio_codec.o ./src/STM32F4xx_StdPeriph_Driver/src/misc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_aes.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_des.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_tdes.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fsmc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_md5.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_sha1.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_iwdg.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rng.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.o ./src/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_wwdg.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_bitreversal.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_init_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_init_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_init_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix2_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_init_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_init_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_init_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix4_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_radix8_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_init_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_init_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_init_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_dct4_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_fast_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_fast_init_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_init_f32.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_init_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_init_q31.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_q15.o ./src/CMSIS/DSP_Lib/TransformFunctions/arm_rfft_q31.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_copy_f32.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_copy_q15.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_copy_q31.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_copy_q7.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_fill_f32.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_fill_q15.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_fill_q31.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_fill_q7.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_float_to_q15.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_float_to_q31.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_float_to_q7.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q15_to_float.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q15_to_q31.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q15_to_q7.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q31_to_float.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q31_to_q15.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q31_to_q7.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q7_to_float.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q7_to_q15.o ./src/CMSIS/DSP_Lib/SupportFunctions/arm_q7_to_q31.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_cos_f32.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_cos_q15.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_cos_q31.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_sin_f32.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_sin_q15.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_sin_q31.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_sqrt_q15.o ./src/CMSIS/DSP_Lib/FastMathFunctions/arm_sqrt_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_conj_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_conj_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_conj_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_dot_prod_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_dot_prod_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_dot_prod_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_squared_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_squared_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mag_squared_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_real_f32.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_real_q15.o ./src/CMSIS/DSP_Lib/ComplexMathFunctions/arm_cmplx_mult_real_q31.o ./src/CMSIS/DSP_Lib/CommonTables/arm_common_tables.o ./src/CMSIS/DSP_Lib/CommonTables/arm_const_structs.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_abs_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_abs_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_abs_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_abs_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_add_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_add_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_add_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_add_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_dot_prod_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_dot_prod_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_dot_prod_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_dot_prod_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_mult_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_mult_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_mult_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_mult_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_negate_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_negate_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_negate_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_negate_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_offset_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_offset_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_offset_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_offset_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_scale_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_scale_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_scale_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_scale_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_shift_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_shift_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_shift_q7.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_sub_f32.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_sub_q15.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_sub_q31.o ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_sub_q7.o ./src/main.o ./src/waverecorder.

And I get the error:
arm-none-eabi-g++: error: ./src/CMSIS/DSP_Lib/BasicMathunctions/arm_sub_q15.o: No such file or directory
the correct path to the file is:
 ./src/CMSIS/DSP_Lib/BasicMathFunctions/arm_sub_q7.o

Note please the lack of "F" in BasicMathunctions in the error message. The letter F is 8281st symbol (not the expected 8192nd); and yet for some reason this letter is ignored.
I have tried to exclude some files from the build but some symbol always get ignored alghout it's not always 8281st, it's always more the 8000nd.

Amomum (amomum)
summary: - fails if the input exceeds
+ build fails if the input exceeds 8000 symbols
Revision history for this message
Tony Liu (mrtoniliu) wrote :

Hi,

Would you please follow the comments in the question you found as the workaround?
It seems I can't reproduce this problem on the Linux machine and I guess it may be some kind of problems only exist in Windows.

Regards,
Tony

Revision history for this message
Amomum (amomum) wrote :

Well, that is not a very nice workaround. Right now Eclipse generates makefile for me, I really don't want to edit it by hand.

Even if it is a windows-only bug, it's still a bug, isn't it?

Revision history for this message
Terry Guo (terry.guo) wrote :

I am checking on this. Another possible workaround is archiving those arm_sub_q7.o objects into library like libmath.a first and then use it in final link step.

Revision history for this message
Terry Guo (terry.guo) wrote :

You can also try solution from http://mcuoneclipse.com/2015/03/29/solving-the-8192-character-command-line-limit-on-windows/. You are going to install some other tools which can support long command line.

Revision history for this message
Amomum (amomum) wrote :

Yes, fortunaterly DSP Library is already available as a bunch of .a files for different platforms. Another workaround that I found is to use Eclipse internal builder instead of GNU make.

But it's still a bug.

Revision history for this message
Amomum (amomum) wrote :

Oh, so that's a problem with cmd.exe, not with gcc?

Revision history for this message
Terry Guo (terry.guo) wrote :

I guess your project is a Makefile based project. If so, it is a problem of your make.exe. The process should be the Eclipse call make.exe to handle Makefile, the make.exe then call arm-none-eabi-gcc.exe to do final link. When make.exe pass arguments to arm-none-eabi-gcc.exe, the make.exe cuts the arguments itself, so the arm-none-eabi-gcc.exe gets corrupt options. I suggest you to backup your current make.exe and use make.exe provided from http://gnuarmeclipse.livius.net/blog/build-tools-windows/.

Revision history for this message
Amomum (amomum) wrote :

Okay, thank you very much.
Since it seems not to be a bug in gcc, I suppose, we can close it?

Revision history for this message
Terry Guo (terry.guo) wrote :

Closed as Invalid. Feel free to reopen this for any further concerns.

Changed in gcc-arm-embedded:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.