Compile Qt for i.mx51 - libpng problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compile Qt for i.mx51 - libpng problem

2,726 Views
bonil
Contributor I

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

Labels (1)
Tags (2)
0 Kudos
10 Replies

957 Views
JamesRobinson
Contributor II

I found a brute force way to install on my setup. I built everything but QT first and then did a "./ltib -nodeps". This seems to work. I have QT running on my MX28evk. I will re-install with teh 32bit Ubuntu and see if that fixes it also. 

Last question, What IDE would everyone recommend? I found a PDF with an example to use QT Creator. Do I just add the rootfs/usr/local/Trolltech to the QT4 options? 

Thanks for all your help.....

0 Kudos

957 Views
MatthewRobinson
Contributor I

Hello,

I have the same problem building on a 64-bit machine (in my case, for the i.MX27, also using LTIB). Building on a 32-bit host machine works fine, but building on the 64-bit machine yields the following problems in the build log:

Earlier, we have an indication things might be going awry:

PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1

Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1

Requires: libc.so.6()(64bit) libgcc_s.so.1()(64bit) libm.so.6()(64bit) libstdc++.so.6()(64bit) libz.so.1()(64bit) linux-vdso.so.1()(64bit)

And later:

sudo /opt/freescale/ltib/usr/bin/rpm --dbpath /home/mpr/ltib-dev/rpmdb --prefix /home/mpr/ltib-dev/rootfs --ignorearch -ivh --force --excludedocs /home/mpr/ltib-dev/rpm/RPMS/arm/qt-embedded-4.6.3-1.arm.rpm

error: failed dependencies:

    libc.so.6()(64bit)   is needed by qt-embedded-4.6.3-1

    libgcc_s.so.1()(64bit)   is needed by qt-embedded-4.6.3-1

    libm.so.6()(64bit)   is needed by qt-embedded-4.6.3-1

    libstdc++.so.6()(64bit)   is needed by qt-embedded-4.6.3-1

    libz.so.1()(64bit)   is needed by qt-embedded-4.6.3-1

    linux-vdso.so.1()(64bit)   is needed by qt-embedded-4.6.3-1

.

James, I wasn't clear from your previous message exactly what the solution was. Could you expand on how you got it to work please?

Thanks.

0 Kudos

957 Views
kamejoko80
Contributor II

Not yet, sir.

I re-install 32bit Linux and compiled successfully.

Best regards.

0 Kudos

957 Views
JamesRobinson
Contributor II

Hello,

Have you found an answer to you problem of pulling in the 64 bit host libraries?

Thanks...

Minh Phuong said:

Hello,

I'm using Fedora Linux and compiled successfully, when ltib install QT rpm package I got the error:

 

libc.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libgcc_s.so.1()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libm.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libstdc++.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

linux-vdso.so.1()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 

My system kernel is:

$ uname -a

Linux localhost.localdomain 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec 10 10:36:29 EST 2009 x86_64 x86_64 x          86_64 GNU/Linux

 

How to solve the problem ? 

 

Thanks in advance.

 

0 Kudos

957 Views
bonil
Contributor I
Problem solved : missing -lpng option in QMAKE_LIBS (qt-embedded.spec or qmake.conf).
0 Kudos

957 Views
kamejoko80
Contributor II

Hello,

I'm using Fedora Linux and compiled successfully, when ltib install QT rpm package I got the error:

 

libc.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libgcc_s.so.1()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libm.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 libstdc++.so.6()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

linux-vdso.so.1()(64bit)   is needed by qt-everywhere-opensource-src-4.7.3-0

 

My system kernel is:

$ uname -a

Linux localhost.localdomain 2.6.27.41-170.2.117.fc10.x86_64 #1 SMP Thu Dec 10 10:36:29 EST 2009 x86_64 x86_64 x          86_64 GNU/Linux

 

How to solve the problem ? 

 

Thanks in advance.

0 Kudos

957 Views
iMxGuy
Contributor II
Sorry, I am using i.mx28 so Qt is built and installed in rootfs by ltib. The article you link to is using a different build process for the i.mx51. I have attached my spec file in case that may help you.

bonil said:
Unfortunatelly I get the same error.. could you please attach here your configuration file? Maybe there is something wrong.. I got it from here: http://www.imxdev.org/wiki/index.php?title=All_Boards_Qt using the no 3d makespec

Mike Morrell said:

Hi,

I had the same problem building Qt 4.6. I was able to get Qt 4.7.2 to compile by following the post in the Qt group. If you don't specifically need 4.6 then maybe this will help.

0 Kudos

957 Views
bonil
Contributor I
Unfortunatelly I get the same error.. could you please attach here your configuration file? Maybe there is something wrong.. I got it from here: http://www.imxdev.org/wiki/index.php?title=All_Boards_Qt using the no 3d makespec

Mike Morrell said:

Hi,

I had the same problem building Qt 4.6. I was able to get Qt 4.7.2 to compile by following the post in the Qt group. If you don't specifically need 4.6 then maybe this will help.

0 Kudos

957 Views
bonil
Contributor I

just a few more details:

 

I have compiled LTIB version L2.6.35_10.11.01 on a 32bit Ubuntu 9.04 host.

 

libpng12-dev and libpng12-0 are also installed on my host

 

Here the output from the configuration of Qt for the target:

Building on:   qws/linux-x86-g++
Building for:  qws/linux-mxc-g++
Architecture:  arm
Host architecture: i386

Build ............... libs examples demos docs translations
Configuration .......  cross_compile release shared dll embedded largefile stl precompile_header exceptions_off  minimal-config small-config medium-config large-config full-config qt3support accessibility embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png freetype system-zlib nis openssl alsa multimedia svg webkit script scripttools release
Debug ............... no
Qt 3 compatibility .. yes
QtDBus module ....... no
QtConcurrent code.... yes
QtScript module ..... yes
QtScriptTools module  yes
QtXmlPatterns module  no
Phonon module ....... no
Multimedia module ... yes
SVG module .......... yes
WebKit module ....... yes
JavaScriptCore JIT .. To be decided by JavaScriptCore
Declarative module .. no
STL support ......... yes
PCH support ......... yes
MMX/3DNOW/SSE/SSE2..  no/no/no/no
iWMMXt support ...... no
IPv6 support ........ yes
IPv6 ifname support . yes
getaddrinfo support . yes
getifaddrs support .. yes
Accessibility ....... yes
NIS support ......... yes
CUPS support ........ no
Iconv support ....... no
Glib support ........ no
GStreamer support ... no
Large File support .. yes
GIF support ......... plugin
TIFF support ........ plugin (qt)
JPEG support ........ plugin (system)
PNG support ......... yes (system)
MNG support ......... plugin (qt)
zlib support ........ system
Session management .. no
Embedded support .... arm
Freetype2 support ... auto (yes)
Graphics (qt) ....... linuxfb multiscreen linuxfb
Graphics (plugin) ...
Decorations (qt) .... styled windows default
Decorations (plugin) 
Keyboard driver (qt). tty tty
Keyboard driver (plugin)
Mouse driver (qt) ... pc linuxtp tslib
Mouse driver (plugin)
OpenGL support ...... no
OpenVG support ...... no
SQLite support ...... plugin (qt)
OpenSSL support ..... yes (run-time)
alsa support ........ yes

0 Kudos

957 Views
iMxGuy
Contributor II

Hi,

I had the same problem building Qt 4.6. I was able to get Qt 4.7.2 to compile by following the post in the Qt group. If you don't specifically need 4.6 then maybe this will help.

0 Kudos