Package: src:pyg Version: 0.9.8 Severity: normal Tags: patch Dear Maintainer,
While trying to build the package on ppc64el, it failed: make[4]: Entering directory '/root/pyg-0.9.8/wlp/module' make[4]: *** No rule to make target '/usr/lib/python2.7/config/Makefile', needed by 'sedscript'. Stop. make[4]: Leaving directory '/root/pyg-0.9.8/wlp/module' Makefile.pre.in:295: recipe for target 'boot' failed make[3]: *** [boot] Error 2 In Ubuntu, a similiar patch than the one provided was applied to achieve the following: * Fix build failure with python in multiarch location. * adapt /wlp/C/Makefile for multiarched libfl.a * include required string.h in wlp/C/commands.l Thanks for considering the patch. Erwan Prioul.
diff -Naur a/wlp/C/commands.l b/wlp/C/commands.l --- a/wlp/C/commands.l 2016-02-05 15:03:38.516765954 +0100 +++ b/wlp/C/commands.l 2016-02-05 15:29:23.808118531 +0100 @@ -4,6 +4,7 @@ #include "commands.tab.h" /*#define DEBUG*/ #include "macro.h" +#include <string.h> %} OWNER "<"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9._-]+">" diff -Naur a/wlp/C/Makefile b/wlp/C/Makefile --- a/wlp/C/Makefile 2016-02-05 15:03:38.512765955 +0100 +++ b/wlp/C/Makefile 2016-02-05 15:29:23.808118531 +0100 @@ -17,21 +17,23 @@ SRCDIR=. BINDIR=. +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + OBJFILE=structs.o commands.tab.o lex.yy.o all: archive bin # archive file for python module -archive: structs bison flex /usr/lib/libfl.a macro.h structs.h commands.tab.h +archive: structs bison flex macro.h structs.h commands.tab.h $(AR) $(AROPTS) $(BINDIR)/wlp.a $(OBJFILE) \ - /usr/lib/libfl.a + /usr/lib/$(DEB_HOST_MULTIARCH)/libfl.a # binary (executable) file for testing executable: bin -bin: structs bison flex /usr/lib/libfl.a macro.h structs.h commands.tab.h +bin: structs bison flex macro.h structs.h commands.tab.h $(CC) $(CCSHARED) $(CCOPTS) $(OBJFILE) \ - yytest.c /usr/lib/libfl.a -o ./yytest + yytest.c /usr/lib/$(DEB_HOST_MULTIARCH)/libfl.a -o ./yytest flex: $(FLEX) $(FLEXOPTS) commands.l diff -Naur a/wlp/module/Makefile.pre.in b/wlp/module/Makefile.pre.in --- a/wlp/module/Makefile.pre.in 2016-02-05 15:03:38.520765953 +0100 +++ b/wlp/module/Makefile.pre.in 2016-02-05 15:29:23.808118531 +0100 @@ -166,6 +166,7 @@ DESTSHARED= $(BINLIBDEST)/site-packages LIBPL= $(LIBP)/config +LIBPL= $(shell python$(VERSION)-config --configdir) PYTHONLIBS= $(LIBPL)/libpython$(VERSION).a