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. [SOLVED] Suppress .so.* version on linux
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Suppress .so.* version on linux

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 4 Posters 2.8k 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.
  • R Offline
    R Offline
    RaubTieR
    wrote on last edited by
    #1

    I've just decided to check my projects on ubuntu and faced a problem where I get my libs with *.1.0.0 postfix, like liblogger.so.1.0.0. Also i got a bunch of links, wich I suppressed (sometimes) with
    @QMAKE_LN_LIB = :
    @

    But I get an error in Issues page like "[path/to/lib] Error 1 (Ignored)" which is disturbing.
    Those libs are parts of my project, I have full control over their versions, so I do not want them to have any numbers in names, and I believe that would make me happy if they won't. I tried this:
    @
    VERSION=
    VER_MAJ=
    VER_MIN=
    VER_PAT=
    @

    And it does not seem to work for me (numbers still present). And ofcourse one way that seems to work and be rediculous at same time:
    @ QMAKE_POST_LINK=
    rm liblogger.so.1.0 &
    rm liblogger.so.1 &
    rm liblogger.so &
    mv
    liblogger.so.1.0.0
    liblogger.so &
    cp -u
    liblogger.so
    ../test_d
    @

    With this I must have a separate set of commands for windows, which I already know how, but...
    The rediculous thing is that first qmake 'does stuff' then me 'removes stuff'. Wouldn't it be easier if I could tell qmake 'not to do that stuff'. I think there must be a simple crossplatform way, but google says no.
    Thanks for any help.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      unai_i
      wrote on last edited by
      #2

      Hello,
      I think the only alternative is the one you described.
      The libblogger.so.1.0, libblogger.so.1 and libblogger.so are symbolic links to libblogger.so.1.0.0 so if an application is looking for the name without full version number it can still find it. As it won't take extra space on disk you could keep the symbolic links and just do:
      @
      QMAKE_POST_LINK=
      cp -u
      liblogger.so.1.0.0
      ../test_d
      @

      I'm afraid if this is not acceptable for your use case you will have to go for the solution you described.
      Best regards.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RaubTieR
        wrote on last edited by
        #3

        Well, now after all my things were compiled together, I found that if I link against my libs like so:
        @LIBS: -llogger@

        it really tries to link with liblogger.so on buildtime, BUT on runtime it searches for liblogger.so.1, which is again wierd to me. Why cant it be that simple like on windows, where all my dlls are happy without links and numbers?..

        For now here's what my solution is:
        !http://a3.twimg.com/profile_images/1159719713/okay-face_reasonably_small.jpg(okayface)!

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

          http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html has a good explanation of how libraries are used on Linux.

          Basically it is all about allowing for several versions of the same library to be installed on the system without everything breaking.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Anumar
            wrote on last edited by
            #5

            If you don't need symbolic links for your libraries add
            CONFIG += plugin
            to your library's pro-file.

            Documentation say's:
            "This is necessary on some platforms to avoid generating symbolic links with version numbers in the file name, which is appropriate for most dynamic libraries but not for plugins"

            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