On Fri, Oct 27, 2017 at 10:06 AM, Helmut Grohne <hel...@subdivi.de> wrote:
> xosview fails to cross build from source, because it builds for the
> build architecture:
>  * The upstream build system defaults to the build architecture compiler
>    and the packaging fails to pass cross compilers. dh_auto_build fixes
>    that.
>  * The packaging sets PLATFORM according to the build architecture,
>    while it should be evaluating the host architecture.
>  * The upstream build system determines its $(ARCH) from uname, which is
>    a build architecture property and needs to be overriden by
>    debian/rules.
>
> After fixing all of the above, xosview cross builds successfully. Please
> consider applying the attached patch.

Thanks for the patch!

With this patch, xosview fails to build on amd64. I have not yet look
into details yet.

Log:

g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/pagemeter.o linux/pagemeter.cc
g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/raidmeter.o linux/raidmeter.cc
g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/serialmeter.o linux/serialmete
r.cc
g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/swapmeter.o linux/swapmeter.cc
g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/wirelessmeter.o linux/wireless
meter.cc
g++ -g -O2 -fdebug-prefix-map=/build/xosview-1.19=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wall -O3 -I. -MMD -Ilinux/  -c -o
linux/acpitemp.o linux/acpitemp.cc
g++ -Wl,-z,relro -o xosview Host.o Xrm.o bitfieldmeter.o bitmeter.o
defaultstring.o fieldmeter.o fieldmeterdecay.o fieldmetergraph.o
llist.o main.o meter.o xosview.o xwin.o sensorfieldmeter.o
linux/MeterMaker.o li
nux/btrymeter.o linux/cpumeter.o linux/diskmeter.o linux/intmeter.o
linux/intratemeter.o linux/lmstemp.o linux/loadmeter.o
linux/memmeter.o linux/netmeter.o linux/nfsmeter.o linux/pagemeter.o
linux/raidmeter.o lin
ux/serialmeter.o linux/swapmeter.o linux/wirelessmeter.o
linux/acpitemp.o -lX11 -lXpm -lm
linux/MeterMaker.o: In function `MeterMaker::makeMeters()':
./linux/MeterMaker.cc:169: undefined reference to `CoreTemp::countCpus()'
./linux/MeterMaker.cc:199: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
./linux/MeterMaker.cc:172: undefined reference to
`CoreTemp::countCores(unsigned int)'
./linux/MeterMaker.cc:184: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
./linux/MeterMaker.cc:184: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
./linux/MeterMaker.cc:184: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
./linux/MeterMaker.cc:192: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
./linux/MeterMaker.cc:192: undefined reference to
`CoreTemp::CoreTemp(XOSView*, char const*, char const*, int, int)'
linux/MeterMaker.o:./linux/MeterMaker.cc:199: more undefined
references to `CoreTemp::CoreTemp(XOSView*, char const*, char const*,
int, int)' follow
collect2: error: ld returned 1 exit status
Makefile:128: recipe for target 'xosview' failed
make[1]: *** [xosview] Error 1
make[1]: Leaving directory '/build/xosview-1.19'
dh_auto_build: make -j1 PLATFORM=linux ARCH=amd64 returned exit code 2
debian/rules:26: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
I: copying local configuration
E: Failed autobuilding of package
I: unmounting dev/pts filesystem
I: unmounting dev/shm filesystem
I: unmounting proc filesystem
I: unmounting sys filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//16147 and its subdirectories
gbp:error: 'pdebuild --debbuildopts "-uc -us"' failed: it exited with 1

-- 
Kartik Mistry | IRC: kart_
{0x1f1f, kartikm}.wordpress.com

Reply via email to