I am building my custom Linux image using Yocto.
Up till recently I was using Ubuntu 18.04 that has GLIBC 2.27.
Now, I moved to Ubuntu 20.04 that has GLIBC 2.31.
One of the packages I am using, is the sharutils
package.
In one of the recipes I build, I have the following:
DEPENDS += "sharutils-native"
The sharutils
package version used in my Yocto build is 4.15.2 (i.e. sharutils_4.15.2.bb
).
The relevant recipe’s files are the following:
meta-openembedded-recipes-support-sharutils relevant files.
When the source files for this sharutils
version are fetched, among them source files that are used also for the m4
package are fetched and built.
During the “bump” of the m4
package from version 1.4-18 to 1.4-19, one of the fixes that was “inherntily”
fixed (in 1.4-19) is the one that BEFORE (1.4-18) was applied via a patch:
m4-1.4.18-glibc-change-work-around.patch
This patch solves the issue (of incompatible glibc version) which is raised when trying to build sorce files for the sharutils/m4 package
with glibc version 2.28 or later –> which is the case in my environment.
sharutils-4.15.2/lib/fseeko.c: In function ‘rpl_fseeko’:
sharutils-4.15.2/lib/fseeko.c:110:4: error:
#error “Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib.”
#error “Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib.”
So eventually, when I build the sharutils_4.15.2
, I encounter this issue.
I was able to solve it “manually” by adding the above patch to a sharutils_4.15.2.bbappend
file I added as follows (I am unable to modify the
sharutils_4.15.2.bb
):
FILESEXTRAPATHS:append := "${THISDIR}/files:"
SRC_URI += "
file://m4-1.4.18-glibc-change-work-around.patch
"
My questions are:
- Can you think of another appraoch to solve this issue?
- If my approach is “legitimate”, does not it mean, that there should be a “fix” applied to the current version of
sharutils
in Open Embedded official
repo?
Meaning, under the following folder:
sharutils recipe folder
Them4-1.4.18-glibc-change-work-around.patch
should be added as well?
Thanks,
Guy.