View Issue Details

IDProjectCategoryView StatusLast Update
0032856CommunityOCCT:Configurationpublic2022-10-19 15:55
ReporterStefanBruens Assigned Tovpozdyayev  
PrioritynormalSeverityintegration request 
Status verifiedResolutionfixed 
PlatformLinuxOSopenSUSE Tumbleweed 
Product Version7.0.0 
Target Version7.7.0 
Summary0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
DescriptionThe OCCT ABI has changed with every minor version in the past, but the version in the SONAME has been kept.

readelf -a /usr/lib64/libTKCAF.so.7 | grep SONAME
 0x000000000000000e (SONAME) Library soname: [libTKCAF.so.7]

This makes it very hard to keep the dependencies correct in dependent software.

The correct SONAME for libTKCAF would be `libTKCAF.so.7.6`, assuming the ABI is kept between 7.6.0 and 7.6.1
Steps To ReproduceUpdate OCCT from 7.5.3 to 7.6.1

Try to start e.g. FreeCAD, which will abort with a runtime linker error due to missing symbols.

"/usr/lib64/FreeCAD/lib/Part.so: undefined symbol: _ZN24BRepBuilderAPI_MakeShape5BuildEv"
Additional information
and documentation updates
Most Linux distributions (e.g. RHEL/Fedora, SLE/openSUSE, Debian) package libraries in a way which makes different versions co-installable. This allows to keep an older version when not all dependent packages are compatible with newer versions (e.g. FreeCAD last stable release 0.19.3 is only compatible with OCCT 7.5.x).

For this to work, the SONAME has to be updated on ABI change, otherwise a newer version is considered a compatible replacement for the old version.
TagsNo tags attached.
Test case numberN/A

Relationships

related to 0027233 closedkgv Open CASCADE Configuration - do not include version in SONAME for Android target 
child of 0026916 closedabv Open CASCADE Configuration, CMake - configure variables to customize installation path separately for executables, libraries and resources 

Activities

kgv

2022-02-25 14:02

developer   ~0107064

Last edited: 2022-02-25 14:02

@StefanBruens, I guess that `SOVERSION` in `adm/cmake/occt_toolkit.cmake`:
if (ANDROID)
  # do not append version to the filename
  set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}")
else()
  set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}"
                                                    SOVERSION     "${OCC_VERSION_MAJOR}"
                                                    VERSION       "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}")
endif()

should be changed from "${OCC_VERSION_MAJOR}" to "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}" to include minor release version.
Minor version bumps never preserve ABI, so it doesn't make sense relying only on major version in SONAME.

Technically, maintenance version bumps in OCCT might break ABI too, when patches are backported without caution.
But if we speak about Linux distros, I think that maintaining several micro versions (like 7.6.0 and 7.6.1) as dedicated packages wouldn't make much sense.

StefanBruens

2022-02-26 18:07

reporter   ~0107071

On a cursory glance, using `SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}"` has the wanted effect (using TKCAF as example, same for all other libs):

- SONAME in the ELF dynamic section becomes libTKCAF.so.7.6
- CMake adds libTKCAF.so and libTKCAF.so.7.6 symlinks to libTKCAF.so.7.6.1, no libTKCAF.so.7

git

2022-02-26 19:39

administrator   ~0107083

Branch CR32856 has been created by kgv.

SHA-1: 83e72d531ab80433ad0522f42c77a90e2f480b6c


Detailed log of new commits:

Author: kgv
Date: Sat Feb 26 19:29:44 2022 +0300

    0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
    
    Added option BUILD_SOVERSION_NUMBERS to manage SOVERSIOn length.
    Default option value is set to 2 (major.minor) instead of previously used 1 (major),
    excluding Android/Emscripten/Windows platforms that use 0 by default.

git

2022-02-26 20:31

administrator   ~0107084

Branch CR32856 has been updated forcibly by kgv.

SHA-1: 19dad1061bcd86c93d1546103dd1db95953e1e11

git

2022-02-26 20:49

administrator   ~0107086

