Results 1 to 12 of 12

Thread: List share library dependency of Qtopia application (cross-compilation configuration)

  1. #1
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question List share library dependency of Qtopia application (cross-compilation configuration)

    I have an app built with cross-compilation,the following configuration in my Qt and cross-compile tool chain:
    - Qt version: Qtopia-opensource-4.2.2
    - Qtopia: Qtopia-core-4.2.3 (built for cross-compilation)
    - Tool chain: arm-linux-gcc-3.3.2

    What can I do to list of my app share library dependency with my app built with ARM?

    Thanks in advance.
    ANH.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Use ldd on the binary.

  3. #3
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    I used it but I generated the message:
    Qt Code:
    1. [root@localhost intelligent_office]# /usr/local/arm/3.4.1/arm-linux/bin/ldd intelligent_office
    2. not a dynamic executable
    3. [root@localhost intelligent_office]#
    To copy to clipboard, switch view to plain text mode 

    What can I do ?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Was it ldd for the correct platform? what does "file intelligent_office" return?

  5. #5
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Thank you for your soon answer,

    "intelligent_office" is the Qt GUI that allows user input their correct password to access to department, and when execute, it returns a GUI for user.

    When cross-compiling, I use toolchain arm-linux-gcc-3.3.2 and it completed successfully, when I usr ldd provided by arm-linux-gcc-3.3.2 it generates the error message that miss and library, I correctd the library but it returns the same message.

    I used arm-linux-gcc-3.4.1 to list share library dependency and it generated the error as my previous message.

    I have a few questions:
    1. Can I use arm-linux-gcc-3.4.1 to ldd the file cross-compiled with arm-linux-gcc-3.3.2 ?
    2. Could you please give me the correct configuration command with Qt configure for cross-compiling under arm-linux-gcc ?

    I look forward to receive your soon replies.

    Thanks a lot.
    ANH.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    ldd is not part of gcc but binutils. If compilation ended successfully, then you have the right configuration. Use "file" and "ldd" tools to check if appropriate binaries are built for the correct platform.

  7. #7
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    I think that you wrong with comment:
    Qt Code:
    1. ldd is not part of gcc but binutils.
    To copy to clipboard, switch view to plain text mode 

    I used
    /usr/local/arm/3.4.1/arm-linux/bin/ldd intelligent_office

    and it worked.

    Each arm-linux-gcc-xxx has its own ldd, you can check that./

    I used ldd in my arm-linux-gcc-xxx toolchain to list the share library dependencies, and I don't know how it doesn't work, it generated the error message as my previous message.
    If you find the reason why it's not work, please show me.

    Thanks in advance and I look forward to receive you reply.

    ANH.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Quote Originally Posted by haconganh View Post
    I think that you wrong with comment:
    Qt Code:
    1. ldd is not part of gcc but binutils.
    To copy to clipboard, switch view to plain text mode 
    Yes, I'm wrong. It's not part of binutils but glibc. It's certainly not part of gcc though. It may sometimes be distributed with it, but it's not part of gcc.

    I used
    /usr/local/arm/3.4.1/arm-linux/bin/ldd intelligent_office

    and it worked.
    What does that prove?

    Each arm-linux-gcc-xxx has its own ldd, you can check that./
    Each?

    I used ldd in my arm-linux-gcc-xxx toolchain to list the share library dependencies, and I don't know how it doesn't work, it generated the error message as my previous message.
    If you find the reason why it's not work, please show me.
    I told you. Run "file intelligent_office". It'll tell you what kind of binary intelligent_office is.

  9. #9
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Smile Re: List share library dependency of Qtopia application (cross-compilation configurat

    Hi,


    Each arm-linux-gcc-xxx has its own ldd, you can check that./
    Each?
    In my linux system, I've install two toolchains : arm-linux-gcc-3.3.2 and arm-linux-gcc-3.4.1.
    In arm-linux-gcc-3.3.2 folder: I file ldd in arm/3.3.2/bin/ldd,
    in arm-linux-gcc-3.4.1 folder: I file ldd in arm/3.4.1/arm-linux/bin/ldd.

    This is the message received when I execute "ldd" and "file" command (I cross-compiled "intelligent_office" with toolchain arm-linux-gcc-3.3.2) :

    Qt Code:
    1. [root@localhost intelligent_office]# /usr/local/arm/3.3.2/bin/ldd intelligent_office
    2. /usr/local/arm/3.3.2/bin/ldd: line 130: /usr/local/arm/3.3.2/lib/ld-linux.so.2: cannot execute binary file
    3. /usr/local/arm/3.3.2/bin/ldd: line 140: /usr/local/arm/3.3.2/lib/ld-linux.so.2: cannot execute binary file
    4. ldd: /usr/local/arm/3.3.2/lib/ld-linux.so.2 exited with unknown exit code (126)
    5. [root@localhost intelligent_office]#
    6. [root@localhost intelligent_office]#
    7. [root@localhost intelligent_office]# /usr/local/arm/3.4.1/arm-linux/bin/ldd intelligent_office
    8. not a dynamic executable
    9. [root@localhost intelligent_office]#
    10. [root@localhost intelligent_office]# file intelligent_office
    11. intelligent_office: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
    12. [root@localhost intelligent_office]#
    To copy to clipboard, switch view to plain text mode 

    I'm sorry for inconvenient for you, you are the only one person replied me.
    I really need to solve it. I look forward to get replies from you.

    Thanks in advance.
    ANH.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Which toolchain did you use to compile the application? 3.4.1 or 3.3.2? Because one seems to be incompatible with your binary (or is just broken) and the other can't fetch dependencies.
    Anyway it looks like it'll lead us nowhere. Let's start guessing. I guess you want to deploy the application somewhere where the environment already contains linux, so we needn't worry about things like glibc or gcc. This means you have to deploy Qtopia libs and their dependencies. Let's try ldd and file once again, but this time on Qtopia libs.

  11. #11
    Join Date
    May 2007
    Posts
    10
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Which toolchain did you use to compile the application? 3.4.1 or 3.3.2?
    I use version 3.3.2 to cross-compile.

    I guess you want to deploy the application somewhere where the environment already contains linux, so we needn't worry about things like glibc or gcc.
    Yes, that's right. I used EmbestKit of Mizi company, it contains Linux OS supported.

    This means you have to deploy Qtopia libs and their dependencies. Let's try ldd and file once again, but this time on Qtopia libs.
    I used it and it generated error message as my previous message.

    You could see my same thread for more information : http://www.qtforum.org/thread.php?th...ef2d2b3b0e3b51

    Hope you help me.

    ANH.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: List share library dependency of Qtopia application (cross-compilation configurat

    Could you try uploading the application to the target device, access its shell and call ldd from there?

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.