Skip to contentSkip to conversation

aufs-util: Fix build with large file support enabled systems

PATCH New Khem Raj 1 participant 10 messages Nov 30, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/10 aufs-util: Fix build with large file support enabled systems

Fixes

| /mnt/b/yoe/master/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/aufs-util/4.9+gitAUTOINC+8f35db59ef-r0/recipe-sysroot-native/usr/bin/arm-yoe-linux-gnueabi/arm-yoe-linux-gnueabi-ld: rdu64.o: in function `readdir64':
| <unknown>:122: multiple definition of `readdir64'; rdu.o:<unknown>:122: first defined here
| /mnt/b/yoe/master/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/aufs-util/4.9+gitAUTOINC+8f35db59ef-r0/recipe-sysroot-native/usr/bin/arm-yoe-linux-gnueabi/arm-yoe-linux-gnueabi-ld: rdu64.o: in function `readdir64_r':
| <unknown>:139: multiple definition of `readdir64_r'; rdu.o:<unknown>:139: first defined here
---
 ...-Do-not-build-LFS-version-of-readdir.patch | 32 +++++++++++++++++++
 .../recipes-utils/aufs-util/aufs-util_git.bb  |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Do-not-build-LFS-version-of-readdir.patch
meta-filesystems/recipes-utils/aufs-util/aufs-util/0001-libau-Do-not-build-LFS-version-of-readdir.patch new file +32 -0
new file mode 100644
index 0000000000..c983733dcb
@@ -0,0 +1,32 @@
+From 12ba95281d0bbea3576350d635b4dee0f953b94a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 29 Nov 2022 18:38:07 -0800
+Subject: [PATCH] libau: Do not build LFS version of readdir
+
+rdu64 is providing largefile supported version of readdir and readdir_r
+however, we enable largefile support unconditionally in OE therefore its
+not needed since readdir() and readdir_r() are already LFS capable
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ libau/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libau/Makefile b/libau/Makefile
+index 9ada831..1fd1ccc 100644
+--- a/libau/Makefile
++++ b/libau/Makefile
+@@ -30,7 +30,7 @@ STRIP ?= strip
+ all: ${LibSo}
+ 
+ ifeq (${Glibc},yes)
+-LibSoObj += rdu64.o
++#LibSoObj += rdu64.o
+ 
+ # this is unnecessary on 64bit system?
+ rdu64.c: rdu.c
+-- 
+2.38.1
+
meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb +1 -0
index f565be3f7e..fbf7753b02 100644
@@ -12,6 +12,7 @@ SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs4.9 \
            https://raw.githubusercontent.com/sfjro/aufs4-linux/aufs4.9/include/uapi/linux/aufs_type.h;name=aufs_type \
            file://aufs-util-don-t-strip-executables.patch \
            file://aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch \
+           file://0001-libau-Do-not-build-LFS-version-of-readdir.patch \
 "
 SRC_URI[aufs_type.md5sum] = "b37129ef0703de72a852db7e48bdedc6"
 SRC_URI[aufs_type.sha256sum] = "7ff6566adb9c7a3b6862cdc85a690ab546f1d0bc81ddd595fd663c0a69031683"
Signature · 1 line
2.38.1
author
#1 lore raw

PATCH 2/10 volume-key: Inherit python3targetconfig

It uses python3-config during build to grok the python specific includedirs, therefore its important to ensure that target specific python3-config is used, otherwise currently it defaults to native python3-config which ends up adding native python3 include paths which might work out ok but is exposed when target is 32bit + lfs enabled, the headers don't match between native and target python and compile fails e.g.

| In file included from /mnt/b/yoe/master/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/volume-key/0.3.12-r0/recipe-sysroot-native/usr/include/python3.11/Python.h:38:
| /mnt/b/yoe/master/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/volume-key/0.3.12-r0/recipe-sysroot-native/usr/include/python3.11/pyport.h:601:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
|  ^
---
 meta-oe/recipes-extended/volume_key/volume-key_0.3.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/volume_key/volume-key_0.3.12.bb +1 -1
index faf8dd362d..aff555ad54 100644
@@ -16,7 +16,7 @@ SRC_URI[sha256sum] = "6ca3748fc1dad22c450bbf6601d4e706cb11c5e662d11bb4aeb473a9cd
 SRCNAME = "volume_key"
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit autotools python3native gettext pkgconfig
+inherit autotools python3native python3targetconfig gettext pkgconfig
 
 DEPENDS += " \
     util-linux \
Signature · 1 line
2.38.1
author
#2 lore raw

PATCH 3/10 proj: Enable apps when building native variant

In reply to Khem Raj

proj binary is used during build by some recipes e.g. python3-pyproj

---
 meta-oe/recipes-navigation/proj/proj_9.1.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-navigation/proj/proj_9.1.0.bb +2 -0
index b956ce50ff..ab69f07760 100644
@@ -17,6 +17,8 @@ FILES:${PN} += "${datadir}/proj"
 BBCLASSEXTEND = "native"
 
 PACKAGECONFIG ?= "curl"
+PACKAGECONFIG:append:class-native = " apps"
+
 PACKAGECONFIG[apps] = "-DBUILD_APPS=ON, -DBUILD_APPS=OFF"
 PACKAGECONFIG[curl] = "-DENABLE_CURL=ON,-DENABLE_CURL=OFF,curl"
 PACKAGECONFIG[tiff] = "-DENABLE_TIFF=ON,-DENABLE_TIFF=OFF,tiff"
Signature · 1 line
2.38.1
author
#3 lore raw

PATCH 4/10 python3-pyproj: Export PROJ_DIR

In reply to Khem Raj

point PROJ_DIR to staged proj-native which can be used during cross build

---
 meta-python/recipes-devtools/python/python3-pyproj_3.4.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python3-pyproj_3.4.0.bb +1 -0
index 62eceb2c09..a15a05ea2b 100644
@@ -14,3 +14,4 @@ RDEPENDS:${PN} = "${PYTHON_PN}-certifi proj"
 
 export PROJ_INCDIR = "${STAGING_INCDIR}"
 export PROJ_LIBDIR = "${STAGING_LIBDIR}"
+export PROJ_DIR = "${STAGING_BINDIR_NATIVE}/.."
Signature · 1 line
2.38.1
author
#4 lore raw

PATCH 5/10 satyr: Inherit python3targetconfig

In reply to Khem Raj

It uses python3-config during build to grok the python specific includedirs, therefore its important to ensure that target specific python3-config is used, otherwise currently it defaults to native python3-config which ends up adding native python3 include paths which might work out ok but is exposed when target is 32bit + lfs enabled, the headers don't match between native and target python

---
 meta-oe/recipes-support/satyr/satyr_0.40.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/satyr/satyr_0.40.bb +1 -1
index 5b44618b72..1ce28f1f04 100644
@@ -5,7 +5,7 @@ space, Python, and Java programs"
 HOMEPAGE = "https://github.com/abrt/satyr"
 LICENSE = "GPL-2.0-only"
 
-inherit autotools-brokensep python3native pkgconfig
+inherit autotools-brokensep python3native python3targetconfig pkgconfig
 
 SRC_URI = "git://github.com/abrt/satyr.git;branch=master;protocol=https \
            file://0002-fix-compile-failure-against-musl-C-library.patch \
Signature · 1 line
2.38.1
author
#5 lore raw

PATCH 6/10 rest: Re-add 0.8.1

In reply to Khem Raj

Its needed by gfbgraph

---
 .../recipes-gnome/rest/librest_0.8.1.bb       | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/rest/librest_0.8.1.bb
meta-gnome/recipes-gnome/rest/librest_0.8.1.bb new file +35 -0
new file mode 100644
index 0000000000..23849783cc
@@ -0,0 +1,35 @@
+SUMMARY = "library to access web services that claim to be "RESTful""
+HOMEPAGE = "https://wiki.gnome.org/Projects/Librest"
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+DEPENDS = " \
+    gi-docgen \
+    gi-docgen-native \
+    glib-2.0 \
+    glib-2.0-native \
+    json-glib \
+    libsoup-2.4 \
+    libxml2-native \
+"
+
+inherit gnomebase gobject-introspection vala pkgconfig
+
+GNOMEBN = "rest"
+
+SRC_URI[archive.sha256sum] = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9"
+
+S = "${WORKDIR}/${GNOMEBN}-${PV}"
+# * gnome environment requires libsoup build with in gnome PACKAGECONFIG
+# * libsoup-gnome support was removed upstream three years ago [1]
+# [1] https://gitlab.gnome.org/GNOME/librest/commit/8f904a8e2bb38a7bf72245cdf2f1ecad17e9a720
+EXTRA_OECONF = "--without-gnome"
+
+do_configure:prepend() {
+    # rest expects introspection.m4 at custom location (see aclocal.m4).
+    cp -f ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/build
+}
+
+do_compile:prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/rest/.libs"
+}
Signature · 1 line
2.38.1
author
#6 lore raw