Branch CR32856 has been updated forcibly by kgv.

SHA-1: 5d76b090175ae6874f096c5af4bad16595950c1f

kgv

2022-02-26 21:33

developer   ~0107088

Patch is ready for review
- OCCT: branch CR32856;
- OCC Products: branch CR32856.

http://jenkins-test-occt/view/CR32856-CR32856-KGV/

aml

2022-02-28 14:03

developer   ~0107100

Kirill,

1. There is a small misprint in the commit message "SOVERSIOn length" (SOVERSIOn - both OCCT and Products are affected).
2. Naming convention in CMake. I've seen that you're using the OCCT's naming style (`aSoVersion`). We historically employ UPPER_CASE naming in CMake. Does it sound good for you to keep original naming?

git

2022-02-28 14:27

administrator   ~0107101

Branch CR32856_1 has been created by kgv.

SHA-1: 04ab744791036af0d8c016f7baa4533346116c6f


Detailed log of new commits:

Author: kgv
Date: Sat Feb 26 19:29:44 2022 +0300

    0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
    
    Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
    Default option value is set to 2 (major.minor) instead of previously used 1 (major),
    excluding Android/Emscripten/Windows platforms that use 0 by default.

kgv

2022-02-28 14:30

developer   ~0107103

Remarks pushed to
- OCCT: branch CR32856_1;
- OCC Products: branch CR32856_1.

git

2022-02-28 18:56

administrator   ~0107107

Branch CR32856_1 has been updated by aml.

SHA-1: 818cce688e326330bd38d538196c29f495432589


Detailed log of new commits:

Author: aml
Date: Mon Feb 28 18:55:44 2022 +0300

    # Polishing.

git

2022-02-28 19:01

administrator   ~0107109

Branch CR32856_1 has been updated by aml.

SHA-1: f1c867f20ee1b0f5ff36b70c8e3d890f6a0ae420


Detailed log of new commits:

Author: aml
Date: Mon Feb 28 19:01:05 2022 +0300

    # Final polishing.

Author: aml
Date: Mon Feb 28 18:57:02 2022 +0300

    # Even more polishing.

git

2022-02-28 19:02

administrator   ~0107110

Branch CR32856_2 has been created by aml.

SHA-1: 7ead302566791da150b863c65f20052138c14582


Detailed log of new commits:

Author: kgv
Date: Sat Feb 26 19:29:44 2022 +0300

    0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
    
    Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
    Default option value is set to 2 (major.minor) instead of previously used 1 (major),
    excluding Android/Emscripten/Windows platforms that use 0 by default.

aml

2022-03-01 07:13

developer   ~0107112

Updated Jenkins job:

http://jenkins-test-occt/view/CR32856_2-CR32856_2-aml/view/ALL/

aml

2022-03-01 07:16

developer   ~0107113

Reviewed. Please rise the patch.

OCCT: CR32856_2
Products: CR32856_2

smoskvin

2022-03-06 10:09

administrator   ~0107205

