All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/s390-tools: fix zkey build
@ 2021-03-30 20:04 Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-03-30 20:04 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=4e520b8b972fb558982bbca01d69c4ebf5cdd2d9
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Build of zkey fails since bump to version 2.16.0 in commit
b82b58a8ddc3d079aa2976b3dafbc965b6107648

Fixes:
 - http://autobuild.buildroot.org/results/e7f229a98dab188ee9c40e4709fd26bfa67358d3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...or-when-the-compiler-flags-are-overridden.patch | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch
new file mode 100644
index 0000000000..ee725d396e
--- /dev/null
+++ b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch
@@ -0,0 +1,54 @@
+From 3f3f063c98278f53ad3b34e68b70fca62eaea8fb Mon Sep 17 00:00:00 2001
+From: Ingo Franzki <ifranzki@linux.ibm.com>
+Date: Tue, 23 Feb 2021 08:52:26 +0100
+Subject: [PATCH] zkey: Fix build error when the compiler flags are overridden
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When the compiler flags are overridden, the build of zkey may fail with:
+
+kms.c:44:2: error: #error KMS_PLUGIN_LOCATION must be defined
+   44 | #error KMS_PLUGIN_LOCATION must be defined
+      |  ^~~~~
+
+The Makefile uses CFLAGS variable for defining the KMS_PLUGIN_LOCATION,
+but it should rather use ALL_CFLAGS.
+
+Also use ALL_CPPFLAGS for defining HAVE_LUKS2_SUPPORT.
+
+Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/108
+
+Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
+Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
+Signed-off-by: Jan H??ppner <hoeppner@linux.ibm.com>
+
+[Retrieved from:
+https://github.com/ibm-s390-linux/s390-tools/commit/3f3f063c98278f53ad3b34e68b70fca62eaea8fb]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ zkey/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/zkey/Makefile b/zkey/Makefile
+index 41129bcf..f74e2091 100644
+--- a/zkey/Makefile
++++ b/zkey/Makefile
+@@ -18,7 +18,7 @@ ifneq (${HAVE_CRYPTSETUP2},0)
+ 		ifneq (${HAVE_OPENSSL},0)
+ 			BUILD_TARGETS += zkey-cryptsetup
+ 			INSTALL_TARGETS += install-zkey-cryptsetup
+-			CPPFLAGS += -DHAVE_LUKS2_SUPPORT
++			ALL_CPPFLAGS += -DHAVE_LUKS2_SUPPORT
+ 		else
+ 			BUILD_TARGETS += zkey-cryptsetup-skip-openssl
+ 			INSTALL_TARGETS += zkey-cryptsetup-skip-openssl
+@@ -34,7 +34,7 @@ endif
+ 
+ libs = $(rootdir)/libutil/libutil.a
+ 
+-CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\"
++ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\"
+ 
+ detect-libcryptsetup.dep:
+ 	echo "#include <libcryptsetup.h>" > detect-libcryptsetup.dep

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

* [Buildroot] [git commit] package/s390-tools: fix zkey build
@ 2020-11-11 10:44 Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2020-11-11 10:44 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=48d74924dd6f5c3ee8578a17a5cdfadbc8745d8e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Linking of libekmfweb fails when zkey-ekmfweb.so build is enabled.

Fixes:
- http://autobuild.buildroot.net/results/d41bca3be35d1a48f962be03920f2b81c3e9bb9f

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...01-zkey-ekmfweb-fix-linking-of-libekmfweb.patch | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/package/s390-tools/0001-zkey-ekmfweb-fix-linking-of-libekmfweb.patch b/package/s390-tools/0001-zkey-ekmfweb-fix-linking-of-libekmfweb.patch
new file mode 100644
index 0000000000..76a642af70
--- /dev/null
+++ b/package/s390-tools/0001-zkey-ekmfweb-fix-linking-of-libekmfweb.patch
@@ -0,0 +1,53 @@
+From a4e6f7239d8cee37e58eac974482d6deefa8a137 Mon Sep 17 00:00:00 2001
+From: Alexander Egorenkov <egorenar@linux.ibm.com>
+Date: Thu, 5 Nov 2020 17:42:58 +0100
+Subject: [PATCH 1/1] zkey/ekmfweb: fix linking of libekmfweb
+
+Use -L compiler's parameter instead of the environment variable
+LIBRARY_PATH.
+
+Fixes the following problem on buildroot:
+
+buildroot/qemu-s390x/host/bin/s390x-linux-gcc -shared -Wl,--version-script=zkey-ekmfweb.map -Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.1 zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o ../..//libutil/libutil.a -lekmfweb -ldl -lcrypto -o zkey-ekmfweb.so
+buildroot/qemu-s390x/host/bin/s390x-linux-gcc -I ../../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I ../include -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -DS390_TOOLS_RELEASE=2.15.1-build-20201105 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -D_GNU_SOURCE -c udev_ccwgroup.c -o udev_ccwgroup.o
+buildroot/qemu-s390x/host/bin/s390x-linux-gcc -I ../../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I ../include -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -DS390_TOOLS_RELEASE=2.15.1-build-20201105 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -D_GNU_SOURCE -c iscsi.c -o iscsi.o
+buildroot/qemu-s390x/host/bin/s390x-linux-gcc -I ../../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I ../include -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -DS390_TOOLS_RELEASE=2.15.1-build-20201105 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -D_GNU_SOURCE -c dasd.c -o dasd.o
+buildroot/qemu-s390x/host/opt/ext-toolchain/bin/../lib/gcc/s390x-buildroot-linux-gnu/9.3.0/../../../../s390x-buildroot-linux-gnu/bin/ld: cannot find -lekmfweb
+collect2: error: ld returned 1 exit status
+make[4]: *** [Makefile:36: zkey-ekmfweb.so] Error 1
+make[3]: *** [Makefile:128: ekmfweb] Error 2
+buildroot/qemu-s390x/host/bin/s390x-linux-gcc -I ../../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I ../include -std=gnu99 -Wno-unused-parameter -Wno-missing-field-initializers -DS390_TOOLS_RELEASE=2.15.1-build-20201105 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -D_GNU_SOURCE -c zfcp.c -o zfcp.o
+make[2]: *** [Makefile:43: zkey] Error 2
+make[2]: *** Waiting for unfinished jobs....
+
+Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
+Acked-by: Ingo Franzki <ifranzki@linux.ibm.com>
+---
+ zkey/ekmfweb/Makefile | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/zkey/ekmfweb/Makefile b/zkey/ekmfweb/Makefile
+index 79a16cb5..1a3a4977 100644
+--- a/zkey/ekmfweb/Makefile
++++ b/zkey/ekmfweb/Makefile
+@@ -7,8 +7,6 @@ all: zkey-ekmfweb.so
+ 
+ libs = $(rootdir)/libutil/libutil.a
+ 
+-export LIBRARY_PATH = $(rootdir)/libekmfweb:$LIBRARY_PATH
+-
+ zkey-ekmfweb.o: zkey-ekmfweb.c zkey-ekmfweb.h ../kms-plugin.h \
+ 	../cca.h ../utils.h ../pkey.h ../properties.h \
+ 	$(rootdir)include/ekmfweb/ekmfweb.h libekmfweb.dep
+@@ -29,7 +27,7 @@ utils.o: ../utils.c ../utils.h ../pkey.h ../cca.h ../ep11.h
+ 	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -fPIC -c $< -o $@
+ 
+ zkey-ekmfweb.so: ALL_CFLAGS += -fPIC
+-zkey-ekmfweb.so: LDLIBS = -lekmfweb -ldl -lcrypto
++zkey-ekmfweb.so: LDLIBS = -L$(rootdir)/libekmfweb -lekmfweb -ldl -lcrypto
+ zkey-ekmfweb.so: ALL_LDFLAGS += -shared -Wl,--version-script=zkey-ekmfweb.map \
+ 	-Wl,-z,defs,-Bsymbolic -Wl,-soname,zkey-ekmfweb.so.$(VERM)
+ zkey-ekmfweb.so: zkey-ekmfweb.o properties.o pkey.o cca.o ep11.o utils.o $(libs)
+-- 
+2.26.2
+

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

end of thread, other threads:[~2021-03-30 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 20:04 [Buildroot] [git commit] package/s390-tools: fix zkey build Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2020-11-11 10:44 Peter Korsgaard

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.