title: An error building Qt libraries for the raspberry pi
body: <p>I am trying to compile the Qt 5 libraries for my RPI, but it always crashes.</p>
  
  <p>These are the guides I have tried to follow:</p>
  
  <p><a href="http://qt-project.org/wiki/RaspberryPi_Beginners_guide" rel="noreferrer">http://qt-project.org/wiki/RaspberryPi_Beginners_guide</a><br>
  <a href="http://qt-project.org/wiki/RaspberryPi" rel="noreferrer">http://qt-project.org/wiki/RaspberryPi</a></p>
  
  <p>I have downloaded the cross-compiler and sysroot-image according to the guide and pulled the Qt5 sources from the git repo.</p>
  
  <p>After following one of the guides I am now stuck at <code>make</code>.</p>
  
  <p>This is the error I am receiving: </p>
  
  <pre><code>.obj/release-shared/qlibrary_unix.o: In function `QLibraryPrivate::load_sys()':
  qlibrary_unix.cpp:(.text+0xf84): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlopen.o): In function `dlopen':
  (.text+0xc): undefined reference to `__dlopen'
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlclose.o): In function `dlclose':
  (.text+0x0): undefined reference to `__dlclose'
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlsym.o): In function `dlsym':
  (.text+0xc): undefined reference to `__dlsym'
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlerror.o): In function `dlerror':
  (.text+0x0): undefined reference to `__dlerror'
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libm.a(feholdexcpt.o): In function `feholdexcept':
  (.text+0x48): undefined reference to `_dl_hwcap'
  /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libm.a(fesetenv.o): In function `fesetenv':
  (.text+0x64): undefined reference to `_dl_hwcap'
  collect2: virhe: ld:n paluuarvo oli 1                                           # collect2: error: ld returnvalue was 1
  make[2]: *** [../../lib/libQt5Core.so.5.0.0] Virhe 1                            # Error 1
  make[2]: Poistutaan hakemistosta "/home/esa/qtonpi/qt5/qtbase/src/corelib"      # Leaving directory
  make[1]: *** [sub-corelib-make_first] Virhe 2                                   # Error 2
  make[1]: Poistutaan hakemistosta "/home/esa/qtonpi/qt5/qtbase/src"              # Leaving directory
  make: *** [sub-src-make_first] Virhe 2                                          # Error 2
  </code></pre>