Bug 201057 - [PATCH] devel/jsoncpp: Properly version libjsoncpp.so.
Summary: [PATCH] devel/jsoncpp: Properly version libjsoncpp.so.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
: 201056 (view as bug list)
Depends on:
Blocks: 200969
  Show dependency treegraph
 
Reported: 2015-06-22 21:44 UTC by Raphael Kubo da Costa
Modified: 2015-06-30 21:50 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch (4.40 KB, patch)
2015-06-22 21:44 UTC, Raphael Kubo da Costa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa freebsd_committer 2015-06-22 21:44:30 UTC
The attached patch fixes the problem described in bug 200969: currently, libjsoncpp.so is not properly versioned by SCons; in other words, there's no SONAME in the library's ELF header, which confuses the linker when creating binaries that link against it. This causes the problems in the bug I mentioned before.

Solve it by using InstallVersionedLib(), available since SCons 2.3.0: this call is able to properly version the shared library the way we need it. Since there is no support for actually installing the files outside the build directory, we have to recreate the required symlinks ourselves in the Makefile. Another related change is that we now create the libraries with the proper names instead of doing that in the Makefile.
Comment 1 Raphael Kubo da Costa freebsd_committer 2015-06-22 21:44:49 UTC
Created attachment 157994 [details]
Proposed patch
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2015-06-23 11:18:12 UTC
*** Bug 201056 has been marked as a duplicate of this bug. ***
Comment 3 commit-hook freebsd_committer 2015-06-30 21:43:49 UTC
A commit references this bug:

Author: rakuco
Date: Tue Jun 30 21:43:06 UTC 2015
New revision: 391009
URL: https://svnweb.freebsd.org/changeset/ports/391009

Log:
  Properly version libjsoncpp.so.

  Fix the problem described in bug 200969: currently, libjsoncpp.so is not
  properly versioned by SCons; in other words, there's no SONAME in the
  library's ELF header, which confuses the linker when creating binaries that
  link against it.

  Solve it by using InstallVersionedLib(), available since SCons 2.3.0: this
  call is able to properly version the shared library the way we need it.
  Since there is no support for actually installing the files outside the
  build directory, we have to recreate the required symlinks ourselves in the
  Makefile. Another related change is that we now create the libraries with
  the proper names instead of doing that in the Makefile.

  I'm (ab)using the maintainer's approval given to bug 200939, as swills's
  latest patch includes this change as well.

  PR:		200969
  PR:		201057
  Approved by:	johan@stromnet.se (maintainer)

Changes:
  head/devel/jsoncpp/Makefile
  head/devel/jsoncpp/files/patch-SConstruct
  head/devel/jsoncpp/files/patch-src_lib__json_sconscript
  head/devel/jsoncpp/pkg-plist