{"action":"created","issue":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/1868","labels_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/1868/labels{/name}","comments_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/1868/comments","events_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/1868/events","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1868","id":38244859,"number":1868,"title":"Compiling on Raspberry Pi","user":{"login":"zeitkunst","id":272601,"avatar_url":"https://avatars.githubusercontent.com/u/272601?v=3","gravatar_id":"","url":"https://api.github.com/users/zeitkunst","html_url":"https://github.com/zeitkunst","followers_url":"https://api.github.com/users/zeitkunst/followers","following_url":"https://api.github.com/users/zeitkunst/following{/other_user}","gists_url":"https://api.github.com/users/zeitkunst/gists{/gist_id}","starred_url":"https://api.github.com/users/zeitkunst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeitkunst/subscriptions","organizations_url":"https://api.github.com/users/zeitkunst/orgs","repos_url":"https://api.github.com/users/zeitkunst/repos","events_url":"https://api.github.com/users/zeitkunst/events{/privacy}","received_events_url":"https://api.github.com/users/zeitkunst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2014-07-19T21:06:33Z","updated_at":"2015-10-27T20:28:11Z","closed_at":null,"body":"Opening a new issue, rather than responding to the closed one (https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1657).\r\n\r\nI'm trying to get wkhtmltopdf compiled on the Pi, and I'm very close. But I'm encountering an error when I try and build libwkhtmltox.so.0.12.2. At the step when it is running the makefile in wkhtmltopdf/static-build/posix-local/app/src/lib, I'm receiving the following, strange, linker error:\r\n\r\n'.LTHUNK0' referenced in section '.text._ZN15QGraphicsObjectD1EV[QGraphicsObject::~QGraphicsObject()]’ of /home/pi/wkhtmltopdf/static-build/posix-local/qt/lib/libQtGui.a(qgraphicsitem.o): defined in discarded section ‘.text._ZN15QGraphicsObjectsD2Ev[_ZN15QGraphicsObjectD5Ev]’ of /home/pi/wkhtmltopdf/static-build/posix-local/qt/lib/libQtGui.a(qgraphicsitem.o)\r\n\r\nThe only thing I’ve been able to find out about this kind of error is that it possibly has to do with the library link order.\r\n\r\nThe full command is:\r\n\r\nmake[1]: Entering directory ‘/home/pi/wkhtmltopdf/static-build/posix-local/app/src/lib’\r\nrm -f libwkhtmltox.so.0.12.2 libwkhtmltox.so libwkhtmltox.so.0 libwkhtmltox.so.0.12\r\ng++ -Wl,-O1 -shared -Wl,-soname,libwkhtmltox.so.0 -o libwkhtmltox.so.0.12.2 loadsettings.o multipageloader.o tempfile.o converter.o websettings.o reflect.o utilities.o pdfsettings.o pdfconverter.o outline.o tocstylesheet.o imagesettings.o imageconverter.o pdf_c_bindings.o image_c_bindings.o moc_multipageloader.o moc_utilities.o moc_pdfconverter.o moc_imageconverter.o qrc_wkhtmltopdf.o -L/home/pi/wkhtmltopdf/static-build/posix-local/qt/lib -L/home/pi/wkhtmltopdf/static-build/posix-local/qt/plugins/codecs -lqcncodecs -L/home/pi/wkhtmltopdf/static-build/posix-local/qt/lib -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -L/usr/X11R6/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lQtSvg -lQtXmlPatterns -lQtGui -ljpeg -lpng -lXrender -lfontconfig -lfreetype -lXext -lX11 -lQtNetwork -lQtCore -lz lm -ldl -lrt -lpthread\r\n\r\ngcc version 4.6.3 (Debian 4.6.3-14+rpi1)\r\n\r\nI was running out of memory when linking, but I ought to have enough swap space now to work (the swap is not exhausted when the linker is running)\r\n\r\nThanks for any help!"},"comment":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/comments/151634147","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1868#issuecomment-151634147","issue_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/1868","id":151634147,"user":{"login":"tobias-hammerschmidt","id":2543259,"avatar_url":"https://avatars.githubusercontent.com/u/2543259?v=3","gravatar_id":"","url":"https://api.github.com/users/tobias-hammerschmidt","html_url":"https://github.com/tobias-hammerschmidt","followers_url":"https://api.github.com/users/tobias-hammerschmidt/followers","following_url":"https://api.github.com/users/tobias-hammerschmidt/following{/other_user}","gists_url":"https://api.github.com/users/tobias-hammerschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/tobias-hammerschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobias-hammerschmidt/subscriptions","organizations_url":"https://api.github.com/users/tobias-hammerschmidt/orgs","repos_url":"https://api.github.com/users/tobias-hammerschmidt/repos","events_url":"https://api.github.com/users/tobias-hammerschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/tobias-hammerschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T20:28:10Z","updated_at":"2015-10-27T20:28:10Z","body":"I can give some rough sketch which might act as a base for proper reproducible builds.\r\n\r\nHost system\r\n---------------\r\nI've cross-compiled `wkhtmltopdf` on a Fedora 22 64bit. You'll need to install some packages for development (unix tools like sed and so on, gcc, bison, flex, ...) - the dependencies in the `build.py` script can be used as a reference.\r\n\r\nCross compiler\r\n-------------------\r\nThe cross compiler can be build using [crosstools-ng](https://github.com/crosstool-ng/crosstool-ng). I've used git revision https://github.com/crosstool-ng/crosstool-ng/commit/8433e9914d33e26d3cc1afd789d3803d3fbb6207. The target environment (gcc version, glibc version, ...) was based on the package versions available in Raspbian (Jessie). This is my toolchain config:\r\n\r\n```sh\r\n#\r\n# Automatically generated file; DO NOT EDIT.\r\n# Crosstool-NG Configuration\r\n#\r\nCT_CONFIGURE_has_xz=y\r\nCT_CONFIGURE_has_cvs=y\r\nCT_CONFIGURE_has_svn=y\r\nCT_MODULES=y\r\n\r\n#\r\n# Paths and misc options\r\n#\r\n\r\n#\r\n# crosstool-NG behavior\r\n#\r\n# CT_OBSOLETE is not set\r\n# CT_EXPERIMENTAL is not set\r\n# CT_DEBUG_CT is not set\r\n\r\n#\r\n# Paths\r\n#\r\nCT_LOCAL_TARBALLS_DIR=\"${HOME}/src\"\r\nCT_SAVE_TARBALLS=y\r\nCT_WORK_DIR=\"${CT_TOP_DIR}/.build\"\r\nCT_PREFIX_DIR=\"${HOME}/x-tools/${CT_TARGET}\"\r\nCT_INSTALL_DIR=\"${CT_PREFIX_DIR}\"\r\nCT_RM_RF_PREFIX_DIR=y\r\nCT_REMOVE_DOCS=y\r\nCT_INSTALL_DIR_RO=y\r\nCT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y\r\n\r\n#\r\n# Downloading\r\n#\r\n# CT_FORBID_DOWNLOAD is not set\r\n# CT_FORCE_DOWNLOAD is not set\r\nCT_CONNECT_TIMEOUT=10\r\n# CT_ONLY_DOWNLOAD is not set\r\n# CT_USE_MIRROR is not set\r\n\r\n#\r\n# Extracting\r\n#\r\n# CT_FORCE_EXTRACT is not set\r\nCT_OVERIDE_CONFIG_GUESS_SUB=y\r\n# CT_ONLY_EXTRACT is not set\r\nCT_PATCH_BUNDLED=y\r\n# CT_PATCH_LOCAL is not set\r\n# CT_PATCH_BUNDLED_LOCAL is not set\r\n# CT_PATCH_LOCAL_BUNDLED is not set\r\n# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set\r\n# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set\r\n# CT_PATCH_NONE is not set\r\nCT_PATCH_ORDER=\"bundled\"\r\n\r\n#\r\n# Build behavior\r\n#\r\nCT_PARALLEL_JOBS=4\r\nCT_LOAD=\"\"\r\nCT_USE_PIPES=y\r\nCT_EXTRA_CFLAGS_FOR_BUILD=\"\"\r\nCT_EXTRA_LDFLAGS_FOR_BUILD=\"\"\r\nCT_EXTRA_CFLAGS_FOR_HOST=\"\"\r\nCT_EXTRA_LDFLAGS_FOR_HOST=\"\"\r\n# CT_CONFIG_SHELL_SH is not set\r\n# CT_CONFIG_SHELL_ASH is not set\r\nCT_CONFIG_SHELL_BASH=y\r\n# CT_CONFIG_SHELL_CUSTOM is not set\r\nCT_CONFIG_SHELL=\"${bash}\"\r\n\r\n#\r\n# Logging\r\n#\r\n# CT_LOG_ERROR is not set\r\n# CT_LOG_WARN is not set\r\n# CT_LOG_INFO is not set\r\nCT_LOG_EXTRA=y\r\n# CT_LOG_ALL is not set\r\n# CT_LOG_DEBUG is not set\r\nCT_LOG_LEVEL_MAX=\"EXTRA\"\r\n# CT_LOG_SEE_TOOLS_WARN is not set\r\nCT_LOG_PROGRESS_BAR=y\r\nCT_LOG_TO_FILE=y\r\nCT_LOG_FILE_COMPRESS=y\r\n\r\n#\r\n# Target options\r\n#\r\nCT_ARCH=\"arm\"\r\nCT_ARCH_SUPPORTS_BOTH_MMU=y\r\nCT_ARCH_SUPPORTS_BOTH_ENDIAN=y\r\nCT_ARCH_SUPPORTS_32=y\r\nCT_ARCH_SUPPORTS_64=y\r\nCT_ARCH_SUPPORTS_WITH_ARCH=y\r\nCT_ARCH_SUPPORTS_WITH_CPU=y\r\nCT_ARCH_SUPPORTS_WITH_TUNE=y\r\nCT_ARCH_SUPPORTS_WITH_FLOAT=y\r\nCT_ARCH_SUPPORTS_WITH_FPU=y\r\nCT_ARCH_SUPPORTS_SOFTFP=y\r\nCT_ARCH_DEFAULT_HAS_MMU=y\r\nCT_ARCH_DEFAULT_LE=y\r\nCT_ARCH_DEFAULT_32=y\r\nCT_ARCH_CPU=\"arm1176jzf-s\"\r\nCT_ARCH_FPU=\"vfp\"\r\n# CT_ARCH_BE is not set\r\nCT_ARCH_LE=y\r\nCT_ARCH_32=y\r\n# CT_ARCH_64 is not set\r\nCT_ARCH_BITNESS=32\r\nCT_ARCH_FLOAT_HW=y\r\n# CT_ARCH_FLOAT_SW is not set\r\nCT_TARGET_CFLAGS=\"\"\r\nCT_TARGET_LDFLAGS=\"\"\r\n# CT_ARCH_alpha is not set\r\nCT_ARCH_arm=y\r\n# CT_ARCH_avr is not set\r\n# CT_ARCH_avr32 is not set\r\n# CT_ARCH_blackfin is not set\r\n# CT_ARCH_m68k is not set\r\n# CT_ARCH_mips is not set\r\n# CT_ARCH_nios2 is not set\r\n# CT_ARCH_powerpc is not set\r\n# CT_ARCH_s390 is not set\r\n# CT_ARCH_sh is not set\r\n# CT_ARCH_sparc is not set\r\n# CT_ARCH_x86 is not set\r\nCT_ARCH_alpha_AVAILABLE=y\r\nCT_ARCH_arm_AVAILABLE=y\r\nCT_ARCH_avr_AVAILABLE=y\r\nCT_ARCH_avr32_AVAILABLE=y\r\nCT_ARCH_blackfin_AVAILABLE=y\r\nCT_ARCH_m68k_AVAILABLE=y\r\nCT_ARCH_microblaze_AVAILABLE=y\r\nCT_ARCH_mips_AVAILABLE=y\r\nCT_ARCH_nios2_AVAILABLE=y\r\nCT_ARCH_powerpc_AVAILABLE=y\r\nCT_ARCH_s390_AVAILABLE=y\r\nCT_ARCH_sh_AVAILABLE=y\r\nCT_ARCH_sparc_AVAILABLE=y\r\nCT_ARCH_x86_AVAILABLE=y\r\nCT_ARCH_SUFFIX=\"v6\"\r\n\r\n#\r\n# Generic target options\r\n#\r\n# CT_MULTILIB is not set\r\nCT_ARCH_USE_MMU=y\r\nCT_ARCH_ENDIAN=\"little\"\r\n\r\n#\r\n# Target optimisations\r\n#\r\n# CT_ARCH_FLOAT_AUTO is not set\r\n# CT_ARCH_FLOAT_SOFTFP is not set\r\nCT_ARCH_FLOAT=\"hard\"\r\n\r\n#\r\n# arm other options\r\n#\r\nCT_ARCH_ARM_MODE=\"arm\"\r\nCT_ARCH_ARM_MODE_ARM=y\r\n# CT_ARCH_ARM_MODE_THUMB is not set\r\n# CT_ARCH_ARM_INTERWORKING is not set\r\nCT_ARCH_ARM_EABI_FORCE=y\r\nCT_ARCH_ARM_EABI=y\r\nCT_ARCH_ARM_TUPLE_USE_EABIHF=y\r\n\r\n#\r\n# Toolchain options\r\n#\r\n\r\n#\r\n# General toolchain options\r\n#\r\nCT_FORCE_SYSROOT=y\r\nCT_USE_SYSROOT=y\r\nCT_SYSROOT_NAME=\"sysroot\"\r\nCT_SYSROOT_DIR_PREFIX=\"\"\r\nCT_WANTS_STATIC_LINK=y\r\n# CT_STATIC_TOOLCHAIN is not set\r\nCT_TOOLCHAIN_PKGVERSION=\"\"\r\nCT_TOOLCHAIN_BUGURL=\"\"\r\n\r\n#\r\n# Tuple completion and aliasing\r\n#\r\nCT_TARGET_VENDOR=\"rpi\"\r\nCT_TARGET_ALIAS_SED_EXPR=\"\"\r\nCT_TARGET_ALIAS=\"\"\r\n\r\n#\r\n# Toolchain type\r\n#\r\nCT_CROSS=y\r\n# CT_CANADIAN is not set\r\nCT_TOOLCHAIN_TYPE=\"cross\"\r\n\r\n#\r\n# Build system\r\n#\r\nCT_BUILD=\"\"\r\nCT_BUILD_PREFIX=\"\"\r\nCT_BUILD_SUFFIX=\"\"\r\n\r\n#\r\n# Misc options\r\n#\r\n# CT_TOOLCHAIN_ENABLE_NLS is not set\r\n\r\n#\r\n# Operating System\r\n#\r\nCT_KERNEL_SUPPORTS_SHARED_LIBS=y\r\nCT_KERNEL=\"linux\"\r\nCT_KERNEL_VERSION=\"3.12.47\"\r\n# CT_KERNEL_bare_metal is not set\r\nCT_KERNEL_linux=y\r\nCT_KERNEL_bare_metal_AVAILABLE=y\r\nCT_KERNEL_linux_AVAILABLE=y\r\n# CT_KERNEL_V_4_2 is not set\r\n# CT_KERNEL_V_4_1 is not set\r\n# CT_KERNEL_V_3_18 is not set\r\n# CT_KERNEL_V_3_14 is not set\r\nCT_KERNEL_V_3_12=y\r\n# CT_KERNEL_V_3_10 is not set\r\n# CT_KERNEL_V_3_4 is not set\r\n# CT_KERNEL_V_3_2 is not set\r\n# CT_KERNEL_V_2_6_32 is not set\r\n# CT_KERNEL_LINUX_CUSTOM is not set\r\nCT_KERNEL_windows_AVAILABLE=y\r\n\r\n#\r\n# Common kernel options\r\n#\r\nCT_SHARED_LIBS=y\r\n\r\n#\r\n# linux other options\r\n#\r\nCT_KERNEL_LINUX_VERBOSITY_0=y\r\n# CT_KERNEL_LINUX_VERBOSITY_1 is not set\r\n# CT_KERNEL_LINUX_VERBOSITY_2 is not set\r\nCT_KERNEL_LINUX_VERBOSE_LEVEL=0\r\nCT_KERNEL_LINUX_INSTALL_CHECK=y\r\n\r\n#\r\n# Binary utilities\r\n#\r\nCT_ARCH_BINFMT_ELF=y\r\nCT_BINUTILS=\"binutils\"\r\nCT_BINUTILS_binutils=y\r\n\r\n#\r\n# GNU binutils\r\n#\r\n# CT_CC_BINUTILS_SHOW_LINARO is not set\r\n# CT_BINUTILS_V_2_25_1 is not set\r\nCT_BINUTILS_V_2_25=y\r\n# CT_BINUTILS_V_2_24 is not set\r\n# CT_BINUTILS_V_2_23_2 is not set\r\n# CT_BINUTILS_V_2_23_1 is not set\r\n# CT_BINUTILS_V_2_22 is not set\r\n# CT_BINUTILS_V_2_21_53 is not set\r\n# CT_BINUTILS_V_2_21_1a is not set\r\n# CT_BINUTILS_V_2_20_1a is not set\r\n# CT_BINUTILS_V_2_19_1a is not set\r\n# CT_BINUTILS_V_2_18a is not set\r\nCT_BINUTILS_VERSION=\"2.25\"\r\nCT_BINUTILS_2_25_or_later=y\r\nCT_BINUTILS_2_24_or_later=y\r\nCT_BINUTILS_2_23_or_later=y\r\nCT_BINUTILS_2_22_or_later=y\r\nCT_BINUTILS_2_21_or_later=y\r\nCT_BINUTILS_2_20_or_later=y\r\nCT_BINUTILS_2_19_or_later=y\r\nCT_BINUTILS_2_18_or_later=y\r\nCT_BINUTILS_HAS_HASH_STYLE=y\r\nCT_BINUTILS_HAS_GOLD=y\r\nCT_BINUTILS_GOLD_SUPPORTS_ARCH=y\r\nCT_BINUTILS_HAS_PLUGINS=y\r\nCT_BINUTILS_HAS_PKGVERSION_BUGURL=y\r\nCT_BINUTILS_FORCE_LD_BFD=y\r\n# CT_BINUTILS_LINKER_LD is not set\r\nCT_BINUTILS_LINKER_LD_GOLD=y\r\n# CT_BINUTILS_LINKER_GOLD_LD is not set\r\nCT_BINUTILS_GOLD_INSTALLED=y\r\nCT_BINUTILS_GOLD_THREADS=y\r\nCT_BINUTILS_LINKER_BOTH=y\r\nCT_BINUTILS_LINKERS_LIST=\"ld,gold\"\r\nCT_BINUTILS_LD_WRAPPER=y\r\nCT_BINUTILS_LINKER_DEFAULT=\"bfd\"\r\nCT_BINUTILS_PLUGINS=y\r\nCT_BINUTILS_EXTRA_CONFIG_ARRAY=\"\"\r\n# CT_BINUTILS_FOR_TARGET is not set\r\n\r\n#\r\n# binutils other options\r\n#\r\n\r\n#\r\n# C-library\r\n#\r\nCT_LIBC=\"glibc\"\r\nCT_LIBC_VERSION=\"2.19\"\r\nCT_LIBC_glibc=y\r\n# CT_LIBC_musl is not set\r\n# CT_LIBC_uClibc is not set\r\nCT_LIBC_avr_libc_AVAILABLE=y\r\nCT_LIBC_glibc_AVAILABLE=y\r\nCT_THREADS=\"nptl\"\r\n# CT_CC_GLIBC_SHOW_LINARO is not set\r\n# CT_LIBC_GLIBC_V_2_22 is not set\r\n# CT_LIBC_GLIBC_V_2_21 is not set\r\n# CT_LIBC_GLIBC_V_2_20 is not set\r\nCT_LIBC_GLIBC_V_2_19=y\r\n# CT_LIBC_GLIBC_V_2_18 is not set\r\n# CT_LIBC_GLIBC_V_2_17 is not set\r\n# CT_LIBC_GLIBC_V_2_16_0 is not set\r\n# CT_LIBC_GLIBC_V_2_15 is not set\r\n# CT_LIBC_GLIBC_V_2_14_1 is not set\r\n# CT_LIBC_GLIBC_V_2_14 is not set\r\n# CT_LIBC_GLIBC_V_2_13 is not set\r\n# CT_LIBC_GLIBC_V_2_12_2 is not set\r\n# CT_LIBC_GLIBC_V_2_12_1 is not set\r\n# CT_LIBC_GLIBC_V_2_11_1 is not set\r\n# CT_LIBC_GLIBC_V_2_11 is not set\r\n# CT_LIBC_GLIBC_V_2_10_1 is not set\r\n# CT_LIBC_GLIBC_V_2_9 is not set\r\n# CT_LIBC_GLIBC_V_2_8 is not set\r\nCT_LIBC_GLIBC_2_17_or_later=y\r\nCT_LIBC_mingw_AVAILABLE=y\r\nCT_LIBC_musl_AVAILABLE=y\r\nCT_LIBC_newlib_AVAILABLE=y\r\nCT_LIBC_none_AVAILABLE=y\r\nCT_LIBC_uClibc_AVAILABLE=y\r\nCT_LIBC_SUPPORT_THREADS_ANY=y\r\nCT_LIBC_SUPPORT_THREADS_NATIVE=y\r\n\r\n#\r\n# Common C library options\r\n#\r\nCT_THREADS_NATIVE=y\r\nCT_LIBC_XLDD=y\r\n\r\n#\r\n# glibc other options\r\n#\r\n# CT_LIBC_GLIBC_PORTS_EXTERNAL is not set\r\nCT_LIBC_GLIBC_MAY_FORCE_PORTS=y\r\nCT_LIBC_glibc_familly=y\r\nCT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY=\"\"\r\nCT_LIBC_GLIBC_CONFIGPARMS=\"\"\r\nCT_LIBC_GLIBC_EXTRA_CFLAGS=\"\"\r\nCT_LIBC_EXTRA_CC_ARGS=\"\"\r\n# CT_LIBC_DISABLE_VERSIONING is not set\r\nCT_LIBC_OLDEST_ABI=\"\"\r\nCT_LIBC_GLIBC_FORCE_UNWIND=y\r\nCT_LIBC_GLIBC_USE_PORTS=y\r\nCT_LIBC_ADDONS_LIST=\"\"\r\n\r\n#\r\n# WARNING !!!                                            \r\n#\r\n\r\n#\r\n#   For glibc >= 2.8, it can happen that the tarballs    \r\n#\r\n\r\n#\r\n#   for the addons are not available for download.       \r\n#\r\n\r\n#\r\n#   If that happens, bad luck... Try a previous version  \r\n#\r\n\r\n#\r\n#   or try again later... :-(                            \r\n#\r\nCT_LIBC_LOCALES=y\r\n\r\n#\r\n# WARNING!                                                     \r\n#\r\n\r\n#\r\n#   The built locales will be usable if and only if the build  \r\n#\r\n\r\n#\r\n#   machine and the target:                                    \r\n#\r\n\r\n#\r\n#    - have the same endianness,                               \r\n#\r\n\r\n#\r\n#    - and have the same alignment requirements for uint32_t.  \r\n#\r\n\r\n#\r\n#   You will have to check by yourself (for now).              \r\n#\r\n# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set\r\n# CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS is not set\r\nCT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN=y\r\nCT_LIBC_GLIBC_MIN_KERNEL_VERSION=\"3.2.27\"\r\nCT_LIBC_GLIBC_MIN_KERNEL=\"3.2.27\"\r\n\r\n#\r\n# C compiler\r\n#\r\nCT_CC=\"gcc\"\r\nCT_CC_CORE_PASSES_NEEDED=y\r\nCT_CC_CORE_PASS_1_NEEDED=y\r\nCT_CC_CORE_PASS_2_NEEDED=y\r\nCT_CC_gcc=y\r\nCT_CC_GCC_SHOW_LINARO=y\r\n# CT_CC_GCC_V_5_2_0 is not set\r\n# CT_CC_GCC_V_5_1_0 is not set\r\n# CT_CC_GCC_V_linaro_4_9 is not set\r\n# CT_CC_GCC_V_4_9_3 is not set\r\nCT_CC_GCC_V_4_9_2=y\r\n# CT_CC_GCC_V_4_9_1 is not set\r\n# CT_CC_GCC_V_4_9_0 is not set\r\n# CT_CC_GCC_V_linaro_4_8 is not set\r\n# CT_CC_GCC_V_4_8_5 is not set\r\n# CT_CC_GCC_V_4_8_4 is not set\r\n# CT_CC_GCC_V_4_8_3 is not set\r\n# CT_CC_GCC_V_4_8_2 is not set\r\n# CT_CC_GCC_V_4_8_1 is not set\r\n# CT_CC_GCC_V_4_8_0 is not set\r\n# CT_CC_GCC_V_linaro_4_7 is not set\r\n# CT_CC_GCC_V_4_7_4 is not set\r\n# CT_CC_GCC_V_4_7_3 is not set\r\n# CT_CC_GCC_V_4_7_2 is not set\r\n# CT_CC_GCC_V_4_7_1 is not set\r\n# CT_CC_GCC_V_4_7_0 is not set\r\n# CT_CC_GCC_V_linaro_4_6 is not set\r\n# CT_CC_GCC_V_4_6_4 is not set\r\n# CT_CC_GCC_V_4_6_3 is not set\r\n# CT_CC_GCC_V_4_6_2 is not set\r\n# CT_CC_GCC_V_4_6_1 is not set\r\n# CT_CC_GCC_V_4_6_0 is not set\r\n# CT_CC_GCC_V_linaro_4_5 is not set\r\n# CT_CC_GCC_V_4_5_3 is not set\r\n# CT_CC_GCC_V_4_5_2 is not set\r\n# CT_CC_GCC_V_4_5_1 is not set\r\n# CT_CC_GCC_V_4_5_0 is not set\r\n# CT_CC_GCC_V_linaro_4_4 is not set\r\n# CT_CC_GCC_V_4_4_7 is not set\r\n# CT_CC_GCC_V_4_4_6 is not set\r\n# CT_CC_GCC_V_4_4_5 is not set\r\n# CT_CC_GCC_V_4_4_4 is not set\r\n# CT_CC_GCC_V_4_4_3 is not set\r\n# CT_CC_GCC_V_4_4_2 is not set\r\n# CT_CC_GCC_V_4_4_1 is not set\r\n# CT_CC_GCC_V_4_4_0 is not set\r\n# CT_CC_GCC_V_4_3_6 is not set\r\n# CT_CC_GCC_V_4_3_5 is not set\r\n# CT_CC_GCC_V_4_3_4 is not set\r\n# CT_CC_GCC_V_4_3_3 is not set\r\n# CT_CC_GCC_V_4_3_2 is not set\r\n# CT_CC_GCC_V_4_3_1 is not set\r\n# CT_CC_GCC_V_4_2_4 is not set\r\n# CT_CC_GCC_V_4_2_2 is not set\r\nCT_CC_GCC_4_2_or_later=y\r\nCT_CC_GCC_4_3_or_later=y\r\nCT_CC_GCC_4_4_or_later=y\r\nCT_CC_GCC_4_5_or_later=y\r\nCT_CC_GCC_4_6_or_later=y\r\nCT_CC_GCC_4_7_or_later=y\r\nCT_CC_GCC_4_8_or_later=y\r\nCT_CC_GCC_4_9=y\r\nCT_CC_GCC_4_9_or_later=y\r\nCT_CC_GCC_HAS_GRAPHITE=y\r\nCT_CC_GCC_USE_GRAPHITE=y\r\nCT_CC_GCC_HAS_LTO=y\r\nCT_CC_GCC_USE_LTO=y\r\nCT_CC_GCC_HAS_PKGVERSION_BUGURL=y\r\nCT_CC_GCC_HAS_BUILD_ID=y\r\nCT_CC_GCC_HAS_LNK_HASH_STYLE=y\r\nCT_CC_GCC_ENABLE_PLUGINS=y\r\nCT_CC_GCC_GOLD=y\r\nCT_CC_GCC_USE_GMP_MPFR=y\r\nCT_CC_GCC_USE_MPC=y\r\nCT_CC_GCC_HAS_LIBQUADMATH=y\r\nCT_CC_GCC_HAS_LIBSANITIZER=y\r\nCT_CC_GCC_VERSION=\"4.9.2\"\r\n# CT_CC_LANG_FORTRAN is not set\r\nCT_CC_GCC_ENABLE_CXX_FLAGS=\"\"\r\nCT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=\"\"\r\nCT_CC_GCC_EXTRA_CONFIG_ARRAY=\"\"\r\nCT_CC_GCC_EXTRA_ENV_ARRAY=\"\"\r\nCT_CC_GCC_STATIC_LIBSTDCXX=y\r\n# CT_CC_GCC_SYSTEM_ZLIB is not set\r\n\r\n#\r\n# Optimisation features\r\n#\r\n\r\n#\r\n# Settings for libraries running on target\r\n#\r\nCT_CC_GCC_ENABLE_TARGET_OPTSPACE=y\r\n# CT_CC_GCC_LIBMUDFLAP is not set\r\n# CT_CC_GCC_LIBGOMP is not set\r\n# CT_CC_GCC_LIBSSP is not set\r\n# CT_CC_GCC_LIBQUADMATH is not set\r\n# CT_CC_GCC_LIBSANITIZER is not set\r\n\r\n#\r\n# Misc. obscure options.\r\n#\r\nCT_CC_CXA_ATEXIT=y\r\nCT_CC_GCC_DISABLE_PCH=y\r\nCT_CC_GCC_SJLJ_EXCEPTIONS=m\r\nCT_CC_GCC_LDBL_128=m\r\nCT_CC_GCC_BUILD_ID=y\r\n# CT_CC_GCC_LNK_HASH_STYLE_DEFAULT is not set\r\n# CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set\r\n# CT_CC_GCC_LNK_HASH_STYLE_GNU is not set\r\nCT_CC_GCC_LNK_HASH_STYLE_BOTH=y\r\nCT_CC_GCC_LNK_HASH_STYLE=\"both\"\r\nCT_CC_GCC_DEC_FLOAT_AUTO=y\r\n# CT_CC_GCC_DEC_FLOAT_BID is not set\r\n# CT_CC_GCC_DEC_FLOAT_DPD is not set\r\n# CT_CC_GCC_DEC_FLOATS_NO is not set\r\nCT_CC_SUPPORT_CXX=y\r\nCT_CC_SUPPORT_FORTRAN=y\r\nCT_CC_SUPPORT_JAVA=y\r\nCT_CC_SUPPORT_ADA=y\r\nCT_CC_SUPPORT_OBJC=y\r\nCT_CC_SUPPORT_OBJCXX=y\r\nCT_CC_SUPPORT_GOLANG=y\r\n\r\n#\r\n# Additional supported languages:\r\n#\r\nCT_CC_LANG_CXX=y\r\n# CT_CC_LANG_JAVA is not set\r\n\r\n#\r\n# Debug facilities\r\n#\r\n# CT_DEBUG_dmalloc is not set\r\n# CT_DEBUG_duma is not set\r\nCT_DEBUG_gdb=y\r\nCT_GDB_CROSS=y\r\n# CT_GDB_CROSS_STATIC is not set\r\n# CT_GDB_CROSS_SIM is not set\r\n# CT_GDB_CROSS_PYTHON is not set\r\nCT_GDB_CROSS_EXTRA_CONFIG_ARRAY=\"\"\r\n# CT_GDB_NATIVE is not set\r\nCT_GDB_GDBSERVER=y\r\nCT_GDB_GDBSERVER_HAS_IPA_LIB=y\r\nCT_GDB_GDBSERVER_STATIC=y\r\n\r\n#\r\n# gdb version\r\n#\r\n# CT_DEBUG_GDB_SHOW_LINARO is not set\r\nCT_GDB_V_7_10=y\r\n# CT_GDB_V_7_9_1 is not set\r\n# CT_GDB_V_7_9 is not set\r\n# CT_GDB_V_7_8_2 is not set\r\n# CT_GDB_V_7_8_1 is not set\r\n# CT_GDB_V_7_8 is not set\r\n# CT_GDB_V_7_7_1 is not set\r\n# CT_GDB_V_7_7 is not set\r\n# CT_GDB_V_7_6_1 is not set\r\n# CT_GDB_V_7_5_1 is not set\r\n# CT_GDB_V_7_4_1 is not set\r\n# CT_GDB_V_7_4 is not set\r\n# CT_GDB_V_7_3_1 is not set\r\n# CT_GDB_V_7_3a is not set\r\n# CT_GDB_V_7_2a is not set\r\n# CT_GDB_V_7_1a is not set\r\n# CT_GDB_V_7_0_1a is not set\r\n# CT_GDB_V_7_0a is not set\r\n# CT_GDB_V_6_8a is not set\r\nCT_GDB_7_2_or_later=y\r\nCT_GDB_7_0_or_later=y\r\nCT_GDB_HAS_PKGVERSION_BUGURL=y\r\nCT_GDB_HAS_PYTHON=y\r\nCT_GDB_INSTALL_GDBINIT=y\r\nCT_GDB_VERSION=\"7.10\"\r\n# CT_DEBUG_ltrace is not set\r\n# CT_DEBUG_strace is not set\r\n\r\n#\r\n# Companion libraries\r\n#\r\nCT_COMPLIBS_NEEDED=y\r\nCT_GMP_NEEDED=y\r\nCT_MPFR_NEEDED=y\r\nCT_ISL_NEEDED=y\r\nCT_CLOOG_NEEDED=y\r\nCT_MPC_NEEDED=y\r\nCT_COMPLIBS=y\r\nCT_GMP=y\r\nCT_MPFR=y\r\nCT_ISL=y\r\nCT_CLOOG=y\r\nCT_MPC=y\r\nCT_GMP_V_6_0_0=y\r\n# CT_GMP_V_5_1_3 is not set\r\n# CT_GMP_V_5_1_1 is not set\r\n# CT_GMP_V_5_0_2 is not set\r\n# CT_GMP_V_5_0_1 is not set\r\n# CT_GMP_V_4_3_2 is not set\r\n# CT_GMP_V_4_3_1 is not set\r\n# CT_GMP_V_4_3_0 is not set\r\nCT_GMP_5_0_2_or_later=y\r\nCT_GMP_VERSION=\"6.0.0a\"\r\n# CT_MPFR_V_3_1_3 is not set\r\nCT_MPFR_V_3_1_2=y\r\n# CT_MPFR_V_3_1_0 is not set\r\n# CT_MPFR_V_3_0_1 is not set\r\n# CT_MPFR_V_3_0_0 is not set\r\n# CT_MPFR_V_2_4_2 is not set\r\n# CT_MPFR_V_2_4_1 is not set\r\n# CT_MPFR_V_2_4_0 is not set\r\nCT_MPFR_VERSION=\"3.1.2\"\r\nCT_ISL_V_0_12_2=y\r\n# CT_ISL_V_0_11_1 is not set\r\nCT_ISL_V_0_12_or_later=y\r\nCT_ISL_VERSION=\"0.12.2\"\r\n# CT_CLOOG_V_0_18_4 is not set\r\nCT_CLOOG_V_0_18_1=y\r\n# CT_CLOOG_V_0_18_0 is not set\r\nCT_CLOOG_VERSION=\"0.18.1\"\r\nCT_CLOOG_0_18_or_later=y\r\n# CT_MPC_V_1_0_3 is not set\r\nCT_MPC_V_1_0_2=y\r\n# CT_MPC_V_1_0_1 is not set\r\n# CT_MPC_V_1_0 is not set\r\n# CT_MPC_V_0_9 is not set\r\n# CT_MPC_V_0_8_2 is not set\r\n# CT_MPC_V_0_8_1 is not set\r\n# CT_MPC_V_0_7 is not set\r\nCT_MPC_VERSION=\"1.0.2\"\r\n\r\n#\r\n# Companion libraries common options\r\n#\r\n# CT_COMPLIBS_CHECK is not set\r\n\r\n#\r\n# Companion tools\r\n#\r\n\r\n#\r\n# READ HELP before you say 'Y' below !!!\r\n#\r\n# CT_COMP_TOOLS is not set\r\n```\r\n\r\nBuild dependencies\r\n-------------------------\r\nSince I didn't want to build all dependencies and my target platform was Raspbian anyway I created a local debian environment. For this I used debootstrap to create a minimal 64 bit Debian Jessie in some folder. Using `systemd-nspawn` I logged into the system and added the Raspbian repository to the apt sources. By running `dpkg --add-architecture armhf` I enabled the system to also install the arm packages from the Raspbian repository (I still had to use `apt-get download and dpkg -x` for downloading and extracting the arm packages). Now the development packages and libraries could be downloaded. I also moved some libraries around and corrected some symbolic links most notably the libz.so which was located somewhere in `/lib` while most libraries were below `/usr/lib`. This was solely to ease the maintenance since all libraries would be in one folder (originally I wanted to use the overlay filesystem support in `systemd-nspawn` and build directly in the debian container but the version of the `systemd` package in Fedora 22 didn't have that feature).\r\n\r\nBuild environment\r\n----------------------\r\nI've put together a small script to prepare the cross build environment. Most notably that prepends the cross compiler `bin` folder to the `PATH` and configures `QEMU` to pick up the libraries from the cross compiler when running arm binaries.\r\n\r\n```sh\r\n#!/bin/bash\r\n\r\n__path_add $HOME/x-tools/armv6-rpi-linux-gnueabihf/bin\r\nexport QEMU_LD_PREFIX=$HOME/x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot\r\nexport PKG_CONFIG_SYSROOT_DIR=$HOME/x-tools/armv6-rpi-linux-gnueabihf/armv6-rpi-linux-gnueabihf/sysroot\r\n```\r\n\r\nThe `QEMU_LD_PREFIX` is important here since the qt build will build `qmake` (and the other binaries) for arm. Since the compiled `qmake` is used for the following build steps you need to enable your host system to run arm binaries (just google for binfmt and arm). I also ended up to copy the `libz.so` from raspbian to the sysroot lib folder of the cross compiler because my final build linked dynamically against `libz` and otherwise the cross compiled `moc` binary failed to start.\r\n\r\nBuild\r\n------\r\nI've compiled https://github.com/wkhtmltopdf/wkhtmltopdf/commit/8f036308f60287490d51f3f5a4df3af509a1899e. First 2 changes are required in the qt folder:\r\n\r\n1 `qt/mkspecs/linux-arm-gnueabi-g++/qmake.conf`\r\n\r\n```sh\r\n#\r\n# qmake configuration for building with arm-linux-gnueabi-g++\r\n#\r\n\r\nMAKEFILE_GENERATOR      = UNIX\r\nTARGET_PLATFORM         = unix\r\nTEMPLATE                = app\r\nCONFIG                  += qt warn_on release incremental link_prl gdb_dwarf_index\r\nQT                      += core gui\r\nQMAKE_INCREMENTAL_STYLE = sublib\r\n\r\ninclude(../common/linux.conf)\r\ninclude(../common/gcc-base-unix.conf)\r\ninclude(../common/g++-unix.conf)\r\n\r\n# modifications to g++.conf\r\nQMAKE_CC                = armv6-rpi-linux-gnueabihf-gcc\r\nQMAKE_CXX               = armv6-rpi-linux-gnueabihf-g++\r\nQMAKE_LINK              = armv6-rpi-linux-gnueabihf-g++\r\nQMAKE_LINK_SHLIB        = armv6-rpi-linux-gnueabihf-g++\r\n\r\n# modifications to linux.conf\r\nQMAKE_AR                = armv6-rpi-linux-gnueabihf-ar cqs\r\nQMAKE_OBJCOPY           = armv6-rpi-linux-gnueabihf-objcopy\r\nQMAKE_STRIP             = armv6-rpi-linux-gnueabihf-strip\r\n\r\nQMAKE_INCDIR        = <debian-container>/usr/include/arm-linux-gnueabihf <debian-container>/usr/include\r\nQMAKE_LIBDIR        = <debian-container>/usr/lib/arm-linux-gnueabihf\r\n\r\nQMAKE_LFLAGS       += -Wl,-rpath-link,<debian-container>/usr/lib/arm-linux-gnueabihf\r\n\r\nQMAKE_TARGET.arch   = armv6\r\n\r\nload(qt_config)\r\n```\r\n\r\nBasically this configures qt compilation to use our cross compiler and the rasbpian headers and libraries. The `-rpath-link` is required because otherwise some of the X11 related config tests are failing.\r\n\r\n2 `qt/config.tests/unix/freetype/freetype.pri`\r\n\r\n```sh\r\n!cross_compile {\r\n    TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH\r\n    # LSB doesn't allow using headers from /include or /usr/include\r\n    linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH\r\n    for(p, TRY_INCLUDEPATHS) {\r\n        p = $$join(p, \"\", \"\", \"/freetype2\")\r\n        exists($$p):INCLUDEPATH *= $$p\r\n    }\r\n}\r\n```\r\n\r\nBasically I removed the hardcoded `/include` and `/usr/include` entries from `TRY_INCLUDEPATHS` since otherwise the build picked up headers from the host system which caused for instance failing of the fontconfig test. After that I've run the usual `configure` `make` and `make install` (based on the `build.py` script). You need to add the flags `-platform linux-arm-gnueabi-g++` and `-arch armv6` to the configure run.\r\n\r\nGuess with some more love and work this can be turned into some nice automated build ;-)"}}