iperf3: Fix missing stdint.h and do not link with -pg
PATCH 1/6 iperf3: Fix missing stdint.h and do not link with -pg
Helps compile with musl
Signed-off-by Khem Raj <[email protected]>
--- ...de-stdint.h-for-various-std-c99-int-types.patch | 39 ++++++++++++++++++++++ .../0002-Remove-pg-from-profile_CFLAGS.patch | 31 +++++++++++++++++ meta-oe/recipes-benchmark/iperf3/iperf3_git.bb | 11 +++--- 3 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch
meta-oe/recipes-benchmark/iperf3/iperf3/0001-include-stdint.h-for-various-std-c99-int-types.patch new file +39 -0
@@ -0,0 +1,39 @@ +From be653711fb92d2430b3ecc546b4e3ad927d19ec5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 12:59:42 -0700 +Subject: [PATCH 1/2] include stdint.h for various std c99 int types + +Signed-off-by: Khem Raj <[email protected]> +--- + src/cjson.h | 2 ++ + src/timer.h | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/src/cjson.h b/src/cjson.h +index fb8cd3b..69cd272 100644 +--- a/src/cjson.h ++++ b/src/cjson.h +@@ -23,6 +23,8 @@ + #ifndef cJSON__h + #define cJSON__h + ++#include <stdint.h> ++ + #ifdef __cplusplus + extern "C" + { +diff --git a/src/timer.h b/src/timer.h +index 0f9c5eb..0b195be 100644 +--- a/src/timer.h ++++ b/src/timer.h +@@ -31,6 +31,7 @@ + #define __TIMER_H + + #include <sys/time.h> ++#include <stdint.h> + + /* TimerClientData is an opaque value that tags along with a timer. The + ** client can use it for whatever, and it gets passed to the callback when +-- +2.13.3 +
meta-oe/recipes-benchmark/iperf3/iperf3/0002-Remove-pg-from-profile_CFLAGS.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 6db0e28f906bc3784019dfb5bb011237a8034fda Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 13:00:16 -0700 +Subject: [PATCH 2/2] Remove -pg from profile_CFLAGS + +musl fails to link with missing gcrt1.o + +Signed-off-by: Khem Raj <[email protected]> +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 23b0c72..6268145 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -49,9 +49,9 @@ iperf3_LDFLAGS = -g + iperf3_profile_SOURCES = main.c \ + $(libiperf_la_SOURCES) + +-iperf3_profile_CFLAGS = -pg -g ++iperf3_profile_CFLAGS = -g + iperf3_profile_LDADD = libiperf.la +-iperf3_profile_LDFLAGS = -pg -g ++iperf3_profile_LDFLAGS = -g + + # Specify the sources and various flags for the test cases + t_timer_SOURCES = t_timer.c +-- +2.13.3 +
meta-oe/recipes-benchmark/iperf3/iperf3_git.bb +7 -4
@@ -11,10 +11,11 @@ AUTHOR = "ESNET <[email protected]>, Lawrence Berkeley National Laboratory <websupport LICENSE = "BSD" LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3434c5a9a53c78c7739f0bc9e5adda" -SRC_URI = "\ - git://github.com/esnet/iperf.git \ - file://automake-foreign.patch \ -" +SRC_URI = "git://github.com/esnet/iperf.git \ + file://automake-foreign.patch \ + file://0001-include-stdint.h-for-various-std-c99-int-types.patch \ + file://0002-Remove-pg-from-profile_CFLAGS.patch \ + " PV = "3.1.3+gitr${SRCPV}" SRCREV = "099244ec686b620393e9845478a554b1c7ca5c8b"
@@ -25,4 +26,6 @@ inherit autotools PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sctp_h=no,lksctp-tools" +CFLAGS += "-D_GNU_SOURCE" + BBCLASSEXTEND = "native"
Signature · 1 line
2.13.3
PATCH 2/6 v4l-utils: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- ...tl-Define-TEMP_FAILURE_RETRY-if-undefined.patch | 55 ++++++++++++++++++++++ ...t-Link-mc_nextgen_test-with-libargp-if-ne.patch | 28 +++++++++++ .../0003-v4l2-ctl-Do-not-use-getsubopt.patch | 49 +++++++++++++++++++ .../v4l2apps/v4l-utils_1.12.3.bb | 5 +- 4 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch new file +55 -0
@@ -0,0 +1,55 @@ +From e60aea50e41ae8a17672beb5859beecb66e7a305 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 13:11:25 -0700 +Subject: [PATCH 1/3] ir-ctl: Define TEMP_FAILURE_RETRY if undefined + +use strndup() instead of strndupa() which is not +universally available in C libraries + +Taken from AlpineLinux + +Signed-off-by: Khem Raj <[email protected]> +--- + utils/ir-ctl/ir-ctl.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c +index bc58cee..1a44011 100644 +--- a/utils/ir-ctl/ir-ctl.c ++++ b/utils/ir-ctl/ir-ctl.c +@@ -42,6 +42,16 @@ + # define _(string) string + #endif + ++/* taken from glibc unistd.h */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + # define N_(string) string + + +@@ -344,12 +354,14 @@ static struct file *read_scancode(const char *name) + return NULL; + } + +- pstr = strndupa(name, p - name); ++ pstr = strndup(name, p - name); + + if (!protocol_match(pstr, &proto)) { + fprintf(stderr, _("error: protocol '%s' not found\n"), pstr); ++ free(pstr); + return NULL; + } ++ free(pstr); + + if (!strtoscancode(p + 1, &scancode)) { + fprintf(stderr, _("error: invalid scancode '%s'\n"), p + 1); +-- +2.13.3 +
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch new file +28 -0
@@ -0,0 +1,28 @@ +From b3acc4c6407f9553f32582a9aee6a11b5fcd1d8a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 13:17:19 -0700 +Subject: [PATCH 2/3] contrib/test: Link mc_nextgen_test with libargp if needed + +musl depends on external argp implementation e.g. + +Signed-off-by: Khem Raj <[email protected]> +--- + contrib/test/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am +index 4641e21..e47b948 100644 +--- a/contrib/test/Makefile.am ++++ b/contrib/test/Makefile.am +@@ -32,7 +32,7 @@ v4l2gl_LDFLAGS = $(X11_LIBS) $(GL_LIBS) $(GLU_LIBS) $(ARGP_LIBS) + v4l2gl_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la + + mc_nextgen_test_CFLAGS = $(LIBUDEV_CFLAGS) +-mc_nextgen_test_LDFLAGS = $(LIBUDEV_LIBS) ++mc_nextgen_test_LDFLAGS = $(ARGP_LIBS) $(LIBUDEV_LIBS) + + + ioctl_test_SOURCES = ioctl-test.c ioctl-test.h ioctl_32.h ioctl_64.h +-- +2.13.3 +
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0003-v4l2-ctl-Do-not-use-getsubopt.patch new file +49 -0
49 lines not on this page · raw message
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.12.3.bb +4 -1
@@ -18,7 +18,10 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ file://0001-buildsystem-do-not-assume-building-in-source-tree.patch \ file://mediactl-pkgconfig.patch \ file://export-mediactl-headers.patch \ - " + file://0001-ir-ctl-Define-TEMP_FAILURE_RETRY-if-undefined.patch \ + file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ + file://0003-v4l2-ctl-Do-not-use-getsubopt.patch \ + " SRC_URI[md5sum] = "89e1ed6c69c94e0489dc0a638c7841aa" SRC_URI[sha256sum] = "5a47dd6f0e7dfe902d94605c01d385a4a4e87583ff5856d6f181900ea81cf46e"
Signature · 1 line
2.13.3
PATCH v2 3/6 nmon: Upgrade to 16g
In reply to Khem RajFix build with musl while here.
link with libm for ceilf API
Signed-off-by Khem Raj <[email protected]>
---
.../0001-lmon16g.c-Adjust-system-headers.patch | 46 ++++++++++++++++++++++
.../nmon/{nmon_13g.bb => nmon_16g.bb} | 16 ++++----
2 files changed, 55 insertions(+), 7 deletions(-)
create mode 100644 meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch
rename meta-oe/recipes-support/nmon/{nmon_13g.bb => nmon_16g.bb} (59%)meta-oe/recipes-support/nmon/nmon/0001-lmon16g.c-Adjust-system-headers.patch new file +46 -0
@@ -0,0 +1,46 @@ +From d977b5170027926eb97ab9742ddc51d2a5555a34 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 10:06:49 -0700 +Subject: [PATCH] lmon16g.c: Adjust system headers + +fstab.h is unused +errno.h is in /usr/include +defines from sys/cdefs.h is used + +Signed-off-by: Khem Raj <[email protected]> +--- + lmon16g.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lmon16g.c b/lmon16g.c +index cb27e09..d2a11c5 100644 +--- a/lmon16g.c ++++ b/lmon16g.c +@@ -63,7 +63,7 @@ static char *SccsId = "nmon " VERSION; + #include <fcntl.h> + #include <math.h> + #include <time.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> +@@ -71,6 +71,7 @@ static char *SccsId = "nmon " VERSION; + #include <sys/time.h> + #include <sys/socket.h> + #include <sys/wait.h> ++#include <sys/cdefs.h> + + /* Windows moved here so they can be cleared when the screen mode changes */ + WINDOW *padwelcome = NULL; +@@ -576,7 +577,6 @@ struct procsinfo { + int isroot = 0; + + #include <mntent.h> +-#include <fstab.h> + #include <sys/stat.h> + #include <sys/statfs.h> + #include <net/if.h> +-- +2.13.3 +
meta-oe/recipes-support/nmon/nmon_16g.bb renamed from meta-oe/recipes-support/nmon/nmon_13g.bb +9 -7
@@ -4,23 +4,25 @@ SECTION = "console/utils" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://${WORKDIR}/Documentation.txt;md5=dbb13658cf55d687c4f2ff771a696d4a" DEPENDS = "ncurses" -PR = "r2" +DEPENDS_append_libc-musl = " bsd-headers" -SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon13g.c;name=lmon \ +SRC_URI = "${SOURCEFORGE_MIRROR}/nmon/lmon${PV}.c;name=lmon \ ${SOURCEFORGE_MIRROR}/nmon/Documentation.txt;name=doc \ + file://0001-lmon16g.c-Adjust-system-headers.patch \ " - -SRC_URI[lmon.md5sum] = "b1b8e6c0123ad232394991f2d4f40494" -SRC_URI[lmon.sha256sum] = "456ab2a342b31d1a352d0d940af5962fa65a12ae8757ff73e6e73210832ae8b5" +SRC_URI[lmon.md5sum] = "246ccfc74d5af55d992601fc4d3d4a72" +SRC_URI[lmon.sha256sum] = "da82dd693b503b062854dfe7dbb5d36b347872ab44a4aa05b97e9d577747f688" SRC_URI[doc.md5sum] = "dbb13658cf55d687c4f2ff771a696d4a" SRC_URI[doc.sha256sum] = "1f7f83afe62a7210be5e83cd24157adb854c14599efe0b377a7ecca933869278" CFLAGS += "-D JFS -D GETUSER -Wall -D LARGEMEM" -LDFLAGS += "-ltinfo -lncursesw" +LDFLAGS += "-ltinfo -lncursesw -lm" ASNEEDED_pn-nmon = "" +S = "${WORKDIR}" + do_compile() { - ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/lmon13g.c -o nmon + ${CC} ${CFLAGS} ${LDFLAGS} lmon${PV}.c -o nmon } do_install() {
Signature · 1 line
2.13.3
PATCH v2 4/6 metacity: Fix build with musl by defining _GNU_SOURCE
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- .../metacity/0001-ui-Define-_GNU_SOURCE.patch | 27 ++++++++++++++++++++++ .../recipes-gnome/metacity/metacity_2.34.13.bb | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-gnome/recipes-gnome/metacity/metacity/0001-ui-Define-_GNU_SOURCE.patch
meta-gnome/recipes-gnome/metacity/metacity/0001-ui-Define-_GNU_SOURCE.patch new file +27 -0
@@ -0,0 +1,27 @@ +From e7fd072f0df968f342878b77098e97ff07ed28d7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 10:26:31 -0700 +Subject: [PATCH] ui: Define _GNU_SOURCE + +it becomes portable across musl and glibc + +Signed-off-by: Khem Raj <[email protected]> +--- + src/ui/theme.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ui/theme.c b/src/ui/theme.c +index 84b57a0..c7eafc8 100644 +--- a/src/ui/theme.c ++++ b/src/ui/theme.c +@@ -60,6 +60,7 @@ + #include <gtk/gtk.h> + #include <string.h> + #include <stdlib.h> ++#define _GNU_SOURCE + #define __USE_XOPEN + #include <math.h> + +-- +2.13.3 +
meta-gnome/recipes-gnome/metacity/metacity_2.34.13.bb +4 -1
@@ -13,7 +13,10 @@ REQUIRED_DISTRO_FEATURES = "x11" GNOME_COMPRESS_TYPE = "xz" -SRC_URI += "file://remove-yelp-help-rules-var.patch" +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ + file://remove-yelp-help-rules-var.patch \ + file://0001-ui-Define-_GNU_SOURCE.patch \ + " SRC_URI[archive.md5sum] = "6d89b71672d4fa49fc87f83d610d0ef6" SRC_URI[archive.sha256sum] = "8cf4dbf0da0a6f36357ce7db7f829ec685908a7792453c662fb8184572b91075"
Signature · 1 line
2.13.3
PATCH v2 5/6 monkey: Link in libexecinfo on musl
In reply to Khem RajNeeded for backtrace() APIs
Signed-off-by Khem Raj <[email protected]>
--- ...-configure-Respect-LIBS-variable-from-env.patch | 29 ++++++++++++++++++++++ .../recipes-httpd/monkey/monkey_1.5.6.bb | 9 +++++++ 2 files changed, 38 insertions(+) create mode 100644 meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch
meta-webserver/recipes-httpd/monkey/files/0001-configure-Respect-LIBS-variable-from-env.patch new file +29 -0
@@ -0,0 +1,29 @@ +From b0526a9b5325bd4758dad8d14efd85c98ef2ebff Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 18:25:23 -0700 +Subject: [PATCH] configure: Respect LIBS variable from env + +For musl we need to pass -lexecinfo from env +this change accomodates that + +Signed-off-by: Khem Raj <[email protected]> +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 4286c34..f1c65db 100755 +--- a/configure ++++ b/configure +@@ -620,7 +620,7 @@ LIBDEFS = -DSHAREDLIB -fPIC \$(DEFS) + INCDIR = ./include + LDFLAGS = $LDFLAGS + DESTDIR = ../bin/monkey +-LIBS = -ldl $libs ++LIBS = -ldl $libs ${LIBS} + OBJ = monkey.o mk_method.o mk_mimetype.o mk_vhost.o mk_request.o \\ + mk_header.o mk_config.o mk_signals.o \\ + mk_user.o mk_utils.o mk_epoll.o mk_scheduler.o \\ +-- +2.13.3 +
meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb +9 -0
@@ -7,7 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" SECTION = "net" +DEPENDS_append_libc-musl = " libexecinfo" + SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \ + file://0001-configure-Respect-LIBS-variable-from-env.patch \ file://monkey.service \ file://monkey.init"
@@ -24,7 +27,13 @@ EXTRA_OECONF = "--plugdir=${libdir}/monkey/ \ --disable-plugins=mbedtls \ --debug \ --malloc-libc" + +do_configure_prepend_libc-musl() { + export LIBS="-lexecinfo" +} + DISABLE_STATIC = "" +CLEANBROKEN = "1" inherit autotools-brokensep pkgconfig update-rc.d systemd
Signature · 1 line
2.13.3
PATCH 6/6 pimd: Upgrade to 2.3.2
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...ure-Dont-use-uname-to-determine-target-OS.patch | 28 ++++++++++++++++++++++ meta-networking/recipes-support/pimd/pimd_2.1.8.bb | 19 --------------- meta-networking/recipes-support/pimd/pimd_2.3.2.bb | 20 ++++++++++++++++ 3 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch delete mode 100644 meta-networking/recipes-support/pimd/pimd_2.1.8.bb create mode 100644 meta-networking/recipes-support/pimd/pimd_2.3.2.bb
meta-networking/recipes-support/pimd/pimd/0001-configure-Dont-use-uname-to-determine-target-OS.patch new file +28 -0
@@ -0,0 +1,28 @@ +From f3e04281bad361249a8dad0cde150a801d720f67 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 14 Jul 2017 18:46:52 -0700 +Subject: [PATCH] configure: Dont use uname to determine target OS + +Helps with cross-compiling + +Signed-off-by: Khem Raj <[email protected]> +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 6c35a72..f9714e2 100755 +--- a/configure ++++ b/configure +@@ -31,7 +31,7 @@ + #DEFS += -DSCOPED_ACL + # + +-OS=`uname` ++OS="Linux" + CFG=config.mk + TMP=`mktemp /tmp/XXXXXX` + BUGREPORT_URL="https://github.com/troglobit/pimd/issues" +-- +2.13.3 +
meta-networking/recipes-support/pimd/pimd_2.1.8.bb deleted +0 -19
@@ -1,19 +0,0 @@ -SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon." -HOMEPAGE = "http://troglobit.com/pimd.html" -SECTION = "net" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790" - -SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.bz2" -SRC_URI[md5sum] = "a12448bc7c9bfcebf51a13ebf1ffa962" -SRC_URI[sha256sum] = "01016940543a0a6131d4e6c91b595d47e187012c59a298eec14c3dbc38564b3a" - -EXTRA_OEMAKE = "-e MAKEFLAGS=" -CFLAGS += "-I ${S}/include " - -do_install() { - unset datadir - unset mandir - oe_runmake 'DESTDIR=${D}' install -} -
meta-networking/recipes-support/pimd/pimd_2.3.2.bb new file +20 -0
@@ -0,0 +1,20 @@ +SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon." +HOMEPAGE = "http://troglobit.com/pimd.html" +SECTION = "net" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790" + +SRC_URI = "ftp://ftp.troglobit.com/pimd/${BP}.tar.gz \ + file://0001-configure-Dont-use-uname-to-determine-target-OS.patch \ + " +SRC_URI[md5sum] = "a3c03e40540980b2c06e265a17988e60" +SRC_URI[sha256sum] = "c77a9812751f114490a28a6839b16aac8b020c8d9fd6aa22bf3880c054e19f1d" + +EXTRA_OECONF_append_libc-musl = " --embedded-libc" + +inherit autotools-brokensep + +do_configure() { + oe_runconf +} +
Signature · 1 line
2.13.3