Comment 2 for bug 15441

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 12 Apr 2005 20:04:25 -0700
From: Ryan Murray <email address hidden>
To: <email address hidden>
Subject: tspc_2.1.1-4(mips/unstable): FTBFS with -rsudo

Package: tspc
Version: 2.1.1-4
Severity: serious

There was an error while trying to autobuild your package:

> Automatic build of tspc_2.1.1-4 on resume.rfc822.org by sbuild/mips 1.170.5
> Build started at 20050312-0402

[...]

> ** Using build dependencies supplied by package:
> Build-Depends: cdbs, debhelper (>= 4.1.68), quilt

[...]

> gcc -g -Wall -O2 -I../../include -I../../platform/linux -c xml_tun.c -o ../../objs/xml_tun.o -Dlinux
> make[2]: Leaving directory `/build/buildd/tspc-2.1.1/src/xml'
> make[2]: Entering directory `/build/buildd/tspc-2.1.1/platform/linux'
> gcc -g -Wall -O2 -I../../include -I../../platform/linux -c tsp_local.c -o ../../objs/tsp_local.o -Dlinux
> tsp_local.c: In function `tspStartLocal':
> tsp_local.c:144: warning: `tunfd' might be used uninitialized in this function
> gcc -g -Wall -O2 -I../../include -I../../platform/linux -c tsp_tun.c -o ../../objs/tsp_tun.o -Dlinux
> gcc -g -Wall -O2 -o ../../bin/tspc ../../objs/*.o
> /usr/bin/ld: cannot open output file ../../bin/tspc: Permission denied
> collect2: ld returned 1 exit status
> make[2]: *** [../../bin/tspc] Error 1
> make[2]: Leaving directory `/build/buildd/tspc-2.1.1/platform/linux'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory `/build/buildd/tspc-2.1.1'
> make: *** [debian/stamp-makefile-build] Error 2

This package fails to build from source on any architecture with the
following command as a regular user with sudo permissions:

dpkg-buildpackage -uc -us -B -rsudo

This is caused by creating files or directories in the clean target of
debian/rules, which runs as root, and then attempting to do things to
those files in the build target, which runs as the regular user. To
fix, don't create files or directories in the clean target of debian/rules.

In this case, you're creating the bin directory in the clean target.