Hello imx community
Since a few weeks I'm fighting with the compilation of Qt for my board. I was trying to compile Qt 4.6.0 without OpenGL support for my i.mx51 evk board when I got this error:
make[3]: Entering directory `/home/luca/qt_src_target/examples/desktop/screenshot'
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ -lts -lasound -lz -Wl,-rpath-link,/home/luca/qt_src_target/lib -fno-exceptions -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-target-version/lib -Wl,-rpath,/usr/local/Trolltech/Qt-target-version/lib -o screenshot .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/screenshot.o .obj/release-shared-emb-arm/moc_screenshot.o -L/home/luca/qt_src_target/lib -L/tftpboot/ltib/usr/lib -lQtGui -L/home/luca/qt_src_target/lib -L/tftpboot/ltib/usr/lib -lQtNetwork -lQtCore -lpthread
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld: warning: libpng.so.3, needed by /home/luca/qt_src_target/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/home/luca/qt_src_target/lib/libQtGui.so: undefined reference to `png_get_valid'
...
/home/luca/qt_src_target/lib/libQtGui.so: undefined reference to `png_get_gAMA'
collect2: ld returned 1 exit status
make[3]: *** [screenshot] Error 1
make[3]: Leaving directory `/home/luca/qt_src_target/examples/desktop/screenshot'
make[2]: *** [sub-screenshot-make_default-ordered] Error 2
make[2]: Leaving directory `/home/luca/qt_src_target/examples/desktop'
make[1]: *** [sub-desktop-make_default] Error 2
make[1]: Leaving directory `/home/luca/qt_src_target/examples'
make: *** [sub-examples-make_default-ordered] Error 2
I have verified that in my LTIB the libpng is selected and also that the libpng.so.3 file exists:
luca@ubuntu:~/qt_src_target$ locate libpng.so.3
/home/luca/ltib_1011/ltib/rootfs/usr/lib/libpng.so.3
/home/luca/ltib_1011/ltib/rootfs/usr/lib/libpng.so.3.1.2.8
/home/luca/qt_src_target/examples/desktop/screenshot/libpng.so.3
/home/luca/qt_src_target/examples/desktop/screenshot/libpng.so.3.1.2.8
Here the parameters that I've used to configure Qt:
./configure -embedded arm -xplatform qws/linux-mxc-g++ -release -prefix /usr/local/Trolltech/Qt-target-version -qt-gfx-linuxfb -qt-kbd-tty -qt-mouse-tslib -little-endian -host-little-endian
=> The configuration was successfull.
Where qws/linux-mxc-g++/qmake.conf contains following settings:
luca@ubuntu:~/qt_src_target$ more mkspecs/qws/linux-mxc-g++/qmake.conf
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
QMAKE_INCDIR += /tftpboot/ltib/usr/include
QMAKE_LIBDIR += /tftpboot/ltib/usr/lib
QMAKE_LFLAGS += -lts -lasound -lz
QMAKE_CC = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_AR = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-strip
After the configuration I run the make command and after a while I got the libpng error. Can somebody help me? What is missing or what is wrong?
Many thanks in advance
bonil