Skip to contentSkip to conversation

lksctp-tools: add recipe (version 1.0.16)

PATCH Superseded Mihaela Sendrea 3 participants 4 messages May 2, 2014

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 lksctp-tools: add recipe (version 1.0.16)

This recipe comes from arago-oe-dev:
https://github.com/mrchapp/arago-oe-dev/tree/master/recipes/lksctp-tools

---
 .../lksctp-tools/files/lib_order.patch             |   75 ++++++++++++++++++++
 .../recipes-support/lksctp-tools/lksctp-tools.inc  |   59 +++++++++++++++
 .../lksctp-tools/lksctp-tools_1.0.16.bb            |   10 +++
 3 files changed, 144 insertions(+)
 create mode 100644 meta-networking/recipes-support/lksctp-tools/files/lib_order.patch
 create mode 100644 meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc
 create mode 100644 meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb
meta-networking/recipes-support/lksctp-tools/files/lib_order.patch new file +75 -0
new file mode 100644
index 0000000..eb07d75
@@ -0,0 +1,75 @@
+From 93fd7448317419594472045663ff13034c31efa9 Mon Sep 17 00:00:00 2001
+From: Vlad Yasevich <[email protected]>
+Date: Wed, 14 Jan 2009 14:30:20 -0500
+Subject: [PATCH] [lib] Fix building of static libraries
+
+When running "./configure --disable-shared --enable-
+static" the build fails with the following error:
+
+gcc -g -Wall -Wstrict-prototypes -Wimplicit-function-
+declaration -g -O2 -o nagle_snd
+nagle_snd.o ../../src/lib/.libs/libsctp.a ../../src/t
+estlib/.libs/libsctputil.a
+../../src/testlib/.libs/libsctputil.a(sctputil.o): In
+function `test_peer_addr':
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:376: undefined reference
+to `sctp_getpaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:382: undefined reference
+to `sctp_freepaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:416: undefined reference
+to `sctp_freepaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:400: undefined reference
+to `sctp_freepaddrs'
+collect2: ld returned 1 exit status
+make[3]: *** [nagle_snd] Error 1
+
+Changing the order of libsctp.a and libsctputil.a
+fixes this. The attached patch updates
+src/apps/Makefile.am and src/func_tests/Makefile.am
+to do that.
+
+Patch submitted by Fredrik Roubert <[email protected]>.
+
+Signed-off-by: Vlad Yasevich <[email protected]>
+---
+ src/apps/Makefile.am       |    4 ++--
+ src/func_tests/Makefile.am |    4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
+index 515ef96..960cd5e 100644
+--- a/src/apps/Makefile.am
++++ b/src/apps/Makefile.am
+@@ -8,8 +8,8 @@ include $(top_srcdir)/Makefile.dirs
+ INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib 
+ AM_CFLAGS = -g -Wall -Wstrict-prototypes -Wimplicit-function-declaration
+ AM_LDFLAGS = 
+-LDADD = $(top_builddir)/src/lib/libsctp.la \
+-	$(top_builddir)/src/testlib/libsctputil.la
++LDADD = $(top_builddir)/src/testlib/libsctputil.la \
++	$(top_builddir)/src/lib/libsctp.la
+ 
+ # programs to be installed with the distriubution
+ bin_PROGRAMS = sctp_darn sctp_test
+diff --git a/src/func_tests/Makefile.am b/src/func_tests/Makefile.am
+index b985685..44f0e94 100644
+--- a/src/func_tests/Makefile.am
++++ b/src/func_tests/Makefile.am
+@@ -8,8 +8,8 @@ include $(top_srcdir)/Makefile.dirs
+ INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib 
+ AM_CFLAGS = -g -Wall -Wstrict-prototypes -Wimplicit-function-declaration
+ AM_LDFLAGS = -lpthread
+-LDADD = $(top_builddir)/src/lib/libsctp.la \
+-	$(top_builddir)/src/testlib/libsctputil.la
++LDADD = $(top_builddir)/src/testlib/libsctputil.la \
++	$(top_builddir)/src/lib/libsctp.la
+ 
+ V6FLAGS = -DCONFIG_IPV6=1 -DTEST_V6=1 ${DEFS} ${INCLUDES} ${CFLAGS}
+ 
+-- 
+1.7.1
+
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +59 -0

59 lines not on this page · raw message

meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file +10 -0
new file mode 100644
index 0000000..964f08c
@@ -0,0 +1,10 @@
+SOLIBVERSION="1.0.16"
+SOLIBMAJORVERSION="1"
+require lksctp-tools.inc
+PR = "${INC_PR}.0"
+
+FILESEXTRAPATHS = "${THISDIR}/files"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lksctp/lksctp-tools-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "708bb0b5a6806ad6e8d13c55b067518e"
+SRC_URI[sha256sum] = "0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 2/2 netperf: enable SCTP support

---
 meta-networking/recipes-support/netperf/netperf_2.6.0.bb |    3 +++
 1 file changed, 3 insertions(+)
meta-networking/recipes-support/netperf/netperf_2.6.0.bb +3 -0
index 45760ad..64e3be0 100644
@@ -27,6 +27,9 @@ CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
 CFLAGS_append = "${@base_contains('DISTRO_FEATURES', 'largefile', \
     ' -D_FILE_OFFSET_BITS=64', '', d)}"
 
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'sctp', 'sctp', '', d)}"
+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,kernel-module-sctp"
+
 # autotools.bbclass attends to include m4 files with path depth <= 2 by
 # "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
 do_configure_prepend() {
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [meta-networking][PATCH v3 2/2] netperf: enable SCTP support

Hi Mihaela,

Quoted 15 lines · On Friday 02 May 2014 15:36:41 Mihaela Sendrea wrote:
---
 meta-networking/recipes-support/netperf/netperf_2.6.0.bb |    3 +++
 1 file changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta-networking/recipes-support/netperf/netperf_2.6.0.bb index 45760ad..64e3be0 100644

meta-networking/recipes-support/netperf/netperf_2.6.0.bb +1 -0
@@ -27,6 +27,9 @@ CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
 CFLAGS_append = "${@base_contains('DISTRO_FEATURES', 'largefile', \
     ' -D_FILE_OFFSET_BITS=64', '', d)}"
 
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'sctp', 'sctp', '',
Quoted 1 line

d)}"

Do you anticipate a number of other recipes enabling and disabling SCTP support? Typically we only add DISTRO_FEATURES where that's the case, rather than just for individual recipes (that's why PACKAGECONFIG was created.)

Quoted 2 lines

+PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,kernel-module-sctp"

Sorry to be a pain, I should have noticed this earlier - but the result of this will be that the recipe breaks if sctp is enabled but sctp functionality is compiled into the kernel rather than being a module. Since PACKAGECONFIG doesn't directly support adding RRECOMMENDS I'm afraid you'll need to set it separately based on whether sctp is in PACKAGECONFIG.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
In reply to Mihaela Sendrea
Quoted 100 lines · Mihaela Sendrea

This recipe comes from arago-oe-dev:
https://github.com/mrchapp/arago-oe-dev/tree/master/recipes/lksctp-tools

---
 .../lksctp-tools/files/lib_order.patch             |   75 ++++++++++++++++++++
 .../recipes-support/lksctp-tools/lksctp-tools.inc  |   59 +++++++++++++++
 .../lksctp-tools/lksctp-tools_1.0.16.bb            |   10 +++
 3 files changed, 144 insertions(+)
 create mode 100644 meta-networking/recipes-support/lksctp-tools/files/lib_order.patch
 create mode 100644 meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc
 create mode 100644 meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb
meta-networking/recipes-support/lksctp-tools/files/lib_order.patch new file +75 -0
new file mode 100644
index 0000000..eb07d75
@@ -0,0 +1,75 @@
+From 93fd7448317419594472045663ff13034c31efa9 Mon Sep 17 00:00:00 2001
+From: Vlad Yasevich <[email protected]>
+Date: Wed, 14 Jan 2009 14:30:20 -0500
+Subject: [PATCH] [lib] Fix building of static libraries
+
+When running "./configure --disable-shared --enable-
+static" the build fails with the following error:
+
+gcc -g -Wall -Wstrict-prototypes -Wimplicit-function-
+declaration -g -O2 -o nagle_snd
+nagle_snd.o ../../src/lib/.libs/libsctp.a ../../src/t
+estlib/.libs/libsctputil.a
+../../src/testlib/.libs/libsctputil.a(sctputil.o): In
+function `test_peer_addr':
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:376: undefined reference
+to `sctp_getpaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:382: undefined reference
+to `sctp_freepaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:416: undefined reference
+to `sctp_freepaddrs'
+/home/roubert/src/lksctp/lksctp-tools-
+1.0.6/src/testlib/sctputil.c:400: undefined reference
+to `sctp_freepaddrs'
+collect2: ld returned 1 exit status
+make[3]: *** [nagle_snd] Error 1
+
+Changing the order of libsctp.a and libsctputil.a
+fixes this. The attached patch updates
+src/apps/Makefile.am and src/func_tests/Makefile.am
+to do that.
+
+Patch submitted by Fredrik Roubert <[email protected]>.
+
+Signed-off-by: Vlad Yasevich <[email protected]>
+---
+ src/apps/Makefile.am       |    4 ++--
+ src/func_tests/Makefile.am |    4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
+index 515ef96..960cd5e 100644
+--- a/src/apps/Makefile.am
++++ b/src/apps/Makefile.am
+@@ -8,8 +8,8 @@ include $(top_srcdir)/Makefile.dirs
+ INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib 
+ AM_CFLAGS = -g -Wall -Wstrict-prototypes -Wimplicit-function-declaration
+ AM_LDFLAGS = 
+-LDADD = $(top_builddir)/src/lib/libsctp.la \
+-	$(top_builddir)/src/testlib/libsctputil.la
++LDADD = $(top_builddir)/src/testlib/libsctputil.la \
++	$(top_builddir)/src/lib/libsctp.la
+ 
+ # programs to be installed with the distriubution
+ bin_PROGRAMS = sctp_darn sctp_test
+diff --git a/src/func_tests/Makefile.am b/src/func_tests/Makefile.am
+index b985685..44f0e94 100644
+--- a/src/func_tests/Makefile.am
++++ b/src/func_tests/Makefile.am
+@@ -8,8 +8,8 @@ include $(top_srcdir)/Makefile.dirs
+ INCLUDES = -I. -I$(top_srcdir)/src/include -I$(top_srcdir)/src/testlib 
+ AM_CFLAGS = -g -Wall -Wstrict-prototypes -Wimplicit-function-declaration
+ AM_LDFLAGS = -lpthread
+-LDADD = $(top_builddir)/src/lib/libsctp.la \
+-	$(top_builddir)/src/testlib/libsctputil.la
++LDADD = $(top_builddir)/src/testlib/libsctputil.la \
++	$(top_builddir)/src/lib/libsctp.la
+ 
+ V6FLAGS = -DCONFIG_IPV6=1 -DTEST_V6=1 ${DEFS} ${INCLUDES} ${CFLAGS}
+ 
+-- 
+1.7.1
+
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +0 -0
new file mode 100644
index 0000000..fd3c285

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 3

Quoted 3 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +3 -0
@@ -0,0 +1,59 @@
+DESCRIPTION = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project"
+SECTION = "libs"
+PRIORITY = "optional"

we're not using this variable anymore

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 9

Quoted 6 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +6 -0
+LICENSE = "LGPLv2"
+
+LIC_FILES_CHKSUM = " \
+  file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \
+  file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \
+  "

Please use 4 spaces for indentation and " as first character on last line.

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 11

Quoted 2 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +2 -0
+
+S = "${WORKDIR}/${BPN}-${PV}"

${BPN}-${PV} is ${BP}

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 13

Quoted 2 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +2 -0
+
+INC_PR = "r1"

Drop this

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 20

Quoted 7 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +7 -0
+
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig binconfig
+
+do_install_append_virtclass-native() {
+	:

4 spaces

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 23

Quoted 3 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +3 -0
+}
+
+RREPLACES_lksctp-tools = "lksctp"

why is this needed?

Quoted 26 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +26 -0
+
+LEAD_SONAME = "libsctp.so"
+
+PACKAGES =+ "${PN}-withsctp ${PN}-utils"
+
+FILES_${PN} = " \
+  ${libdir}/libsctp.so.${SOLIBVERSION} \
+  "
+
+FILES_${PN}-withsctp = " \
+  ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBVERSION}"
+
+FILES_${PN}-dev += " \
+  ${libdir}/libsctp.so.${SOLIBMAJORVERSION} \
+  ${libdir}/libsctp.so \
+  ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBMAJORVERSION} \
+  ${libdir}/lksctp-tools/libwithsctp.so \
+  ${datadir}/lksctp-tools/checksctp.c \
+  ${datadir}/lksctp-tools/sctp_socket.c \
+  ${datadir}/lksctp-tools/sctp_status.c \
+  ${datadir}/lksctp-tools/sctp_bind.c \
+  ${datadir}/lksctp-tools/sctp_darn.c \
+  ${datadir}/lksctp-tools/sctp_load_libs.c \
+  ${datadir}/lksctp-tools/sctp_sockopt.c \
+  ${datadir}/lksctp-tools/sctp_socket.h \
+  ${datadir}/lksctp-tools/sctp_test.c \

meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc line 59

Quoted 10 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools.inc new file +10 -0
+  ${datadir}/lksctp-tools/sctp_darn.h \
+  "
+
+FILES_${PN}-utils = " \
+  ${bindir}/sctp_test \
+  ${bindir}/sctp_darn \
+  ${bindir}/checksctp \
+  ${bindir}/withsctp  \
+  ${bindir}/sctp_status \
+  "

for spaces for all FILES_ variables

meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb line 4

Quoted 10 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file +4 -0
new file mode 100644
index 0000000..964f08c
@@ -0,0 +1,10 @@
+SOLIBVERSION="1.0.16"
+SOLIBMAJORVERSION="1"
+require lksctp-tools.inc
+PR = "${INC_PR}.0"

drop PR

meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb line 6

Quoted 2 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file +2 -0
+
+FILESEXTRAPATHS = "${THISDIR}/files"

Why is this needed? I'm pretty sure it isn't

meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb line 7

Quoted 1 line
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file +1 -0
+SRC_URI = "${SOURCEFORGE_MIRROR}/lksctp/lksctp-tools-${PV}.tar.gz"

lksctp-tools-${PV} -> ${BP}

meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb line 10

Quoted 3 lines
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file +3 -0
+
+SRC_URI[md5sum] = "708bb0b5a6806ad6e8d13c55b067518e"
+SRC_URI[sha256sum] = "0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26"

You can also fold .inc file to the recipe as we don't expect multiple versions of lksctp-tools.

Was the build error I've reported fixed in this version?

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]