Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-12-04 Thread Ralf Jung
Hi,

> Thank you. Unfortunately, i386 is broken as a cross build host.

Ah, I see.  Well I guess i386 and amd64 are a weird combination anyway...

I tried `gbp buildpackage --git-builder=sbuild --dist unstable --host
ppc64el --add-depends=libc-dev,libstdc++-dev` as you suggested, and that
completed successfully.  Impressive, I thought cross-building would be
much harder -- thanks for all the work you and others have put into
this!  I guess the problem is fixed then.

Kind regards,
Ralf



Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-12-03 Thread Helmut Grohne

On Sun, Dec 03, 2017 at 10:11:06PM +0100, Ralf Jung wrote:
> However, this fails: gbp buildpackage --git-builder=sbuild --dist
> unstable --host i386 --add-depends=libc-dev,libstdc++-dev
> 
> I pasted the log below.

Thank you. Unfortunately, i386 is broken as a cross build host. You may
know that it receives a waiver from the release team when the question
of porters arises. I am eager to meet our plethora of i386 porters, but
thus far I failed to locate any of them. If you happen to find some,
please send them to me. I'm afraid you'll have to use a different host
for testing for now.  For mips64el, the toolchain is currently broken
(#882263). Most other release architectures (but amd64) should really
just work. At least for arm64, armel, armhf, mips, mipsel, s390x, and
ppc64el, I've recently performed successful cross builds. The slower
architectures occasionally are prone to version skews. Thus I tend to
use ppc64el for testing.

Helmut



Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-12-03 Thread Ralf Jung
Hi,

> On Sun, Dec 03, 2017 at 07:36:22PM +0100, Ralf Jung wrote:
>> I don't have the environment to test those.  Please let me know if this
>> looks like it should be working.
> 
> How do you build packages?

gbp buildpackage --git-builder=sbuild

> Most people I know use either sbuild or
> pbuilder. If you do, you do have the environment. For sbuild[1] it is
> `--host=...' and for pbuilder it is `--host-arch=...'. No extra setup
> beyond the one for native builds required. If you are aware of any other
> builder that doesn't support cross building please tell.

Oh, I don't need to set up special sbuild chroots for the each target
architecture?  Wow, I had no idea.  (I was also briefly confused by
terminology, but it seems "host" here is what I have seen called
"target" elsewhere.)

However, this fails: gbp buildpackage --git-builder=sbuild --dist
unstable --host i386 --add-depends=libc-dev,libstdc++-dev

I pasted the log below.

Kind regards,
Ralf

> gbp:info: Exporting 'HEAD' to '/home/r/src/debian/osspd/build-area/osspd-tmp'
> gbp:info: Moving '/home/r/src/debian/osspd/build-area/osspd-tmp' to 
> '/home/r/src/debian/osspd/build-area/osspd-1.3.2'
> dh clean --parallel --with=systemd
>dh_auto_clean -O--parallel
>   make -j5 clean
> make[1]: Entering directory '/home/r/src/debian/osspd/build-area/osspd-1.3.2'
> Package fuse was not found in the pkg-config search path.
> Perhaps you should add the directory containing `fuse.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'fuse' found
> Package fuse was not found in the pkg-config search path.
> Perhaps you should add the directory containing `fuse.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'fuse' found
> Package libpulse was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libpulse.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libpulse' found
> Package libpulse was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libpulse.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libpulse' found
> Package alsa was not found in the pkg-config search path.
> Perhaps you should add the directory containing `alsa.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'alsa' found
> Package alsa was not found in the pkg-config search path.
> Perhaps you should add the directory containing `alsa.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'alsa' found
> rm -f *.o *.a osspd ossp-padsp ossp-alsap osstest
> make[1]: Leaving directory '/home/r/src/debian/osspd/build-area/osspd-1.3.2'
>dh_clean -O--parallel
> dpkg-source: info: using source format '3.0 (quilt)'
> dpkg-source: info: applying 
> 0001-Fix-compilation-with-Werror-format-security.patch
> dpkg-source: info: applying 0002-honor-CPPFLAGS.patch
> dpkg-source: info: applying 
> 0003-PA-recommends-users-not-to-be-in-the-audio-group-so-.patch
> dpkg-source: info: applying 
> 0004-Allow-to-set-slave-installation-path-during-compilat.patch
> dpkg-source: info: applying 0005-Add-pthread-compiler-and-linker-flag.patch
> dpkg-source: info: applying 0006-cross.patch
> dpkg-source: info: building osspd using existing ./osspd_1.3.2.orig.tar.gz
> dpkg-source: info: building osspd in osspd_1.3.2-9.debian.tar.xz
> dpkg-source: info: building osspd in osspd_1.3.2-9.dsc
> sbuild (Debian sbuild) 0.73.0 (23 Dec 2016) on r-thinktop
> 
> +==+
> | osspd 1.3.2-9 (i386) Sun, 03 Dec 2017 21:08:39 
> + |
> +==+
> 
> Package: osspd
> Version: 1.3.2-9
> Source Version: 1.3.2-9
> Distribution: unstable
> Machine Architecture: amd64
> Host Architecture: i386
> Build Architecture: amd64
> Build Type: full
> 
> I: NOTICE: Log filtering will replace 
> 'var/run/schroot/mount/unstable-amd64-sbuild-96eb71fd-f170-4d78-b615-70adab12e7a3'
>  with '<>'
> 
> +--+
> | Update chroot   
>  |
> +--+
> 
> Hit:1 http://cdn-fastly.deb.debian.org/debian unstable InRelease
> Get:2 http://cdn-fastly.deb.debian.org/debian unstable/main i386 Packages 
> [7799 kB]
> Fetched 7799 kB in 12s (616 kB/s)
> Reading package lists...
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Calculating upgrade...
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 
> +--+
> | Fetch source files  
>  |
> +--+
> 
> 
> Local sources
> -
> 
> 

Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-12-03 Thread Helmut Grohne
On Sun, Dec 03, 2017 at 07:36:22PM +0100, Ralf Jung wrote:
> I don't have the environment to test those.  Please let me know if this
> looks like it should be working.

How do you build packages? Most people I know use either sbuild or
pbuilder. If you do, you do have the environment. For sbuild[1] it is
`--host=...' and for pbuilder it is `--host-arch=...'. No extra setup
beyond the one for native builds required. If you are aware of any other
builder that doesn't support cross building please tell.

Helmut

[1] sbuild does not work around #815172, so you may have to also pass
--add-depends=libc-dev,libstdc++-dev to get a working build.



Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-12-03 Thread Ralf Jung
Hi Helmut,

thanks a lot for this patch!  I have added it to the development version
of the package, which you can find at .
I plan to do a new upload soon.  Upstream is pretty dead, so there is
little point in forwarding the patch there.

Your patch is at
.
 I build-tested this locally, but of course that's not a cross-build --
I don't have the environment to test those.  Please let me know if this
looks like it should be working.

Kind regards,
Ralf


On 21.11.2017 21:20, Helmut Grohne wrote:
> Source: osspd
> Version: 1.3.2-8
> Tags: patch upstream
> User: helm...@debian.org
> Usertags: rebootstrap
> 
> osspd fails to cross build from source, because it uses the build
> architecture pkg-config (hard coded in Makefile) and thus fails finding
> required libraries, which are only requested for the host architecture
> by its Build-Depends. The correct solution is to use the host
> architecture pkg-config, which is correctly passed by dh_auto_build, but
> ignored by the Makefile. After making pkg-config substitutable, osspd
> cross builds successfully. Please consider applying the attached patch.
> 
> Helmut
> 



Bug#882365: osspd FTCBFS: uses the build architecture pkg-config

2017-11-21 Thread Helmut Grohne
Source: osspd
Version: 1.3.2-8
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

osspd fails to cross build from source, because it uses the build
architecture pkg-config (hard coded in Makefile) and thus fails finding
required libraries, which are only requested for the host architecture
by its Build-Depends. The correct solution is to use the host
architecture pkg-config, which is correctly passed by dh_auto_build, but
ignored by the Makefile. After making pkg-config substitutable, osspd
cross builds successfully. Please consider applying the attached patch.

Helmut
Index: osspd-1.3.2/Makefile
===
--- osspd-1.3.2.orig/Makefile
+++ osspd-1.3.2/Makefile
@@ -2,6 +2,7 @@
 # DESTDIR is completely respected
 CC := gcc
 AR := ar
+PKG_CONFIG ?= pkg-config
 CFLAGS := -Wall -pthread $(CFLAGS) $(CPPFLAGS)
 XLDFLAGS := $(LDFLAGS)
 LDFLAGS := -L. -lossp -pthread $(LDFLAGS)
@@ -11,27 +12,27 @@
 SLAVESDIR := $(prefix)/sbin
 
 ifeq "$(origin OSSPD_CFLAGS)" "undefined"
-OSSPD_CFLAGS := $(shell pkg-config --cflags fuse)
+OSSPD_CFLAGS := $(shell $(PKG_CONFIG) --cflags fuse)
 endif
 
 ifeq "$(origin OSSPD_LDFLAGS)" "undefined"
-OSSPD_LDFLAGS := $(shell pkg-config --libs fuse)
+OSSPD_LDFLAGS := $(shell $(PKG_CONFIG) --libs fuse)
 endif
 
 ifeq "$(origin OSSP_PADSP_CFLAGS)" "undefined"
-OSSP_PADSP_CFLAGS := $(shell pkg-config --cflags libpulse)
+OSSP_PADSP_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpulse)
 endif
 
 ifeq "$(origin OSSP_PADSP_LDFLAGS)" "undefined"
-OSSP_PADSP_LDFLAGS := $(shell pkg-config --libs libpulse)
+OSSP_PADSP_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpulse)
 endif
 
 ifeq "$(origin OSSP_ALSAP_CFLAGS)" "undefined"
-OSSP_ALSAP_CFLAGS := $(shell pkg-config --libs alsa)
+OSSP_ALSAP_CFLAGS := $(shell $(PKG_CONFIG) --libs alsa)
 endif
 
 ifeq "$(origin OSSP_ALSAP_LDFLAGS)" "undefined"
-OSSP_ALSAP_LDFLAGS := $(shell pkg-config --libs alsa)
+OSSP_ALSAP_LDFLAGS := $(shell $(PKG_CONFIG) --libs alsa)
 endif
 
 headers := ossp.h ossp-util.h ossp-slave.h