PATCH 7/10 gfbgraph: Use rest 0.8.1

In reply to Khem Raj

Drop the patch needed to use rest 1.0 API ( 0.9 onwards )

---
 ...-Update-rest-requirement-to-rest-1.0.patch | 58 -------------------
 .../recipes-gnome/gfbgraph/gfbgraph_0.2.5.bb  |  5 +-
 2 files changed, 3 insertions(+), 60 deletions(-)
 delete mode 100644 meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch
meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch deleted +0 -58
deleted file mode 100644
index 21c623ea5b..0000000000
@@ -1,58 +0,0 @@
-From d058e6eb6c9ebf5f4fff89ec0ac93323fc64c1ba Mon Sep 17 00:00:00 2001
-From: Tim Orling <[email protected]>
-Date: Mon, 18 Oct 2021 08:42:35 -0700
-Subject: [PATCH] Update rest requirement to rest-1.0
-
-librest 0.8.1 declares rest-1.0 and was released four years ago.
-
-https://gitlab.gnome.org/GNOME/librest/-/commit/2971b3b92701f70fc368ad64bd25cefaea043f87
-
-Upstream-Status: Submitted
-[https://gitlab.gnome.org/GNOME/libgfbgraph/-/merge_requests/6]
-
-Signed-off-by: Tim Orling <[email protected]>
-
----
- configure.ac         | 2 +-
- gfbgraph/Makefile.am | 2 +-
- libgfbgraph.pc.in    | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fd1231f..9b49f3f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -40,7 +40,7 @@ AM_CONDITIONAL([ENABLE_GTK_DOC], false)
- 
- GOBJECT_INTROSPECTION_CHECK([1.30.0])
- 
--PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-0.7 json-glib-1.0])
-+PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-1.0 json-glib-1.0])
- 
- PKG_CHECK_MODULES(SOUP, [libsoup-2.4])
- SOUP_UNSTABLE_CPPFLAGS=-DLIBSOUP_USE_UNSTABLE_REQUEST_API
-diff --git a/gfbgraph/Makefile.am b/gfbgraph/Makefile.am
-index d07b90d..b993ab7 100644
---- a/gfbgraph/Makefile.am
-+++ b/gfbgraph/Makefile.am
-@@ -60,7 +60,7 @@ GFBGraph_@API_MAJOR@_@API_MINOR@_gir_INCLUDES = \
- 	GLib-2.0 	\
- 	Gio-2.0		\
- 	GObject-2.0	\
--	Rest-0.7	\
-+	Rest-1.0	\
- 	Json-1.0	\
- 	Soup-2.4
- 
-diff --git a/libgfbgraph.pc.in b/libgfbgraph.pc.in
-index f87073e..d4f4e3a 100644
---- a/libgfbgraph.pc.in
-+++ b/libgfbgraph.pc.in
-@@ -9,6 +9,6 @@ apiversion=@API_VERSION@
- Name: libgfbgraph
- Description: GObject library for Facebook Graph API
- Version: @VERSION@
--Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-0.7
-+Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-1.0
- Libs: -L${libdir} -lgfbgraph-${apiversion}
- Cflags: -I${includedir}/gfbgraph-@API_VERSION@
meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.5.bb +3 -2
index f3b54e7d05..faeaa8ccb9 100644
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5804fe91d3294da4ac47c02b454bbc8a"
 DEPENDS = " \
     glib-2.0 \
     json-glib \
-    rest \
+    librest \
+    libsoup-2.4 \
     gnome-online-accounts \
 "
 
@@ -15,7 +16,7 @@ inherit gnomebase gtk-doc gobject-introspection pkgconfig features_check
 # for gnome-online-accounts
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRC_URI += " file://0001-Update-rest-requirement-to-rest-1.0.patch"
+#SRC_URI += " file://0001-Update-rest-requirement-to-rest-1.0.patch"
 SRC_URI[archive.sha256sum] = "9cb381b3f78ba1136df97af3f06e3b11dcc2ab339ac08f74eda0f8057d6603e3"
 
 do_install:append() {
Signature · 1 line
2.38.1
author
#7 lore raw

PATCH 8/10 audit: Inherit python3targetconfig

In reply to Khem Raj

It uses python3-config during build to grok the python specific includedirs, therefore its important to ensure that target specific python3-config is used, otherwise currently it defaults to native python3-config which ends up adding native python3 include paths which might work out ok but is exposed when target is 32bit + lfs enabled, the headers don't match between native and target python

---
 meta-oe/recipes-security/audit/audit_3.0.9.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-security/audit/audit_3.0.9.bb +1 -1
index dcab7dcc88..9621d9e335 100644
@@ -18,7 +18,7 @@ SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;proto
 S = "${WORKDIR}/git"
 SRCREV = "81fa28e0e8b4be83ddba03de8b816a3df510c17e"
 
-inherit autotools python3native update-rc.d systemd
+inherit autotools python3native python3targetconfig update-rc.d systemd
 
 UPDATERCPN = "auditd"
 INITSCRIPT_NAME = "auditd"
Signature · 1 line
2.38.1
author
#8 lore raw

PATCH 9/10 opensaf: Check for _FILE_OFFSET_BITS instead of __TIMESIZE

In reply to Khem Raj

This is fixing both LFS as well as 64bit time_t issue in one go

---
 ...0001-Use-correct-printf-format-for-__fsblkcnt_t.patch | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch +2 -7
index 0e113f533f..d44ceb0d2e 100644
@@ -15,15 +15,13 @@ Signed-off-by: Khem Raj <[email protected]>
  src/base/os_defs.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/src/base/os_defs.c b/src/base/os_defs.c
-index 83458c2..655c190 100644
 --- a/src/base/os_defs.c
 +++ b/src/base/os_defs.c
-@@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_SHM_REQ_INFO *req)
+@@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_S
  			    ((statsvfs.f_bfree - 1) * statsvfs.f_frsize)) {
  				syslog(
  				    LOG_ERR,
-+#if __TIMESIZE == 64 && __WORDSIZE == 32
++#if _FILE_OFFSET_BITS == 64 && __WORDSIZE == 32
 +				    "Insufficient shared memory (%lld) to write the data of size: %" PRId64
 +#else
  				    "Insufficient shared memory (%ld) to write the data of size: %" PRId64
@@ -31,6 +29,3 @@ index 83458c2..655c190 100644
  				    "\n",
  				    (statsvfs.f_bfree * statsvfs.f_frsize),
  				    req->info.write.i_write_size);
--- 
-2.29.2
-
Signature · 1 line
2.38.1
author
#9 lore raw

PATCH 10/10 flite: Add missing deps on alsa-lib and chrpath

In reply to Khem Raj

Disable parallel build to avoid build race
Fixes

| make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'.  Stop.
| make[1]: *** Waiting for unfinished jobs....
| make: *** [config/common_make_rules:133: build/arm-linux-gnueabi/obj//.make_build_dirs] Error 2
| ERROR: oe_runmake failed
---
 meta-multimedia/recipes-multimedia/flite/flite_2.2.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta-multimedia/recipes-multimedia/flite/flite_2.2.bb +8 -0
index 9ab9c0208d..0a7680a8c4 100644
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b3b732d1349633a53e69356607fd2d6c"
 
 inherit autotools-brokensep
 
+DEPENDS += "alsa-lib chrpath-replacement-native"
+
 SRC_URI = "git://github.com/festvox/flite.git;protocol=https;branch=master"
 
 SRCREV = "e9e2e37c329dbe98bfeb27a1828ef9a71fa84f88"
@@ -14,6 +16,12 @@ S = "${WORKDIR}/git"
 
 EXTRA_OECONF += "--enable-shared"
 
+do_configure:append() {
+    sed -i '/$(INSTALL) -m 755 $(BINDIR)\/flite_time $(DESTDIR)$(INSTALLBINDIR)/d' ${S}/main/Makefile
+}
+
 do_install:append() {
     chown -R root:root ${D}${libdir}/*
 }
+# | make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'.  Stop.
+PARALLEL_MAKE = ""
Signature · 1 line
2.38.1