On Fri, Oct 25, 2019 at 01:52:31AM +0100, Olly Betts wrote:
> I'll try to sort out my chroots over the weekend, but meanwhile if you
> can get somebody else to sponsor please go for it.

I've rebuilt my build chroots in a larger partition.

However, then the build fails for me running tests using ccache - the
problem is that $HOME is /sbuild-nonexistent under sbuild, which
doesn't exist, and cache tries to create its cache under $HOME/.ccache
by default.

Debian policy says:

| Secondly, required targets may write to
| "/tmp", "/var/tmp" and to the directory specified by the "TMPDIR"
| environment variable, but must not depend on the contents of any of
| these.
|
| This restriction is intended to prevent source package builds creating
| and depending on state outside of themselves, thus affecting multiple
| independent rebuilds.  In particular, the required targets must not
| attempt to write into "HOME".

So the package build really shouldn't assume it can write under the home
directory.

If I add this to debian/rules that avoids that problem:

export CCACHE_DIR=/tmp/ccache

But I still see a number of test failures (sorry about the unhelpful
wrapping):

[58/75] Generating MesonDep2-1.0.gir with a custom command.
FAILED: gir/dep1/dep2/MesonDep2-1.0.gir
/usr/bin/g-ir-scanner -pthread -I/usr/include/gobject-introspection-1.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
--no-libtool --namespace=MesonDep2 --nsversion=1.0 --warn-all --output
gir/dep1/dep2/MesonDep2-1.0.gir '-I/<<PKGBUILDDIR>>/test
cases/frameworks/7 gnome/gir/dep1/dep2'
-I/<<PKGBUILDDIR>>/tmpuyjyogvd/gir/dep1/dep2
--filelist=/<<PKGBUILDDIR>>/tmpuyjyogvd/gir/dep1/dep2/7cbf35a@@dep2lib@sha/MesonDep2_1.0_gir_filelist
--include=GObject-2.0 --symbol-prefix=meson --identifier-prefix=Meson
--cflags-begin -DMESON_TEST -fsanitize=address -fno-omit-frame-pointer
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
--cflags-end -lasan --library dep2lib
-L/<<PKGBUILDDIR>>/tmpuyjyogvd/gir/dep1/dep2 --extra-library=gobject-2.0
--extra-library=glib-2.0 --sources-top-dirs '/<<PKGBUILDDIR>>/test
cases/frameworks/7 gnome/subprojects/' --sources-top-dirs
/<<PKGBUILDDIR>>/tmpuyjyogvd/subprojects/
g-ir-scanner: link: x86_64-linux-gnu-gcc -pthread -o
/<<PKGBUILDDIR>>/tmpuyjyogvd/tmp-introspect8x4pya0_/MesonDep2-1.0
/<<PKGBUILDDIR>>/tmpuyjyogvd/tmp-introspect8x4pya0_/MesonDep2-1.0.o -L.
-Wl,-rpath,. -Wl,--no-as-needed
-L/<<PKGBUILDDIR>>/tmpuyjyogvd/gir/dep1/dep2
-Wl,-rpath,/<<PKGBUILDDIR>>/tmpuyjyogvd/gir/dep1/dep2 -lasan -ldep2lib
-lgobject-2.0 -lglib-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic
-lgmodule-2.0 -pthread -lglib-2.0
==19640==ASan runtime does not come first in initial library list; you
should either link runtime to your application or manually preload it
with LD_PRELOAD.
Command
'['/<<PKGBUILDDIR>>/tmpuyjyogvd/tmp-introspect8x4pya0_/MesonDep2-1.0',
'--introspect-dump=/<<PKGBUILDDIR>>/tmpuyjyogvd/tmp-introspect8x4pya0_/functions.txt,/<<PKGBUILDDIR>>/tmpuyjyogvd/tmp-introspect8x4pya0_/dump.xml']'
returned non-zero exit status 1.

(that seems to occur twice?!)

