Skip to content

Commit

Permalink
Workaround Missing SONAME in Libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Feb 15, 2022
1 parent dc68132 commit 9e36299
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/build_and_test.yml
Expand Up @@ -1309,7 +1309,16 @@ jobs:
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
cd OpenDDS
./configure --compiler=clang++-5.0 --no-inline --features=uses_wchar=1 --std=c++11 --tests --security --ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC
./configure \
--ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE \
--mpc=$GITHUB_WORKSPACE/MPC \
--compiler=clang++-5.0 \
--std=c++11 \
--no-inline \
--features=uses_wchar=1 \
--macros=SOFLAGS+=-Wl,-h,\$\(SONAME\)
--tests \
--security
- name: build ACE and TAO
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -1376,7 +1385,17 @@ jobs:
- name: configure OpenDDS
run: |
cd OpenDDS
./configure --compiler=clang++-5.0 --no-inline --features=uses_wchar=1 --std=c++11 --tests --security --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --rapidjson --mpc=$GITHUB_WORKSPACE/MPC
./configure \
--ace=$GITHUB_WORKSPACE/ACE_TAO/ACE \
--mpc=$GITHUB_WORKSPACE/MPC \
--compiler=clang++-5.0 \
--std=c++11 \
--no-inline \
--features=uses_wchar=1 \
--macros=SOFLAGS+=-Wl,-h,\$\(SONAME\)
--tests \
--security \
--rapidjson
- name: check build configuration
shell: bash
run: |
Expand Down Expand Up @@ -1562,7 +1581,15 @@ jobs:
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
cd OpenDDS
./configure --compiler=clang++-10 --std=c++11 --tests --security --no-rapidjson --ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC
./configure \
--ace=$GITHUB_WORKSPACE/OpenDDS/ACE_TAO/ACE \
--mpc=$GITHUB_WORKSPACE/MPC \
--compiler=clang++-10 \
--std=c++11 \
--macros=SOFLAGS+=-Wl,-h,\$\(SONAME\) \
--tests \
--security \
--no-rapidjson
- name: build ACE and TAO
if: steps.cache-artifact.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -1629,7 +1656,16 @@ jobs:
- name: configure OpenDDS
run: |
cd OpenDDS
./configure --compiler=clang++-10 --std=c++11 --tests --security --no-rapidjson --ace=$GITHUB_WORKSPACE/ACE_TAO/ACE --mpc=$GITHUB_WORKSPACE/MPC --mpcopts="-features no_opendds_testing_features=0"
./configure \
--ace=$GITHUB_WORKSPACE/ACE_TAO/ACE \
--mpc=$GITHUB_WORKSPACE/MPC \
--compiler=clang++-10 \
--std=c++11 \
--macros=SOFLAGS+=-Wl,-h,\$\(SONAME\) \
--tests \
--security \
--no-rapidjson \
--mpcopts="-features no_opendds_testing_features=0"
- name: check build configuration
shell: bash
run: |
Expand Down
10 changes: 10 additions & 0 deletions docs/cmake.md
Expand Up @@ -484,6 +484,16 @@ OpenDDS, ACE, and TAO in CMake along side the application using
This will just install shared libraries, not any development dependencies like
`opendds_idl` or static libraries.

If OpenDDS and ACE/TAO is built with `clang`, the shared libraries might be

This comment has been minimized.

Copy link
@mitza-oci

mitza-oci Feb 15, 2022

Note that this is only Linux?

missing an `SONAME` entry. Is is
[an issue with ACE/TAO](https://github.com/DOCGroup/ACE_TAO/issues/1790).
If trying to use `install(IMPORTED_RUNTIME_ARTIFACTS)` in this case, it causes
the dynamic linker to ignore the libraries and report that they could not be
found. One workaround is to add `SOFLAGS+=-Wl,-h,$(SONAME)` to
`$ACE_ROOT/include/makeinclude/platform_macros.GNU` before building. This can
be done mannually after running the configure script or by passing
`--macros=SOFLAGS+=-Wl,-h,\$\(SONAME\)` to the configure script.

A function called `opendds_get_library_dependencies` is provided to help find
out what libraries need to be installed:

Expand Down

0 comments on commit 9e36299

Please sign in to comment.