Ipmiutil compilation fails for arm7 (ipq807x)

I'm trying to compile ipmiutil for arm arch, and the build seems to fail

`/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ipmilan.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ipmilanplus.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ipmilan.o(.text+0x134): unresolvable R_ARM_CALL relocation against symbol `alarm'
collect2: error: ld returned 1 exit status
make[5]: *** [libipmiutil.so] Error 1
make[5]: Leaving directory `/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ipmiutil-2.7.2/util'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ipmiutil-2.7.2'
make[3]: *** [all] Error 2

`

I do have -fPIC in the CFLAG:
if arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DLINUX -DSKIP_MD2 **-fPIC** -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_LANPLUS -I. -I.. -DMETACOMMAND -I/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/usr/include -I/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/include/fortify -I/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/include -Os -pipe -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/home/developer1/DIVYA/private_br/openwrt_packages/openwrt-21.02/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/ipmiutil-2.7.2=ipmiutil-2.7.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wno-error -MT ipmilan.o -MD -MP -MF ".deps/ipmilan.Tpo" -c -o ipmilan.o ipmilan.c; \

Could someone please suggest the right thing to do.

Thanks in adv!
D

Thats QSDK obviously, so no idea why you are asking on OpenWrt forum

Sorry for my negligence, had switched to ipq807x sourced from LEDE , from x86, hence the post.

Whatever is the source of what you call "LEDE" is definitively not OpenWrt, as there is no ipq807x in OpenWrt, especially not in 21.02 version

1 Like