joerg-krause writes
Build fails when cross-compiling in a sysroot environment:
/usr/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I./src -DDEBUG -g -Wall -I/usr/include/libupnpp -I./src -DDATADIR=\"/usr/share/upmpdcli\" -DCONFIGDIR=\"/etc\" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o src/mpdcli.o src/mpdcli.cxx
/usr/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I./src -DDEBUG -g -Wall -I/usr/include/libupnpp -I./src -DDATADIR=\"/usr/share/upmpdcli\" -DCONFIGDIR=\"/etc\" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o src/netcon.o src/netcon.cpp
/host/usr/bin/arm-none-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I./src -DDEBUG -g -Wall -I/usr/include/libupnpp -I./src -DDATADIR=\"/usr/share/upmpdcli\" -DCONFIGDIR=\"/etc\" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o src/ohinfo.o src/ohinfo.cxx
arm-none-linux-gnueabi-g++: ERROR: unsafe header/library path used in cross-compilation: '/usr/include/libupnpp'
Note that the arm-none-linux-gnueabi-g is actually a wrapper which adds the sysroot path and other compiler/linker flags to the real cross-g and aborts compilation if host library/header paths are passed.
Note that prefix=/usr
in a sysroot environment, too.