usbtemp / utmp-cli

Command line interface for reading the temperature from USB thermometer
MIT License
7 stars 3 forks source link

Error compiling for OpenWrt #7

Closed j-fraga closed 2 years ago

j-fraga commented 2 years ago

I successfully built utmp-cli for OpenWrt a few times in the past. Today I cloned the openwrt repo and despite having followed these instructions the build failed:

root@jfraga-Latitude-5491:~/openwrt# make package/feeds/usbtemp/utmp-cli/compile V=sc
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
make[2]: Entering directory '/root/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/root/openwrt/scripts/config'
make[1]: Entering directory '/root/openwrt'
make[2]: Entering directory '/root/openwrt/package/libs/toolchain'
rm -rf /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc.installed /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc
mkdir -p /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc
install -d -m0755 /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc/lib /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc/usr/bin
cp -fpR /root/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/ld-musl-*.so* /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc/lib/
cp: cannot stat '/root/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/lib/ld-musl-*.so*': No such file or directory
make[2]: *** [Makefile:726: /root/openwrt/build_dir/target-mipsel_24kc_musl/toolchain/.pkgdir/libc.installed] Error 1
make[2]: Leaving directory '/root/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.10#0.01#0.10
    ERROR: package/libs/toolchain failed to build.
make[1]: *** [package/Makefile:116: package/libs/toolchain/compile] Error 1
make[1]: Leaving directory '/root/openwrt'
make: *** [/root/openwrt/include/toplevel.mk:230: package/feeds/usbtemp/utmp-cli/compile] Error 2

What am I missing?

jaka commented 2 years ago

It seems like an issue with toolchain for mipsel_24kc. Which version of OpenWrt do you use? Can you try to compile just toolchain or any other package? To see for myself I have just compiled utmp-cli on openwrt-22.03 (checkout on April 1st) for ipq40xx (arm_cortex-a7+neon-vfpv4) successfully after I fixed one issue since github dropped support for unauthenticated git protocol on port 9418, and this error was nothing about musl.

j-fraga commented 2 years ago

You're right, @jaka. The toolchain wasn't ready. I ran:

make menuconfig
make -j $(nproc) kernel_menuconfig
make -j $(nproc) defconfig download clean world

and only then I built utmp-cli and it worked.