Problem building embedded qt version
-
version : qt embedded 4.6.3
I'm currently trying to cross compile qt for our i.MX27 processor board. It goes well for a long time but finally fails on a linker issue when building one of the example applications :
@arm-none-linux-gnueabi-g++ -Wl,-rpath-link,/home/filip/QT/qt-embedded-4.6.3/lib -fno-exceptions -Wl,-O1 -o animatedtiles .obj/release-shared-emb-arm/main.o .obj/release-shared-emb-arm/qrc_animatedtiles.o -L/home/filip/QT/qt-embedded-4.6.3/lib -L/home/filip/i.MX27/ltib/rootfs/usr/lib -lQtGui -L/home/filip/QT/qt-embedded-4.6.3/lib -L/home/filip/i.MX27/ltib/rootfs/usr/lib -lQtNetwork -lQtCore -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 -lxml2 -lz -lgmodule-2.0 -lgobject-2.0 -lts -lasound -lpthread
/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libpng.so.3, needed by /home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference topng_error' /home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference to
png_set_gAMA'
/home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference topng_set_text' /home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference to
png_set_strip_16'
...
/home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference topng_set_error_fn' /home/filip/QT/qt-embedded-4.6.3/lib/libQtGui.so: undefined reference to
png_read_end'
collect2: ld returned 1 exit status
make[3]: *** [animatedtiles] Error 1
make[3]: Leaving directory/home/filip/QT/qt-embedded-4.6.3/examples/animation/animatedtiles' make[2]: *** [sub-animatedtiles-make_default] Error 2 make[2]: Leaving directory
/home/filip/QT/qt-embedded-4.6.3/examples/animation'
make[1]: *** [sub-animation-make_default] Error 2
make[1]: Leaving directory `/home/filip/QT/qt-embedded-4.6.3/examples'
make: *** [sub-examples-make_default-ordered] Error 2
@
Obviously, the linker does not find the libpng.so.3 library. However, the linker options contain this line :@ -L/home/filip/i.MX27/ltib/rootfs/usr/lib@
and when I list the files from that folder, I see libpng.so.3 is present in that location :
@filip@thc-ubuntu-2:~/QT/qt-embedded-4.6.3$ ls -al /home/filip/i.MX27/ltib/rootfs/usr/lib | grep libpng
-rw-r--r-- 1 root root 278528 2010-08-20 13:51 libpng12.a
lrwxrwxrwx 1 root root 13 2010-08-20 13:51 libpng12.so -> libpng12.so.0
lrwxrwxrwx 1 root root 19 2010-08-20 13:51 libpng12.so.0 -> libpng12.so.0.1.2.8
-rwxr-xr-x 1 root root 251548 2010-08-20 13:51 libpng12.so.0.1.2.8
lrwxrwxrwx 1 root root 10 2010-08-20 13:51 libpng.a -> libpng12.a
lrwxrwxrwx 1 root root 11 2010-08-20 13:51 libpng.so -> libpng.so.3
lrwxrwxrwx 1 root root 17 2010-08-20 13:51 libpng.so.3 -> libpng.so.3.1.2.8
-rwxr-xr-x 1 root root 251548 2010-08-20 13:51 libpng.so.3.1.2.8@What do I miss here ? (I think something simple...but right now, I don't see it...)
(One thing I can think of is the version of the libpng library, but I guess I would get another error message in that case ...)Anyone can point me in the good direction ? Any hints ?
Thanks !
Might be important too : this is how my 'custom' .conf file looks like :
@
qmake configuration for building with arm-none-linux-gnueabi-g++
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
QMAKE_LINK_C = arm-none-linux-gnueabi-gcc
QMAKE_LINK_C_SHLIB = arm-none-linux-gnueabi-gccQMAKE_INCDIR = /home/filip/i.MX27/ltib/rootfs/usr/include
QMAKE_LIBDIR = /home/filip/i.MX27/ltib/rootfs/usr/libQMAKE_LIBS = -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 -lxml2 -lz -lgmodule-2.0 -lgobject-2.0 -lts -lasound
QMAKE_LIBS_X11 =
QMAKE_LIBS_X11SM =QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_RANLIB = arm-none-linux-gnueabi-ranlibQMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)@
-
Yes ! That's it !
Thank You !!