symbol lookup failed in OTB-7.0.0 binary package with wrong order of import in python

Description

Segmentation fault (core dumped)

Steps to reproduce

Download otb binary package for 7.0.0 wget https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-7.0.0-Linux64.run build python wrapping cmake -VV -S OTB-7.0.0-Linux64/share/otb/swig/build_wrapping.cmake

test_ok.py

#!/usr/bin/env python3

import otbApplication as otb
import gdal

test_fail.py

#!/usr/bin/env python3
import gdal
import otbApplication as otb

python3 test_ok.py python3 test_fail.py

I remember some discussion about this in old mantis tracker but can't remember all of its details.

Configuration information

Ubuntu Linux