Combination -
OCCT branch : IR-2022-03-05
master SHA - acce2c1448254a2e57cc940dc479a795dcc3f5f0
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2022-03-05 SHA - 811792d8c83c5e910e820c2e0f9efd0c3306cee3
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18394.330000000256 / 18467.180000000375 [-0.39%]
Products
Total CPU difference: 11708.150000000112 / 11716.630000000077 [-0.07%]
Windows-64-VC14:
OCCT
Total CPU difference: 20348.171875 / 20359.046875 [-0.05%]
Products
Total CPU difference: 13154.5625 / 13140.734375 [+0.11%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-03-06 13:20

administrator   ~0107221

Branch CR32856 has been deleted by mnt.

SHA-1: 5d76b090175ae6874f096c5af4bad16595950c1f

git

2022-03-06 13:20

administrator   ~0107222

Branch CR32856_1 has been deleted by mnt.

SHA-1: f1c867f20ee1b0f5ff36b70c8e3d890f6a0ae420

git

2022-03-06 13:20

administrator   ~0107223

Branch CR32856_2 has been deleted by mnt.

SHA-1: 7ead302566791da150b863c65f20052138c14582

Related Changesets

occt: master 75e2ba16

2022-02-26 19:29:44

kgv


Committer: smoskvin Details Diff
0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility

Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
Default option value is set to 2 (major.minor) instead of previously used 1 (major),
excluding Android/Emscripten/Windows platforms that use 0 by default.
Affected Issues
0032856
mod - adm/cmake/occt_toolkit.cmake Diff File
mod - adm/cmake/vardescr.cmake Diff File
mod - adm/qmake/OccToolkit.pri Diff File
mod - CMakeLists.txt Diff File

occt-products: master 320e5893

2022-02-26 20:48:46

kgv


Committer: aml Details Diff
0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility

Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length.
Default option value is set to 2 (major.minor) instead of previously used 1 (major),
excluding Android/Emscripten/Windows platforms that use 0 by default.
Affected Issues
0032856
mod - adm/cmake/vardescr.cmake Diff File
mod - CMakeLists.txt Diff File
mod - diff Diff File

Issue History

Date Modified Username Field Change
2022-02-25 13:08 StefanBruens New Issue
2022-02-25 13:08 StefanBruens Assigned To => bugmaster
2022-02-25 13:53 kgv Category OCCT:Release => OCCT:Configuration
2022-02-25 13:53 kgv Target Version => 7.7.0
2022-02-25 13:53 kgv Summary SONAME does not reflect ABI changes => Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility
2022-02-25 14:02 kgv Note Added: 0107064
2022-02-25 14:02 kgv Note Edited: 0107064
2022-02-25 14:02 kgv Product Version 7.6.1 => 7.0.0
2022-02-26 13:57 kgv Relationship added child of 0023957
2022-02-26 14:01 kgv Relationship added related to 0027233
2022-02-26 14:02 kgv Relationship added child of 0026916
2022-02-26 14:02 kgv Relationship deleted child of 0023957
2022-02-26 18:07 StefanBruens Note Added: 0107071
2022-02-26 19:39 git Note Added: 0107083
2022-02-26 20:31 git Note Added: 0107084
2022-02-26 20:49 git Note Added: 0107086
2022-02-26 21:32 kgv Assigned To bugmaster => aml
2022-02-26 21:32 kgv Severity minor => integration request
2022-02-26 21:32 kgv Status new => resolved
2022-02-26 21:33 kgv Note Added: 0107088
2022-02-28 14:03 aml Assigned To aml => kgv
2022-02-28 14:03 aml Status resolved => assigned
2022-02-28 14:03 aml Note Added: 0107100
2022-02-28 14:27 git Note Added: 0107101
2022-02-28 14:30 kgv Note Added: 0107103
2022-02-28 14:30 kgv Assigned To kgv => aml
2022-02-28 14:30 kgv Status assigned => resolved
2022-02-28 14:31 kgv Test case number => N/A
2022-02-28 18:56 git Note Added: 0107107
2022-02-28 19:01 git Note Added: 0107109
2022-02-28 19:02 git Note Added: 0107110
2022-03-01 07:13 aml Note Added: 0107112
2022-03-01 07:16 aml Assigned To aml => bugmaster
2022-03-01 07:16 aml Status resolved => reviewed
2022-03-01 07:16 aml Note Added: 0107113
2022-03-06 10:09 smoskvin Status reviewed => tested
2022-03-06 10:09 smoskvin Note Added: 0107205
2022-03-06 13:15 smoskvin Changeset attached => occt master 75e2ba16
2022-03-06 13:15 kgv Assigned To bugmaster => kgv
2022-03-06 13:15 kgv Status tested => verified
2022-03-06 13:15 kgv Resolution open => fixed
2022-03-06 13:15 aml Changeset attached => occt-products master 320e5893
2022-03-06 13:20 git Note Added: 0107221
2022-03-06 13:20 git Note Added: 0107222
2022-03-06 13:20 git Note Added: 0107223
2022-10-19 15:55 smoskvin Assigned To kgv => vpozdyayev