wxwidgets: Fix build with musl
PATCH v2 1/6 wxwidgets: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- ...using-glibc-specific-defines-on-musl.patch | 26 +++++++++++++++++++ .../wxwidgets/wxwidgets_3.2.1.bb | 16 ++++++------ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-locale-Avoid-using-glibc-specific-defines-on-musl.patch
meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-locale-Avoid-using-glibc-specific-defines-on-musl.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 72c3b7324f00047e6dc5d8380ed2f6ff2494a6f9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 18 Dec 2022 14:51:34 -0800 +Subject: [PATCH] locale: Avoid using glibc specific defines on musl + +musl does not provide some glibc-only enum members e.g. _NL_ADDRESS_LANG_NAME + +Upstream-Status: Submitted [https://github.com/wxWidgets/wxWidgets/pull/23050] +Signed-off-by: Khem Raj <[email protected]> +--- + src/unix/uilocale.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/unix/uilocale.cpp b/src/unix/uilocale.cpp +index 57773e17f5..86816ba896 100644 +--- a/src/unix/uilocale.cpp ++++ b/src/unix/uilocale.cpp +@@ -619,7 +619,7 @@ wxString + wxUILocaleImplUnix::GetLocalizedName(wxLocaleName name, wxLocaleForm form) const + { + wxString str; +-#if defined(HAVE_LANGINFO_H) && defined(__LINUX__) ++#if defined(HAVE_LANGINFO_H) && defined(__LINUX__) && defined(__GLIBC__) + switch (name) + { + case wxLOCALE_NAME_LOCALE:
meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.1.bb +8 -8
@@ -18,14 +18,14 @@ DEPENDS += " \ tiff \ " -SRC_URI = " \ - gitsm://github.com/wxWidgets/wxWidgets.git;branch=3.2;protocol=https \ - file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \ - file://fix-libdir-for-multilib.patch \ - file://create-links-with-relative-path.patch \ - file://not-append-system-name-to-lib-name.patch \ - file://wx-config-fix-libdir-for-multilib.patch \ -" +SRC_URI = "gitsm://github.com/wxWidgets/wxWidgets.git;branch=3.2;protocol=https \ + file://0001-wx-config.in-Disable-cross-magic-it-does-not-work-fo.patch \ + file://fix-libdir-for-multilib.patch \ + file://create-links-with-relative-path.patch \ + file://not-append-system-name-to-lib-name.patch \ + file://wx-config-fix-libdir-for-multilib.patch \ + file://0001-locale-Avoid-using-glibc-specific-defines-on-musl.patch \ + " SRCREV= "97e99707c5d2271a70cb686720b48dbf34ced496" S = "${WORKDIR}/git"
Signature · 1 line
2.39.0
PATCH v2 2/6 wxwidgets: Fix locale on musl
Signed-off-by Khem Raj <[email protected]>
--- .../wxwidgets/wxwidgets/musl-locale-l.patch | 32 +++++++++++++++++++ .../wxwidgets/wxwidgets_3.2.1.bb | 4 +-- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-extended/wxwidgets/wxwidgets/musl-locale-l.patch
meta-oe/recipes-extended/wxwidgets/wxwidgets/musl-locale-l.patch new file +32 -0
@@ -0,0 +1,32 @@ +these macro'd away functions don't exist in musl (yet) +diff --git a/include/wx/xlocale.h b/include/wx/xlocale.h +index c433d25..3ab9d84 100644 +--- a/include/wx/xlocale.h ++++ b/include/wx/xlocale.h +@@ -33,6 +33,26 @@ + #include "wx/crt.h" // Includes wx/chartype.h, wx/wxcrt.h(wx/string.h) + #include "wx/intl.h" // wxLanguage + ++#ifndef strtol_l ++#define strtol_l(s, p, base, l) strtol(s, p, base) ++#endif ++ ++#ifndef strtoul_l ++#define strtoul_l(s, p, base, l) strtoul(s, p, base) ++#endif ++ ++#ifndef wcstod_l ++#define wcstod_l(s, p, l) wcstod(s, p) ++#endif ++ ++#ifndef wcstol_l ++#define wcstol_l(s, p, base, l) wcstol(s, p, base) ++#endif ++ ++#ifndef wcstoul_l ++#define wcstoul_l(s, p, base, l) wcstoul(s, p, base) ++#endif ++ + // The platform-specific locale type + // If wxXLocale_t is not defined, then only "C" locale support is provided + #ifdef wxHAS_XLOCALE_SUPPORT
meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.1.bb +1 -3
@@ -25,6 +25,7 @@ SRC_URI = "gitsm://github.com/wxWidgets/wxWidgets.git;branch=3.2;protocol=https file://not-append-system-name-to-lib-name.patch \ file://wx-config-fix-libdir-for-multilib.patch \ file://0001-locale-Avoid-using-glibc-specific-defines-on-musl.patch \ + file://musl-locale-l.patch \ " SRCREV= "97e99707c5d2271a70cb686720b48dbf34ced496" S = "${WORKDIR}/git"
@@ -39,9 +40,6 @@ EXTRA_OECMAKE += " \ -DwxUSE_LIBTIFF=sys \ -DwxUSE_REGEX=builtin \ " -EXTRA_OECMAKE:append:libc-musl = " \ - -DHAVE_LOCALE_T=OFF \ -" EXTRA_OECMAKE:append:class-target = ' -DEGREP="/bin/grep -E"' # OpenGL support currently seems tied to using libglu, which requires x11
Signature · 1 line
2.39.0
PATCH v2 3/6 wxwidgets: Set HAVE_LARGEFILE_SUPPORT
In reply to Khem Rajcmake somehow fails to set it.
Signed-off-by Khem Raj <[email protected]>
--- ...VE_LARGEFILE_SUPPORT-to-1-explicitly.patch | 30 +++++++++++++++++++ .../wxwidgets/wxwidgets_3.2.1.bb | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-Set-HAVE_LARGEFILE_SUPPORT-to-1-explicitly.patch
meta-oe/recipes-extended/wxwidgets/wxwidgets/0001-Set-HAVE_LARGEFILE_SUPPORT-to-1-explicitly.patch new file +30 -0
@@ -0,0 +1,30 @@ +From e108aff9d6dae613f486c1b1681f4a3cdf17b845 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 19 Dec 2022 15:07:55 -0800 +Subject: [PATCH] Set HAVE_LARGEFILE_SUPPORT to 1 explicitly + +nothing sets this to 0, but for some reason it gets undef'd + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + build/cmake/setup.h.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in +index bce33a73f3..22afb4cfa0 100644 +--- a/build/cmake/setup.h.in ++++ b/build/cmake/setup.h.in +@@ -869,8 +869,7 @@ + /* + * Define if large (64 bit file offsets) files are supported. + */ +-#cmakedefine HAVE_LARGEFILE_SUPPORT 1 +- ++#define HAVE_LARGEFILE_SUPPORT 1 + /* + * Use OpenGL + */ +-- +2.39.0 +
meta-oe/recipes-extended/wxwidgets/wxwidgets_3.2.1.bb +4 -0
@@ -26,6 +26,7 @@ SRC_URI = "gitsm://github.com/wxWidgets/wxWidgets.git;branch=3.2;protocol=https file://wx-config-fix-libdir-for-multilib.patch \ file://0001-locale-Avoid-using-glibc-specific-defines-on-musl.patch \ file://musl-locale-l.patch \ + file://0001-Set-HAVE_LARGEFILE_SUPPORT-to-1-explicitly.patch \ " SRCREV= "97e99707c5d2271a70cb686720b48dbf34ced496" S = "${WORKDIR}/git"
@@ -76,6 +77,9 @@ PACKAGECONFIG[sdl_audio] = "-DwxUSE_LIBSDL=ON,-DwxUSE_LIBSDL=OFF,libsdl2" PACKAGECONFIG[webkit] = "-DwxUSE_WEBVIEW_WEBKIT=ON,-DwxUSE_WEBVIEW_WEBKIT=OFF,webkitgtk,,,no_gui" PACKAGECONFIG[curl] = "-DwxUSE_WEBREQUEST_CURL=ON,-DwxUSE_WEBREQUEST_CURL=OFF,curl" +# Support LFS unconditionally +CXXFLAGS += "-D_FILE_OFFSET_BITS=64" + do_compile:append() { # if not at re-compile if [ -L ${B}/wx-config ]; then
Signature · 1 line
2.39.0
PATCH v2 4/6 python3-wxgtk4: Do not use GetAssertStackTrace with USE_STACKWALKER disabled
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...y-use-GetAssertStackTrace-under-USE_.patch | 32 +++++++++++++++++++ .../python3-wxgtk4/python3-wxgtk4_4.2.0.bb | 9 +++--- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch
meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4/0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch new file +32 -0
@@ -0,0 +1,32 @@ +From b9f95c06b2e7a525f4f93d705976882e8dcba6ab Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 20 Dec 2022 09:46:31 -0800 +Subject: [PATCH] sip: Conditionally use GetAssertStackTrace under + USE_STACKWALKER + +Musl eg. does not implement stack walker ( backtrace ) therefore it gets +disabled for wxwidgets on those systems. This needs to be checked before using +GetAssertStackTrace() + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + sip/cpp/sip_corewxAppTraits.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sip/cpp/sip_corewxAppTraits.cpp b/sip/cpp/sip_corewxAppTraits.cpp +index 9c9f9d5b..1d2d2f90 100644 +--- a/sip/cpp/sip_corewxAppTraits.cpp ++++ b/sip/cpp/sip_corewxAppTraits.cpp +@@ -471,7 +471,11 @@ static PyObject *meth_wxAppTraits_GetAssertStackTrace(PyObject *sipSelf, PyObjec + PyErr_Clear(); + + Py_BEGIN_ALLOW_THREADS ++#if wxUSE_STACKWALKER + sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxAppTraits::GetAssertStackTrace() : sipCpp->GetAssertStackTrace())); ++#else ++ sipRes = new ::wxString(""); ++#endif + Py_END_ALLOW_THREADS + + if (PyErr_Occurred())
meta-python/recipes-devtools/python3-wxgtk4/python3-wxgtk4_4.2.0.bb +5 -4
@@ -11,10 +11,11 @@ DEPENDS = "python3-attrdict3-native python3-six-native wxwidgets-native \ PYPI_PACKAGE = "wxPython" SRC_URI += "file://add-back-option-build-base.patch \ - file://wxgtk-fixup-build-scripts.patch \ - file://not-overwrite-cflags-cxxflags.patch \ - file://0001-pypubsub-Replace-deprecated-inspect.getargspec.patch \ - " + file://wxgtk-fixup-build-scripts.patch \ + file://not-overwrite-cflags-cxxflags.patch \ + file://0001-pypubsub-Replace-deprecated-inspect.getargspec.patch \ + file://0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch \ + " SRC_URI[sha256sum] = "663cebc4509d7e5d113518865fe274f77f95434c5d57bc386ed58d65ceed86c7" S = "${WORKDIR}/wxPython-${PV}"
Signature · 1 line
2.39.0
PATCH v2 5/6 f2fs-tools: Upgrade to 1.15.0
In reply to Khem RajAdd patches to build builds when S != B and largefile support
Signed-off-by Khem Raj <[email protected]>
---
.../0001-f2fs_io-Fix-out-of-tree-builds.patch | 27 +++
...-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch | 183 ++++++++++++++++++
...s-tools_1.14.0.bb => f2fs-tools_1.15.0.bb} | 4 +-
3 files changed, 213 insertions(+), 1 deletion(-)
create mode 100644 meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch
create mode 100644 meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch
rename meta-filesystems/recipes-utils/f2fs-tools/{f2fs-tools_1.14.0.bb => f2fs-tools_1.15.0.bb} (74%)meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0001-f2fs_io-Fix-out-of-tree-builds.patch new file +27 -0
@@ -0,0 +1,27 @@ +From f110e34d7a4929cdea647b98fa177cf1bccf8b1e Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 21 Dec 2022 18:21:42 -0800 +Subject: [PATCH] f2fs_io: Fix out of tree builds + +Relative path does not work when searching for include files +when srcdir != builddir + +Upstream-Status: Submitted [https://lore.kernel.org/linux-f2fs-devel/[email protected]/T/#t] +Signed-off-by: Khem Raj <[email protected]> +--- + tools/f2fs_io/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/f2fs_io/Makefile.am b/tools/f2fs_io/Makefile.am +index 6c17db1..bc4f9d0 100644 +--- a/tools/f2fs_io/Makefile.am ++++ b/tools/f2fs_io/Makefile.am +@@ -1,7 +1,7 @@ + ## Makefile.am + + if LINUX +-AM_CPPFLAGS = -I../../include ++AM_CPPFLAGS = -I$(top_srcdir)/include + AM_CFLAGS = -Wall + sbin_PROGRAMS = f2fs_io + f2fs_io_SOURCES = f2fs_io.c
meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools/0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch new file +183 -0
183 lines not on this page · raw message
meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.15.0.bb renamed from meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.14.0.bb +3 -1
@@ -7,8 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=362b4b2594cd362b874a97718faa51d3" # to provide libuuid DEPENDS = "util-linux" -SRCREV = "d41dcbdf46dc3841cd0a0507e6573e38cb6c55bb" +SRCREV = "64f2596142800c215cb40a658ebd5793ed37c936" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git;branch=master \ + file://0001-f2fs_io-Fix-out-of-tree-builds.patch \ + file://0002-f2fs_io-Define-_FILE_OFFSET_BITS-64.patch \ " UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.39.0
PATCH v2 6/6 trace-cmd: Pass ldflags to compiler
In reply to Khem RajFixes
File /usr/lib/traceevent/libtraceevent.so in package trace-cmd doesn't have GNU_HASH (didn't pass LDFLAGS?)
Signed-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb +2 -0
@@ -16,6 +16,8 @@ DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native" inherit pkgconfig +TARGET_CC_ARCH += "${LDFLAGS}" + do_compile() { oe_runmake libdir_relative=${BASELIB} all libs }
Signature · 1 line
2.39.0