Results 1 to 12 of 12

Thread: Implement jpegsrc.v8b.tar.gz LINUX

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    The configure script defaults to automatic detection of the presence of a system JPEG library. If you have the -I and -L options set correctly then it should find yours in preference to the vendor's.

    If you really must set it manually then:
    • Clearly the first option is of no use.
    • The second one will ignore the system JPEG library and also your JPEG library and use whatever is bundled inside Qt (v8 of the library in 4.7.0).
    • That leaves only one option.
    Last edited by ChrisW67; 7th December 2010 at 23:40.

  2. #2
    Join Date
    Nov 2010
    Location
    Monterrey, Nuevo Leon, Mexico
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    Hi ChrisW67,

    I installed jpeg-8b in this directory:
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib

    [root@ivan jpeg-8blib]# ls
    bin include lib share

    Then I created a new *.conf file (jpeg8b.conf) in ld.so.conf.d directory:
    [ivan@ivan ld.so.conf.d]$ pwd
    /etc/ld.so.conf.d
    [ivan@ivan ld.so.conf.d]$ ls -alth
    total 56K
    drwxr-xr-x. 133 root root 8.0K Dec 8 00:58 ..
    drwxr-xr-x. 2 root root 4.0K Dec 8 00:07 .
    -rw-r--r-- 1 root root 74 Dec 8 00:07 jpeg8b.conf
    -rw-r--r-- 1 root root 15 Nov 1 21:31 mysql-i386.conf
    -rw-r--r-- 1 root root 25 Oct 27 11:08 xulrunner-32.conf
    -r--r--r-- 1 root root 63 Oct 18 23:39 kernel-2.6.34.7-61.fc13.i686.PAE.conf
    -r--r--r-- 1 root root 63 Sep 14 22:32 kernel-2.6.34.7-56.fc13.i686.PAE.conf
    -r--r--r-- 1 root root 63 Sep 5 12:49 kernel-2.6.34.6-54.fc13.i686.PAE.conf
    -rw-r--r-- 1 root root 15 Jul 29 08:10 opencv.conf
    -rw-r--r--. 1 root root 20 Dec 22 2009 qt-i386.conf
    [ivan@ivan ld.so.conf.d]$ cat jpeg8b.conf
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/lib

    After that I configured my Qt like this:

    ./configure -prefix /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/Trolltech/Qt-4.7.1-ljpeg -opensource -I/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/include -L/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/lib -ljpeg

    At the moment of type gmake, this error appears:
    gmake[1]: Entering directory `/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/src/corelib'
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/bin/moc -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared animation/qabstractanimation.h -o .moc/release-shared/moc_qabstractanimation.cpp
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/bin/moc: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
    gmake[1]: *** [.moc/release-shared/moc_qabstractanimation.cpp] Error 127
    gmake[1]: Leaving directory `/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/src/corelib'
    gmake: *** [sub-corelib-make_default-ordered] Error 2

    Do you have any idea?

    Regards and thanks in advance

  3. #3
    Join Date
    Nov 2010
    Location
    Monterrey, Nuevo Leon, Mexico
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    Hi ChrisW67,

    I installed jpeg-8b in this directory:
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib

    [root@ivan jpeg-8blib]# ls
    bin include lib share

    Then I created a new *.conf file (jpeg8b.conf) in ld.so.conf.d directory:
    [ivan@ivan ld.so.conf.d]$ pwd
    /etc/ld.so.conf.d
    [ivan@ivan ld.so.conf.d]$ ls -alth
    total 56K
    drwxr-xr-x. 133 root root 8.0K Dec 8 00:58 ..
    drwxr-xr-x. 2 root root 4.0K Dec 8 00:07 .
    -rw-r--r-- 1 root root 74 Dec 8 00:07 jpeg8b.conf
    -rw-r--r-- 1 root root 15 Nov 1 21:31 mysql-i386.conf
    -rw-r--r-- 1 root root 25 Oct 27 11:08 xulrunner-32.conf
    -r--r--r-- 1 root root 63 Oct 18 23:39 kernel-2.6.34.7-61.fc13.i686.PAE.conf
    -r--r--r-- 1 root root 63 Sep 14 22:32 kernel-2.6.34.7-56.fc13.i686.PAE.conf
    -r--r--r-- 1 root root 63 Sep 5 12:49 kernel-2.6.34.6-54.fc13.i686.PAE.conf
    -rw-r--r-- 1 root root 15 Jul 29 08:10 opencv.conf
    -rw-r--r--. 1 root root 20 Dec 22 2009 qt-i386.conf
    [ivan@ivan ld.so.conf.d]$ cat jpeg8b.conf
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/lib

    After that I configured my Qt like this:

    ./configure -prefix /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/Trolltech/Qt-4.7.1-ljpeg -opensource -I/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/include -L/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/jpeg-8blib/lib -ljpeg

    At the moment of type gmake, this error appears:
    gmake[1]: Entering directory `/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/src/corelib'
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/bin/moc -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared animation/qabstractanimation.h -o .moc/release-shared/moc_qabstractanimation.cpp
    /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/bin/moc: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
    gmake[1]: *** [.moc/release-shared/moc_qabstractanimation.cpp] Error 127
    gmake[1]: Leaving directory `/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/QtInstallers/qt-everywhere-opensource-src-4.7.1/src/corelib'
    gmake: *** [sub-corelib-make_default-ordered] Error 2

    Do you have any idea?

    Regards and thanks in advance

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    It's already been pointed out many times that this isn't a configure problem. You can play with configure until the cows come home, but if the OS can't locate your dynamic library at runtime, your application will fail.

    Put your library in the same directory as your executable as a first step. If that works, adjust your LD_LIBRARY_PATH to include your "standard" location. Better yet, install the library in some standard place where the dynamic linker already expects to find libraries, like /usr/lib or some other appropriate spot.

    The linker is telling you everything you need to know: it doesn't know where your library is. You have to tell it.

    If you're trying to build Qt using a different jpeg library than it was coded for, you're going to fail. No amount of linker magic can overcome a foreign API.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    You have actually built the JPEG library, haven't you?

    Did you run ldconfig after playing with the global system library search path? In any case, for development purposes you are far better off leaving the system path alone and using the LD_LIBRARY_PATH environment variable (or installing Qt into a location that is already searched).

    The configure command for Qt does not need the repeated -l flags you have given it.

    This really is not rocket science:
    Qt Code:
    1. #!/bin/bash
    2. export MYPROJ=/home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject
    3. export MYJPEG=${MYPROJ}/jpeg-8blib
    4. export LD_LIBRARY_PATH=${MYJPEG}/lib
    5. cd ${MYPROJ}/QtInstallers/qt-everywhere-opensource-src-4.7.1
    6. ./configure -I${MYJPEG}/include -L${MYJPEG}/lib -prefix ${MYPROJ}/Trolltech/Qt-4.7.1
    7. make
    To copy to clipboard, switch view to plain text mode 

    The Qt source will happily build and run against this version of libjpeg (my system uses it globally). The version bundled inside Qt is version 8, I assume without the a and b patches. This whole exercise only has some value if Ivan wants something in the a or b patches, otherwise using the Qt bundled libjpeg would be a far easier option.
    Last edited by ChrisW67; 8th December 2010 at 22:39.

  6. The following user says thank you to ChrisW67 for this useful post:

    ivanqt (9th December 2010)

  7. #6
    Join Date
    Nov 2010
    Location
    Monterrey, Nuevo Leon, Mexico
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11
    Thanks
    1

    Default Re: Implement jpegsrc.v8b.tar.gz LINUX

    Hi ChrisW67,

    Thanks for your support.

    The last script works great. I'm using this script for linux-embedded.

    At the end I installed libjpeg in /usr directory.
    Example:
    # ./configure -prefix /home/ivan/WinXP/Ivan_Maldonado/PeekDocuments/VideoProject/Trolltech/Qt-4.7.1-ljpeg -opensource -release -fast -system-libjpeg -ljpeg

    Regards and thanks for all

Similar Threads

  1. How does Qt implement layers?
    By FinderCheng in forum Qt Programming
    Replies: 1
    Last Post: 16th October 2009, 13:12
  2. Trying to implement QMainWindow...
    By winston2020 in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2008, 19:12
  3. how to implement this widget
    By pencilren in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2007, 11:10
  4. What's the best way to implement a MainWindow
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2007, 17:46
  5. how to implement it ?
    By qtopiahooo in forum Qt Programming
    Replies: 3
    Last Post: 25th October 2006, 17:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.