coin3d / soqt

Old Coin GUI binding for Qt, replaced by Quarter
BSD 3-Clause "New" or "Revised" License
23 stars 17 forks source link

SO_NAME and SO_VERSION #2

Closed VolkerEnderlein closed 6 years ago

VolkerEnderlein commented 6 years ago

Original report by Giampiero Gabbiani (Bitbucket: ggabbiani, GitHub: ggabbiani).


Hi all,

I noticed that the PR#11 sets SO_NAME and SO_VERSION programmatically in the CMakeLists.txt.

line 24: math(EXPR SO${GUI}_SO_VERSION ${PROJECT_VERSION_MAJOR}*20)
...
line 338: set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${SO${GUI}_VERSION} SOVERSION ${SO${GUI}_SO_VERSION})

Now the current SO_VERSION is set to 20 and it's fine for me.

But I don't understand the reason for incrementing it 20 times the major version.

On Linux systems this is confusing, since the semantic of the SO VERSION has to reflect ABI compatibility and the assessed behaviour is to increment it whenever the API major version increases and/or whenever ABI compatibility is broken.

My proposal is to set it in one of these possible ways (listed in decreasing order of manageability):

  1. equal to the major version
  2. equal to 20 and adding the API major version
  3. modifying it by hand

Regards Giampiero

VolkerEnderlein commented 6 years ago

Original comment by Volker Enderlein (Bitbucket: VolkerEnderlein, GitHub: VolkerEnderlein).


Before adding this line I had a look in the old configure scripts and extracted the relevant information from that. The original Coin developers decided to follow that pattern (major_version*20) in all of their projects (coin, soqt, quarter, ...) As other packages are using this information it is hard to change now I think.

VolkerEnderlein commented 6 years ago

Original comment by Giampiero Gabbiani (Bitbucket: ggabbiani, GitHub: ggabbiani).


Hi Volker,

thanks , I agree with you: is not possible to lower now.

The following is a different issue but I mention just to share: in other components you mentioned the 'old' behaviour currently seems to be lost since the SOVERSION is either not used at all (simage, Quarter) or used as 'equal to major' (Coin) (and this is likely the cause of my misunderstanding when comparing with SoQt).

Regards Giampiero

VolkerEnderlein commented 6 years ago

Original comment by Volker Enderlein (Bitbucket: VolkerEnderlein, GitHub: VolkerEnderlein).


AFAIK Coin also uses a SO_VERSION of major_version*20. See section 3 in the FAQ starting at line 287 for a detailed explanation. The did not use this on quarter, but that may be by accident not by intention. The ABI_CURRENT for most of the subprojects of Coin uses major_version*20+minor_version (see configure.ac).

VolkerEnderlein commented 6 years ago

Original comment by Giampiero Gabbiani (Bitbucket: ggabbiani, GitHub: ggabbiani).


Many thanks for the references Volker after your first answer I suspected they wanted to preserve a slot for parallel development.

As for the missing behaviour I was referring to the CMake current one not the autotools that I thought not used anymore after the move to CMake .

But even in case they are, the problem still remains since they manage SONAME differently (cmake in the way described before , autotoolswith with major_version*20+minor_version).

As for the accident vs intention ... it was just want I meant: it is likely that in the conversion from the autotools to CMake something was missed.

VolkerEnderlein commented 6 years ago

Original comment by Giampiero Gabbiani (Bitbucket: ggabbiani, GitHub: ggabbiani).


After the explanation of Volker the currently used SONAME in SOQt is the correct one.

As for the other, my understanding is that is a matter of alignment of what done on SoQt CMakeLists.txt with the corresponding ones of Coin, Quarter and maybe simage.

Regards Giampiero