Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Mobility Library Question on OS X
Forum Updated to NodeBB v4.3 + New Features

Qt Mobility Library Question on OS X

Scheduled Pinned Locked Moved Installation and Deployment
19 Posts 4 Posters 10.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kyleplattner
    wrote on last edited by
    #1

    I am still struggling through trying to get mobility to work on OS X. I noticed that the documentation wants this command in your .profile file:

    @ LD_LIBRARY_PATH=$TARGET_DIR/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH@

    I understand the target directory, but what is the $LD_LIBRARY_PATH and how can I find it?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      LD_LIBRARY_PATH is environment variable with paths of directories with libraries. It is usally empty and you can safely set it without concatenation, but sometime you have to set it repeatedly with two different paths and want them to be together in this list, in this case you should append old value of variable to the end of new value.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kyleplattner
        wrote on last edited by
        #3

        How can I know for sure what mine is?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          If you are not sure about your LD_LIBRARY_PATH you can view it by using echo
          @
          echo $LD_LIBRARY_PATH
          @
          or simply use full variable setting
          @
          LD_LIBRARY_PATH=/some/path/here/lib:$LD_LIBRARY_PATH
          export LD_LIBRARY_PATH
          @

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kyleplattner
            wrote on last edited by
            #5

            If it would ever be possible to create an installer for Qt Mobility, it would be great.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              On OS X the environment variable to set is DYLD_LIBRARY_PATH.

              LD_LIBRARY_PATH is for Linux (and probably some Unix systems too).

              [EDIT - fixed typo]

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kyleplattner
                wrote on last edited by
                #7

                Interesting. I will try that. Shouldn't this be automated?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  Automated? I don't understand....

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kyleplattner
                    wrote on last edited by
                    #9

                    It seems like with all of these problems that people are having with Mobility that some sort of installer would really be helpful.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #10

                      Ah, ok. That's quite true. I never used it though I cannot comment further. I only stumbled over the (DY)LD_LIBRARY_PATH once I switched to the Mac :-)

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tobias.hunger
                        wrote on last edited by
                        #11

                        Using that kind of concatenation of LD_LIBRARY_PATH is dangerous (at least in Linux). You really should make sure the LD_LIBRARY_PATH does not contain empty path elements ever.

                        This is due to the loader evaluating LD_LIBRARY_PATH to find libraries an executable depends on. For some reason a empty path element (the thing between the ':' or ':' and the end of the string) is considered to be the current directory. So if you have LD_LIBRARY_PATH set to "/some/path::/some/other/path" then the loader will check the current directory for libraries. This is a security issue as anybody can make you run code for them if they can get you to start any executable while in a directory where they can put a library.

                        As I said before: This is the case in Linux. I am not sure the MacOS loader behaves in the same way... So check before following this potentially dangerous advice.

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          goetz
                          wrote on last edited by
                          #12

                          This can prevent creating new empty paths:

                          @
                          if [ "x$DYLD_LIBRARY_PATH" = "x" ]; then
                          export DYLD_LIBRARY_PATH="/path/to/my/lib"
                          else
                          export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/path/to/my/lib"
                          fi
                          @

                          http://www.catb.org/~esr/faqs/smart-questions.html

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kyleplattner
                            wrote on last edited by
                            #13

                            Again I would emphasize the great need for some sort of installer to minimize these risks. Perhaps adding it and all its dependencies to aptitude?

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              goetz
                              wrote on last edited by
                              #14

                              There is no aptitude in a standard Mac OS X installation.

                              On a Debian or Ubunut box there might be already a package repository (known as PPA: Personal Package Archive), that can be added to apt/sources.list. I'm pretty sure they will be in the official repositories sometime the packages are sort-of stable.

                              http://www.catb.org/~esr/faqs/smart-questions.html

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kyleplattner
                                wrote on last edited by
                                #15

                                Do you have any sort of general timeline idea of when that will happen?

                                1 Reply Last reply
                                0
                                • G Offline
                                  G Offline
                                  goetz
                                  wrote on last edited by
                                  #16

                                  Sorry, no. I'm neither into the planning of the Trolls on finishing Qt Mobility nor into that of Launchpad for their Ubuntu plans. I would not depend on anything you find on the net, unless it's from Launchpad or Nokia.

                                  http://www.catb.org/~esr/faqs/smart-questions.html

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kyleplattner
                                    wrote on last edited by
                                    #17

                                    Can I add:

                                    @if [ "x$DYLD_LIBRARY_PATH" = "x" ]; then
                                    export DYLD_LIBRARY_PATH="/path/to/my/lib"
                                    else
                                    export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/path/to/my/lib"
                                    fi@

                                    directly to my .profile file and only change the two file paths?

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      goetz
                                      wrote on last edited by
                                      #18

                                      Yes, you can. And additionally to .bashrc too.

                                      http://www.catb.org/~esr/faqs/smart-questions.html

                                      1 Reply Last reply
                                      0
                                      • K Offline
                                        K Offline
                                        kyleplattner
                                        wrote on last edited by
                                        #19

                                        Great to know, I will try it. Thanks.

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved