Menu

#896 TOra's build system sets $$ORIGIN value, which provides 'bad substitution' error message

None
pending-postponed
nobody
None
5
2016-02-23
2015-05-12
No

Building dev-db/tora (up to recent live version) with dev-util/cmake-2.8.12.2-r1 provides the following error messages:

/var/db/pkg/dev-db/tora-3.0.0_pre20140929/NEEDED.ELF.2: $: bad substitution
/var/db/pkg/dev-db/tora-3.0.0_pre20140929/NEEDED.ELF.2: $: bad substitution
/var/db/pkg/dev-db/tora-3.0.0_pre20140929/NEEDED.ELF.2: $: bad substitution

The following update of build scripts:

# bug 547520
grep -rlZ '$$ORIGIN' . | xargs -0 sed -i 's|:$$ORIGIN[^:"]*||' || \
die 'Removal of $$ORIGIN failed'

Fixes issue.

See downstream bug #547520bug #542796 for details.

To my mind this fix should be included by upstream.

Discussion

  • Ivan Brezina

    Ivan Brezina - 2016-02-23

    I recall I added both $ORIGIN and $$ORIGIN because cmake might be very cryptic sometimes, when it comes to handling special characters. This guarantees, that then poracle plugin will work regarless of cmake version being used.

    There in so way how to load Oracle client lib libclntsh.so via dlopen. Also there is not way how to change LD_LIBRARY_PATH from runing application. Therefore the plugin poracle.so uses $ORIGIN to point onlo library symlink named libclntsh.so. Then when poracle.so is loaded, libclntsh.so is loaded too.

    This works even if there is no LD_LIBRARY_PATH pointing into ORACLE_HOME.
    And you can switch between various oracle clients libs without changing system env. variables.

    Lets leave this ticket open for a while. "fixing" it might broke other distros using different version of cmake.

     
  • Ivan Brezina

    Ivan Brezina - 2016-02-23
    • status: open --> pending-postponed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB