All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pmdk: Initial commit of the PMDK SDK
@ 2018-09-05 18:17 Alistair Francis
  2018-09-06 17:37 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Alistair Francis @ 2018-09-05 18:17 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 ...c.cfg-Specify-the-host-when-building.patch | 29 +++++++++++
 ...0002-Makefile-Don-t-install-the-docs.patch | 26 ++++++++++
 meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb   | 49 +++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
 create mode 100644 meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
 create mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb

diff --git a/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
new file mode 100644
index 000000000..747538b0c
--- /dev/null
+++ b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
@@ -0,0 +1,29 @@
+From 2a22dc96c3bbb5c9bbcc008f58d4f5c64e3d19e6 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Mon, 23 Jul 2018 11:23:39 -0700
+Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building
+ jemalloc
+
+To avoid this error:
+    configure: error: cannot run C compiled programs.
+    If you meant to cross compile, use `--host'.
+when cross compiling specify the host when configuring jemalloc.
+
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+Upstream-Status: Inappropriate [configuration]
+---
+ src/jemalloc/jemalloc.cfg | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/jemalloc/jemalloc.cfg b/src/jemalloc/jemalloc.cfg
+index 196129de6..79ebbab1c 100644
+--- a/src/jemalloc/jemalloc.cfg
++++ b/src/jemalloc/jemalloc.cfg
+@@ -3,3 +3,4 @@
+ --with-private-namespace=je_vmem_
+ --disable-xmalloc
+ --disable-munmap
++--host=${HOST_SYS}
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
new file mode 100644
index 000000000..bd1b97c24
--- /dev/null
+++ b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
@@ -0,0 +1,26 @@
+From 460a96e390cb80278784cfe36629e280fe7ffef7 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Mon, 23 Jul 2018 11:31:17 -0700
+Subject: [PATCH 2/2] Makefile: Don't install the docs
+
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+Upstream-Status: Inappropriate [disable feature]
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 224a315f6..ce7f84afb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -144,7 +144,6 @@ rpm dpkg: pkg-clean source
+ 
+ install uninstall:
+ 	$(MAKE) -C src $@
+-	$(MAKE) -C doc $@
+ 
+ .PHONY: all clean clobber test check cstyle check-license install uninstall\
+ 	source rpm dpkg pkg-clean pcheck check-remote format doc $(SUBDIRS)
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
new file mode 100644
index 000000000..90d51e3f8
--- /dev/null
+++ b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Persistent Memory Development Kit"
+DESCRIPTION = "Persistent Memory Development Kit"
+HOMEPAGE = "http://pmem.io"
+SECTION = "libs"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
+DEPENDS = "ndctl"
+
+SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \
+           file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
+           file://0002-Makefile-Don-t-install-the-docs.patch \
+          "
+
+SRC_URI[md5sum] = "d9a7b3f1059ffd54b4c92e38329fe69e"
+SRC_URI[sha256sum] = "e11cfbbdf0773fb5965211e18044531f442ad1e6d6726f1bac8a6dcc0e092622"
+
+inherit autotools-brokensep pkgconfig
+
+# Fix jemalloc error:
+# | configure: error: cannot run C compiled programs.
+# | If you meant to cross compile, use `--host'.
+EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}'"
+
+do_install() {
+	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+
+	# Copy these into the standard directories
+	install -d ${D}${bindir}/
+	mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
+	mv ${D}/usr/local/bin/daxio ${D}${bindir}/
+
+	install -d ${D}${libdir}
+	mv ${D}/usr/local/lib/*so* ${D}${libdir}/
+
+	install -d ${D}${libdir}/pkgconfig
+	mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
+
+	install -d ${D}${includedir}
+	mv ${D}/usr/local/include/* ${D}${includedir}/
+
+	# Remove uneeded files
+	rm -rf ${D}/usr/local/
+}
+
+# Include these by default otherwise the SDK is not very useful
+FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio"
+FILES_${PN} += "${libdir}/*so*"
+FILES_${PN} += "${libdir}/pkgconfig/*.pc"
+FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdk: Initial commit of the PMDK SDK
  2018-09-05 18:17 [PATCH] pmdk: Initial commit of the PMDK SDK Alistair Francis
@ 2018-09-06 17:37 ` Khem Raj
  2018-09-06 20:28   ` Alistair Francis
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2018-09-06 17:37 UTC (permalink / raw)
  To: Alistair Francis; +Cc: openembeded-devel

fails to build with security flags on see
http://errors.yoctoproject.org/Errors/Details/191388/
On Wed, Sep 5, 2018 at 11:27 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  ...c.cfg-Specify-the-host-when-building.patch | 29 +++++++++++
>  ...0002-Makefile-Don-t-install-the-docs.patch | 26 ++++++++++
>  meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb   | 49 +++++++++++++++++++
>  3 files changed, 104 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
>  create mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
>
> diff --git a/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
> new file mode 100644
> index 000000000..747538b0c
> --- /dev/null
> +++ b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
> @@ -0,0 +1,29 @@
> +From 2a22dc96c3bbb5c9bbcc008f58d4f5c64e3d19e6 Mon Sep 17 00:00:00 2001
> +From: Alistair Francis <alistair.francis@wdc.com>
> +Date: Mon, 23 Jul 2018 11:23:39 -0700
> +Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building
> + jemalloc
> +
> +To avoid this error:
> +    configure: error: cannot run C compiled programs.
> +    If you meant to cross compile, use `--host'.
> +when cross compiling specify the host when configuring jemalloc.
> +
> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> +Upstream-Status: Inappropriate [configuration]
> +---
> + src/jemalloc/jemalloc.cfg | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/jemalloc/jemalloc.cfg b/src/jemalloc/jemalloc.cfg
> +index 196129de6..79ebbab1c 100644
> +--- a/src/jemalloc/jemalloc.cfg
> ++++ b/src/jemalloc/jemalloc.cfg
> +@@ -3,3 +3,4 @@
> + --with-private-namespace=je_vmem_
> + --disable-xmalloc
> + --disable-munmap
> ++--host=${HOST_SYS}
> +--
> +2.17.1
> +
> diff --git a/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
> new file mode 100644
> index 000000000..bd1b97c24
> --- /dev/null
> +++ b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
> @@ -0,0 +1,26 @@
> +From 460a96e390cb80278784cfe36629e280fe7ffef7 Mon Sep 17 00:00:00 2001
> +From: Alistair Francis <alistair.francis@wdc.com>
> +Date: Mon, 23 Jul 2018 11:31:17 -0700
> +Subject: [PATCH 2/2] Makefile: Don't install the docs
> +
> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> +Upstream-Status: Inappropriate [disable feature]
> +---
> + Makefile | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 224a315f6..ce7f84afb 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -144,7 +144,6 @@ rpm dpkg: pkg-clean source
> +
> + install uninstall:
> +       $(MAKE) -C src $@
> +-      $(MAKE) -C doc $@
> +
> + .PHONY: all clean clobber test check cstyle check-license install uninstall\
> +       source rpm dpkg pkg-clean pcheck check-remote format doc $(SUBDIRS)
> +--
> +2.17.1
> +
> diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
> new file mode 100644
> index 000000000..90d51e3f8
> --- /dev/null
> +++ b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
> @@ -0,0 +1,49 @@
> +SUMMARY = "Persistent Memory Development Kit"
> +DESCRIPTION = "Persistent Memory Development Kit"
> +HOMEPAGE = "http://pmem.io"
> +SECTION = "libs"
> +LICENSE = "BSD"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
> +DEPENDS = "ndctl"
> +
> +SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \
> +           file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
> +           file://0002-Makefile-Don-t-install-the-docs.patch \
> +          "
> +
> +SRC_URI[md5sum] = "d9a7b3f1059ffd54b4c92e38329fe69e"
> +SRC_URI[sha256sum] = "e11cfbbdf0773fb5965211e18044531f442ad1e6d6726f1bac8a6dcc0e092622"
> +
> +inherit autotools-brokensep pkgconfig
> +
> +# Fix jemalloc error:
> +# | configure: error: cannot run C compiled programs.
> +# | If you meant to cross compile, use `--host'.
> +EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}'"
> +
> +do_install() {
> +       oe_runmake PREFIX=${prefix} DESTDIR=${D} install
> +
> +       # Copy these into the standard directories
> +       install -d ${D}${bindir}/
> +       mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
> +       mv ${D}/usr/local/bin/daxio ${D}${bindir}/
> +
> +       install -d ${D}${libdir}
> +       mv ${D}/usr/local/lib/*so* ${D}${libdir}/
> +
> +       install -d ${D}${libdir}/pkgconfig
> +       mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
> +
> +       install -d ${D}${includedir}
> +       mv ${D}/usr/local/include/* ${D}${includedir}/
> +
> +       # Remove uneeded files
> +       rm -rf ${D}/usr/local/
> +}
> +
> +# Include these by default otherwise the SDK is not very useful
> +FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio"
> +FILES_${PN} += "${libdir}/*so*"
> +FILES_${PN} += "${libdir}/pkgconfig/*.pc"
> +FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*"
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdk: Initial commit of the PMDK SDK
  2018-09-06 17:37 ` Khem Raj
@ 2018-09-06 20:28   ` Alistair Francis
  2018-09-06 21:23     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Alistair Francis @ 2018-09-06 20:28 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Thu, Sep 6, 2018 at 10:37 AM, Khem Raj <raj.khem@gmail.com> wrote:
> fails to build with security flags on see
> http://errors.yoctoproject.org/Errors/Details/191388/

Ah, it looks like the examples don't have -O set in the build scripts.
It looks like just setting EXTRA_CFLAGS in the recipe should fix that.
How do you do a fortified source build so I can test?

Alistair

> On Wed, Sep 5, 2018 at 11:27 AM Alistair Francis
> <alistair.francis@wdc.com> wrote:
>>
>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>> ---
>>  ...c.cfg-Specify-the-host-when-building.patch | 29 +++++++++++
>>  ...0002-Makefile-Don-t-install-the-docs.patch | 26 ++++++++++
>>  meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb   | 49 +++++++++++++++++++
>>  3 files changed, 104 insertions(+)
>>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
>>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
>>  create mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
>>
>> diff --git a/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
>> new file mode 100644
>> index 000000000..747538b0c
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
>> @@ -0,0 +1,29 @@
>> +From 2a22dc96c3bbb5c9bbcc008f58d4f5c64e3d19e6 Mon Sep 17 00:00:00 2001
>> +From: Alistair Francis <alistair.francis@wdc.com>
>> +Date: Mon, 23 Jul 2018 11:23:39 -0700
>> +Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building
>> + jemalloc
>> +
>> +To avoid this error:
>> +    configure: error: cannot run C compiled programs.
>> +    If you meant to cross compile, use `--host'.
>> +when cross compiling specify the host when configuring jemalloc.
>> +
>> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>> +Upstream-Status: Inappropriate [configuration]
>> +---
>> + src/jemalloc/jemalloc.cfg | 1 +
>> + 1 file changed, 1 insertion(+)
>> +
>> +diff --git a/src/jemalloc/jemalloc.cfg b/src/jemalloc/jemalloc.cfg
>> +index 196129de6..79ebbab1c 100644
>> +--- a/src/jemalloc/jemalloc.cfg
>> ++++ b/src/jemalloc/jemalloc.cfg
>> +@@ -3,3 +3,4 @@
>> + --with-private-namespace=je_vmem_
>> + --disable-xmalloc
>> + --disable-munmap
>> ++--host=${HOST_SYS}
>> +--
>> +2.17.1
>> +
>> diff --git a/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
>> new file mode 100644
>> index 000000000..bd1b97c24
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
>> @@ -0,0 +1,26 @@
>> +From 460a96e390cb80278784cfe36629e280fe7ffef7 Mon Sep 17 00:00:00 2001
>> +From: Alistair Francis <alistair.francis@wdc.com>
>> +Date: Mon, 23 Jul 2018 11:31:17 -0700
>> +Subject: [PATCH 2/2] Makefile: Don't install the docs
>> +
>> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>> +Upstream-Status: Inappropriate [disable feature]
>> +---
>> + Makefile | 1 -
>> + 1 file changed, 1 deletion(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index 224a315f6..ce7f84afb 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -144,7 +144,6 @@ rpm dpkg: pkg-clean source
>> +
>> + install uninstall:
>> +       $(MAKE) -C src $@
>> +-      $(MAKE) -C doc $@
>> +
>> + .PHONY: all clean clobber test check cstyle check-license install uninstall\
>> +       source rpm dpkg pkg-clean pcheck check-remote format doc $(SUBDIRS)
>> +--
>> +2.17.1
>> +
>> diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
>> new file mode 100644
>> index 000000000..90d51e3f8
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
>> @@ -0,0 +1,49 @@
>> +SUMMARY = "Persistent Memory Development Kit"
>> +DESCRIPTION = "Persistent Memory Development Kit"
>> +HOMEPAGE = "http://pmem.io"
>> +SECTION = "libs"
>> +LICENSE = "BSD"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
>> +DEPENDS = "ndctl"
>> +
>> +SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \
>> +           file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
>> +           file://0002-Makefile-Don-t-install-the-docs.patch \
>> +          "
>> +
>> +SRC_URI[md5sum] = "d9a7b3f1059ffd54b4c92e38329fe69e"
>> +SRC_URI[sha256sum] = "e11cfbbdf0773fb5965211e18044531f442ad1e6d6726f1bac8a6dcc0e092622"
>> +
>> +inherit autotools-brokensep pkgconfig
>> +
>> +# Fix jemalloc error:
>> +# | configure: error: cannot run C compiled programs.
>> +# | If you meant to cross compile, use `--host'.
>> +EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}'"
>> +
>> +do_install() {
>> +       oe_runmake PREFIX=${prefix} DESTDIR=${D} install
>> +
>> +       # Copy these into the standard directories
>> +       install -d ${D}${bindir}/
>> +       mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
>> +       mv ${D}/usr/local/bin/daxio ${D}${bindir}/
>> +
>> +       install -d ${D}${libdir}
>> +       mv ${D}/usr/local/lib/*so* ${D}${libdir}/
>> +
>> +       install -d ${D}${libdir}/pkgconfig
>> +       mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
>> +
>> +       install -d ${D}${includedir}
>> +       mv ${D}/usr/local/include/* ${D}${includedir}/
>> +
>> +       # Remove uneeded files
>> +       rm -rf ${D}/usr/local/
>> +}
>> +
>> +# Include these by default otherwise the SDK is not very useful
>> +FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio"
>> +FILES_${PN} += "${libdir}/*so*"
>> +FILES_${PN} += "${libdir}/pkgconfig/*.pc"
>> +FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*"
>> --
>> 2.17.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pmdk: Initial commit of the PMDK SDK
  2018-09-06 20:28   ` Alistair Francis
@ 2018-09-06 21:23     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2018-09-06 21:23 UTC (permalink / raw)
  To: Alistair Francis; +Cc: openembeded-devel

On Thu, Sep 6, 2018 at 1:29 PM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Thu, Sep 6, 2018 at 10:37 AM, Khem Raj <raj.khem@gmail.com> wrote:
> > fails to build with security flags on see
> > http://errors.yoctoproject.org/Errors/Details/191388/
>
> Ah, it looks like the examples don't have -O set in the build scripts.
> It looks like just setting EXTRA_CFLAGS in the recipe should fix that.
> How do you do a fortified source build so I can test?
>

you can use latest poky distro from yp
or you can use my distro
https://github.com/kraj/oe-build

> Alistair
>
> > On Wed, Sep 5, 2018 at 11:27 AM Alistair Francis
> > <alistair.francis@wdc.com> wrote:
> >>
> >> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> >> ---
> >>  ...c.cfg-Specify-the-host-when-building.patch | 29 +++++++++++
> >>  ...0002-Makefile-Don-t-install-the-docs.patch | 26 ++++++++++
> >>  meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb   | 49 +++++++++++++++++++
> >>  3 files changed, 104 insertions(+)
> >>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
> >>  create mode 100644 meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
> >>  create mode 100644 meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
> >>
> >> diff --git a/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
> >> new file mode 100644
> >> index 000000000..747538b0c
> >> --- /dev/null
> >> +++ b/meta-oe/recipes-extended/pmdk/files/0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch
> >> @@ -0,0 +1,29 @@
> >> +From 2a22dc96c3bbb5c9bbcc008f58d4f5c64e3d19e6 Mon Sep 17 00:00:00 2001
> >> +From: Alistair Francis <alistair.francis@wdc.com>
> >> +Date: Mon, 23 Jul 2018 11:23:39 -0700
> >> +Subject: [PATCH] jemalloc/jemalloc.cfg: Specify the host when building
> >> + jemalloc
> >> +
> >> +To avoid this error:
> >> +    configure: error: cannot run C compiled programs.
> >> +    If you meant to cross compile, use `--host'.
> >> +when cross compiling specify the host when configuring jemalloc.
> >> +
> >> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> >> +Upstream-Status: Inappropriate [configuration]
> >> +---
> >> + src/jemalloc/jemalloc.cfg | 1 +
> >> + 1 file changed, 1 insertion(+)
> >> +
> >> +diff --git a/src/jemalloc/jemalloc.cfg b/src/jemalloc/jemalloc.cfg
> >> +index 196129de6..79ebbab1c 100644
> >> +--- a/src/jemalloc/jemalloc.cfg
> >> ++++ b/src/jemalloc/jemalloc.cfg
> >> +@@ -3,3 +3,4 @@
> >> + --with-private-namespace=je_vmem_
> >> + --disable-xmalloc
> >> + --disable-munmap
> >> ++--host=${HOST_SYS}
> >> +--
> >> +2.17.1
> >> +
> >> diff --git a/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
> >> new file mode 100644
> >> index 000000000..bd1b97c24
> >> --- /dev/null
> >> +++ b/meta-oe/recipes-extended/pmdk/files/0002-Makefile-Don-t-install-the-docs.patch
> >> @@ -0,0 +1,26 @@
> >> +From 460a96e390cb80278784cfe36629e280fe7ffef7 Mon Sep 17 00:00:00 2001
> >> +From: Alistair Francis <alistair.francis@wdc.com>
> >> +Date: Mon, 23 Jul 2018 11:31:17 -0700
> >> +Subject: [PATCH 2/2] Makefile: Don't install the docs
> >> +
> >> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> >> +Upstream-Status: Inappropriate [disable feature]
> >> +---
> >> + Makefile | 1 -
> >> + 1 file changed, 1 deletion(-)
> >> +
> >> +diff --git a/Makefile b/Makefile
> >> +index 224a315f6..ce7f84afb 100644
> >> +--- a/Makefile
> >> ++++ b/Makefile
> >> +@@ -144,7 +144,6 @@ rpm dpkg: pkg-clean source
> >> +
> >> + install uninstall:
> >> +       $(MAKE) -C src $@
> >> +-      $(MAKE) -C doc $@
> >> +
> >> + .PHONY: all clean clobber test check cstyle check-license install uninstall\
> >> +       source rpm dpkg pkg-clean pcheck check-remote format doc $(SUBDIRS)
> >> +--
> >> +2.17.1
> >> +
> >> diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
> >> new file mode 100644
> >> index 000000000..90d51e3f8
> >> --- /dev/null
> >> +++ b/meta-oe/recipes-extended/pmdk/pmdk_1.4.1.bb
> >> @@ -0,0 +1,49 @@
> >> +SUMMARY = "Persistent Memory Development Kit"
> >> +DESCRIPTION = "Persistent Memory Development Kit"
> >> +HOMEPAGE = "http://pmem.io"
> >> +SECTION = "libs"
> >> +LICENSE = "BSD"
> >> +LIC_FILES_CHKSUM = "file://LICENSE;md5=7db1106255a1baa80391fd2e21eebab7"
> >> +DEPENDS = "ndctl"
> >> +
> >> +SRC_URI = "https://github.com/pmem/${BPN}/archive/${PV}.tar.gz \
> >> +           file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
> >> +           file://0002-Makefile-Don-t-install-the-docs.patch \
> >> +          "
> >> +
> >> +SRC_URI[md5sum] = "d9a7b3f1059ffd54b4c92e38329fe69e"
> >> +SRC_URI[sha256sum] = "e11cfbbdf0773fb5965211e18044531f442ad1e6d6726f1bac8a6dcc0e092622"
> >> +
> >> +inherit autotools-brokensep pkgconfig
> >> +
> >> +# Fix jemalloc error:
> >> +# | configure: error: cannot run C compiled programs.
> >> +# | If you meant to cross compile, use `--host'.
> >> +EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}'"
> >> +
> >> +do_install() {
> >> +       oe_runmake PREFIX=${prefix} DESTDIR=${D} install
> >> +
> >> +       # Copy these into the standard directories
> >> +       install -d ${D}${bindir}/
> >> +       mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
> >> +       mv ${D}/usr/local/bin/daxio ${D}${bindir}/
> >> +
> >> +       install -d ${D}${libdir}
> >> +       mv ${D}/usr/local/lib/*so* ${D}${libdir}/
> >> +
> >> +       install -d ${D}${libdir}/pkgconfig
> >> +       mv ${D}/usr/local/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/
> >> +
> >> +       install -d ${D}${includedir}
> >> +       mv ${D}/usr/local/include/* ${D}${includedir}/
> >> +
> >> +       # Remove uneeded files
> >> +       rm -rf ${D}/usr/local/
> >> +}
> >> +
> >> +# Include these by default otherwise the SDK is not very useful
> >> +FILES_${PN} += "${bindir}/pmempool ${bindir}/daxio"
> >> +FILES_${PN} += "${libdir}/*so*"
> >> +FILES_${PN} += "${libdir}/pkgconfig/*.pc"
> >> +FILES_${PN} += "${includedir}/libpmemobj++/* ${includedir}/libpmemobj/*"
> >> --
> >> 2.17.1
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-devel mailing list
> >> Openembedded-devel@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-06 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 18:17 [PATCH] pmdk: Initial commit of the PMDK SDK Alistair Francis
2018-09-06 17:37 ` Khem Raj
2018-09-06 20:28   ` Alistair Francis
2018-09-06 21:23     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.