[cmake-developers] OpenBSD without SONAME

Nils Gladitz nilsgladitz at gmail.com
Wed May 28 17:08:54 EDT 2014


On 28.05.2014 22:27, Rolf Eike Beer wrote:
> Nils Gladitz wrote:
> Given that the topic might have one valid use case after all?
> It would be useful as it would allow to drop more OpenBSD downstream patches.

It has been pointed out that this might not be the best approach given 
the potential ambiguities.

Is there no way to have it all?

OpenBSD really doesn't seem to want SONAME entries:
     http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs 
("Avoid DT_SONAME hardcoding")

CMake would much rather use full paths rather than -L/-l because of 
ambiguity problems.

On the binutils (ld) mailinglist it was proposed to change the behavior 
at one point (to embed filenames without path) but it was not done in 
the end.
Reason was that the ELF spec apparently requires the existing behavior:
     https://sourceware.org/ml/binutils/2001-05/msg00293.html

Is there no other way to use full paths and still get the correct NEEDED 
entries?

> I tried that, but if you simply remove the SONAME linker flag than e.g. a
> binary in the build tree will not be able to find a library in a sibling
> directory as long as you don't fiddle with LD_LIBRARY_PATH. And that is the
> point where I gave up and decided not to care any more.

     can't load library '../lib/libCMakeTestLibraryShared.so'
Looks like it is still using paths in the link(?).

Nils



More information about the cmake-developers mailing list