Last active
August 29, 2015 14:10
-
-
Save garyjohnson/fac70fe6246a04d17aa8 to your computer and use it in GitHub Desktop.
Build Qt5 natively on Raspberry Pi with distcc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#WIP | |
sudo apt-get update | |
sudo apt-get install gperf bison flex libfontconfig1-dev libdbus-1-dev libfreetype6-dev libudev-dev libicu-dev libsqlite3-dev libxslt1-dev libssl-dev libasound2-dev libavcodec-dev libavformat-dev libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libraspberrypi-dev libpulse-dev libx11-dev libglib2.0-dev libcups2-dev freetds-dev libsqlite0-dev libpq-dev libiodbc2-dev libmysqlclient-dev firebird-dev libpng12-dev libjpeg62-dev libgst-dev libxext-dev libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxi-dev libdrm-dev | |
mkdir ~/opt | |
cd ~/opt | |
git clone git://gitorious.org/qt/qt5.git | |
cd qt5 | |
./init-repository | |
cd ~/opt/qt5 | |
# will this work? | |
patch -p0 < "1030,1031c1030,1031 | |
< QT_CFLAGS_DBUS= | |
< QT_LIBS_DBUS= | |
--- | |
> QT_CFLAGS_DBUS="-I/usr/include/dbus-1.0/ -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include/" | |
> QT_LIBS_DBUS=-ldbus-1 | |
1034,1035c1034,1038 | |
< QT_CFLAGS_GLIB= | |
< QT_LIBS_GLIB= | |
--- | |
> QT_CFLAGS_GLIB="-I/usr/include/glib-2.0/ -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include/" | |
> QT_LIBS_GLIB=-lglib-2.0 | |
> | |
> QT_CFLAGS_PULSEAUDIO="-I/usr/include/glib-2.0/ -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include/" | |
> QT_LIBS_PULSEAUDIO="-lpulse -lpulse-mainloop-glib" | |
1038c1041 | |
< QT_CFLAGS_GSTREAMER= | |
--- | |
> QT_CFLAGS_GSTREAMER="-I/usr/include/gstreamer-0.10/ -I/usr/include/glib-2.0/ -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include/ -I/usr/include/libxml2/" | |
5123c5126 | |
< QT_CFLAGS_FONTCONFIG= | |
--- | |
> QT_CFLAGS_FONTCONFIG=-I/usr/include/freetype2/" | |
#Also, comment out these lines: | |
#I commented in 5.0.0/qtwebkit/Source/WebKit/WebKit1.pri this suspect line : | |
#use?(PLUGIN_BACKEND_XLIB): PKGCONFIG += x11 | |
Same in 5.0.0/qtwebkit/Source/WebKit2/Target.pri | |
use?(PLUGIN_BACKEND_XLIB) { | |
DEFINES += XP_UNIX | |
# PKGCONFIG += x11 | |
DEFINES += MOZ_X11 | |
} | |
#Same in 5.0.0/qtwebkit/Source/widgetsapi.pri | |
#use?(PLUGIN_BACKEND_XLIB): PKGCONFIG += x11 | |
#do this --- deleted from makefile: http://qt-project.org/forums/viewthread/29254 | |
sudo ./configure -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/usr/local/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 -no-pch &> output | |
sudo make &> output_make | |
sudo make install &> output_make_install | |
export LD_LIBRARY_PATH=/usr/local/qt5/lib/ | |
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/qt5/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment