Compiling Packages with GLIBC on OpenWRT 21 SDK

Hey everyone,

I'm working with an OpenWRT 21 system built with BusyBox, running on an imx6 arm cortex a9_neon board. My setup uses GCC version 8.4.0 with glibc. Right now, I'm trying to get some packages installed – specifically ccid, pcscd, and pcsc-tools – but they're not in the opkg repositories.

I tried using the OpenWRT Precompiled SDK from the image to compile these packages myself. However, I ran into an issue: the SDK seems to default to using musl, and when I transfer the .ipk files to my board, they just won’t run because my device is using glibc. I even tried pulling the SDK from GitHub and compiling it myself, but still ended up with musl.

I’m kind of stuck here and could use some advice. How can I configure Menuconfig or the Makefile to compile these packages specifically with glibc, for a certain version if needed? Any tips or pointers would be greatly appreciated!

You need to pull in the buildroot and set it to compile glibc instead of musl. Not the SDK. The SDK is precompiled and you basically need a custom cross-compilation environment - only the buildroot can do that for you.


Thank you for your response. Actually, I also started with the branch beginning with OpenWrt v21 for my second try(cloned the openwrt). After that, I ran the update and install commands using the feeds script and then opened the configuration page with make menuconfig in the main directory after that i run make command. However, I couldn't find where I should set it not to use musl on this page. When I look at the .config file, I see a variable like use_musl, but I couldn't find out how to set it from within menuconfig.

Use the forward slash / followed by 'libc' (no quotes) in the ncurses interface to search for entries. The results will show you the path etc.


Thank you i could compile and use.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.