I'm trying to crosscompile MQTT client for ARM platform. At the final step, creation of binaries, the system reports errors below. I guess that I overlooked something... What could be the reason ? I'm not sure whether this is the problem of program I compile, or toolchain or any setting ? Thanks in advance, regards, R. Log : .... ... arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: 6402 bad relocs collect2: ld returned 1 exit status make[1]: *** [Makefile:26: static_pub] Error 1 make[1]: Leaving directory 'mosquitto-1.6.12/client' make: *** [Makefile:59: mosquitto] Error 2

Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - how to solve ?
Started by ●November 15, 2020
Reply by ●November 15, 20202020-11-15
On 15.11.20 18.34, Prijazen Dom wrote:> I'm trying to crosscompile MQTT client for ARM platform. At the final step, creation of binaries, the system reports errors below. > > I guess that I overlooked something... > > What could be the reason ? I'm not sure whether this is the problem of program I compile, or toolchain or any setting ? > > Thanks in advance, regards, R. > > Log : > .... > ... > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: 6402 bad relocs > collect2: ld returned 1 exit status > make[1]: *** [Makefile:26: static_pub] Error 1 > make[1]: Leaving directory 'mosquitto-1.6.12/client' > make: *** [Makefile:59: mosquitto] Error 2Your problem is ucLinux. The complaint comes from the last stage of the run file generation, where the executable is converted to form suitable for hardware without a memory translation unit. I do not have a recipe to rectify the situation. -- -TV
Reply by ●November 25, 20202020-11-25
On 16/11/2020 12:34 am, Prijazen Dom wrote:> I'm trying to crosscompile MQTT client for ARM platform. At the final step, creation of binaries, the system reports errors below. > > I guess that I overlooked something... > > What could be the reason ? I'm not sure whether this is the problem of program I compile, or toolchain or any setting ? > > Thanks in advance, regards, R. > > Log : > .... > ... > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: reloc type R_ARM_ABS32 is not supported for PIC > arm-2010q1/arm-uclinuxeabi/bin/elf2flt: error: 6402 bad relocs > collect2: ld returned 1 exit status > make[1]: *** [Makefile:26: static_pub] Error 1 > make[1]: Leaving directory 'mosquitto-1.6.12/client' > make: *** [Makefile:59: mosquitto] Error 2 >Sorry if this is stating the obvious, but R_ARM_ABS32 would seem to be an absolute address, which conflicts with PIC (ie Position Independent Code), which is, by definition, relocatable. What your fix is, I can't say, further.