[1/4] ccache cc -Ivalaprog@exe -I. '-I../test cases/failing build/1 vala
c werror' -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=always
-pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -g -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ
'valaprog@exe/unused-var.c.o' -MF 'valaprog@exe/unused-var.c.o.d' -o
'valaprog@exe/unused-var.c.o' -c '../test cases/failing build/1 vala c
werror/unused-var.c'
FAILED: valaprog@exe/unused-var.c.o 
ccache cc -Ivalaprog@exe -I. '-I../test cases/failing build/1 vala c
werror' -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=always
-pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -g -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ
'valaprog@exe/unused-var.c.o' -MF 'valaprog@exe/unused-var.c.o.d' -o
'valaprog@exe/unused-var.c.o' -c '../test cases/failing build/1 vala c
werror/unused-var.c'
../test cases/failing build/1 vala c werror/unused-var.c:1:2: error:
#warning "something" [-Werror=cpp]
    1 | #warning "something"
          |  ^~~~~~~
          ../test cases/failing build/1 vala c werror/unused-var.c: In
          function ‘somelib’:
          ../test cases/failing build/1 vala c werror/unused-var.c:6:7:
          error: unused variable ‘unused_var’ [-Werror=unused-variable]
              6 |   int unused_var;
                    |       ^~~~~~~~~~
                    cc1: all warnings being treated as errors

[5/5] cc  -o bobuser 'bobuser@exe/bobuser.c.o' -Wl,--as-needed
-Wl,--no-undefined -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro
-Wl,--start-group libbob.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/'
'-Wl,-rpath-link,/<<PKGBUILDDIR>>/b 52a78b9866/'
FAILED: bobuser 
cc  -o bobuser 'bobuser@exe/bobuser.c.o' -Wl,--as-needed
-Wl,--no-undefined -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro
-Wl,--start-group libbob.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/'
'-Wl,-rpath-link,/<<PKGBUILDDIR>>/b 52a78b9866/'
/usr/bin/ld: bobuser@exe/bobuser.c.o: in function `main':
./b 52a78b9866/../test cases/failing build/2 hidden symbol/bobuser.c:4:
undefined reference to `hidden_function'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

[1/2] ccache cc -Ic/2e7d2c0@@prog@exe -Ic '-I../test cases/failing
build/3 pch disabled/c' -fdiagnostics-color=always -pipe
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ
'c/2e7d2c0@@prog@exe/prog.c.o' -MF 'c/2e7d2c0@@prog@exe/prog.c.o.d' -o
'c/2e7d2c0@@prog@exe/prog.c.o' -c '../test cases/failing build/3 pch
disabled/c/prog.c'
FAILED: c/2e7d2c0@@prog@exe/prog.c.o
ccache cc -Ic/2e7d2c0@@prog@exe -Ic '-I../test cases/failing build/3 pch
disabled/c' -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
-Wall -Winvalid-pch -g -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -MD -MQ 'c/2e7d2c0@@prog@exe/prog.c.o' -MF
'c/2e7d2c0@@prog@exe/prog.c.o.d' -o 'c/2e7d2c0@@prog@exe/prog.c.o' -c
'../test cases/failing build/3 pch disabled/c/prog.c'
../test cases/failing build/3 pch disabled/c/prog.c: In function ‘func’:
../test cases/failing build/3 pch disabled/c/prog.c:4:5: warning:
implicit declaration of function ‘fprintf’
[-Wimplicit-function-declaration]
    4 |     fprintf(stdout, "This is a function that fails if stdio is
    not #included.\n");
          |     ^~~~~~~
          ../test cases/failing build/3 pch disabled/c/prog.c:4:5:
          warning: incompatible implicit declaration of built-in
          function ‘fprintf’
          ../test cases/failing build/3 pch disabled/c/prog.c:1:1: note:
          include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
            +++ |+#include <stdio.h>
                1 | // No includes here, they need to come from the PCH
                ../test cases/failing build/3 pch
                disabled/c/prog.c:4:13: error: ‘stdout’ undeclared
                (first use in this function)
                    4 |     fprintf(stdout, "This is a function that
                    fails if stdio is not #included.\n");
                          |             ^~~~~~
                          ../test cases/failing build/3 pch
                          disabled/c/prog.c:4:13: note: ‘stdout’ is
                          defined in header ‘<stdio.h>’; did you forget
                          to ‘#include <stdio.h>’?
                          ../test cases/failing build/3 pch
                          disabled/c/prog.c:4:13: note: each undeclared
                          identifier is reported only once for each
                          function it appears in
                          ninja: build stopped: subcommand failed.

[2/3] /usr/bin/arachne-pnr -q -d 1k -p '../test cases/fpga/1
simple/spin.pcf' spin.blif -o spin.asc
FAILED: spin.asc 
/usr/bin/arachne-pnr -q -d 1k -p '../test cases/fpga/1 simple/spin.pcf'
spin.blif -o spin.asc
spin.blif:50: fatal error: invalid formal-actual
ninja: build stopped: subcommand failed.

(that also seems to occur twice)

Any idea what's going on with these?

Cheers,
    Olly

Reply via email to