Bug 225999 - devel/yaml-cpp: Version 0.6.1 conflicts with devel/googletest
Summary: devel/yaml-cpp: Version 0.6.1 conflicts with devel/googletest
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-02-18 14:37 UTC by Rainer Hurling
Modified: 2018-02-19 13:58 UTC (History)
3 users (show)

See Also:
jbeich: maintainer-feedback+
madpilot: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer freebsd_triage 2018-02-18 14:37:23 UTC
devel/yaml-cpp installs a file, that is also installed by devel/googletest:


===>   Registering installation for yaml-cpp-0.6.1
Installing yaml-cpp-0.6.1...
pkg-static: yaml-cpp-0.6.1 conflicts with googletest-1.8.0.450 (installs files into the same place).  Problematic file: /usr/local/include/gtest/gtest-death-test.h
*** Error code 70
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-02-18 15:19:51 UTC
yaml-cpp should probably switch to use system gtest/gmock which are both newer and better supported on BSDs (death tests, stream results, thread count, build on DragonFly). If there's no plan to actually run tests (see ports r398125) then an easier fix is to disable build/install of bundled gtest/gmock via CMAKE_OFF=YAML_CPP_BUILD_TESTS.

https://www.freebsd.org/doc/en/books/porters-handbook/bundled-libs.html
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2018-02-18 17:32:42 UTC
Thanks for the report. I did not notice this before committing.

Since I don't think testing to be necessary with the installed port for our use as a library, I'd disable installing test files.

I'd add tests as an option, in case some user actually needs those for development.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-02-19 13:07:27 UTC
A commit references this bug:

Author: madpilot
Date: Mon Feb 19 13:06:41 UTC 2018
New revision: 462315
URL: https://svnweb.freebsd.org/changeset/ports/462315

Log:
  - Disable building the test suite by default to avoid conflict with
    devel/googletest [1]
  - Add option TEST(disabled by default) allowing interested users
    to install the testing suite and register conflict with devel/googletest
    when enabled
  - While here silence portling warning

  PR:		225999 [1]
  Submitted by:	Rainer Hurling <rhurlin@gwdg.de>

Changes:
  head/devel/yaml-cpp/Makefile
  head/devel/yaml-cpp/pkg-plist
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2018-02-19 13:07:50 UTC
New option fixing the issue committed.

Thanks!
Comment 5 Jan Beich freebsd_committer freebsd_triage 2018-02-19 13:47:12 UTC
${BUILD_WRKSRC}/test/run-tests is the testing suite, not gtest/gmock files in pkg-plist. TEST option neither runs nor installs it. What's the point then?
Comment 6 Guido Falsi freebsd_committer freebsd_triage 2018-02-19 13:58:24 UTC
(In reply to Jan Beich from comment #5)
> ${BUILD_WRKSRC}/test/run-tests is the testing suite, not gtest/gmock files
> in pkg-plist. TEST option neither runs nor installs it. What's the point
> then?

I'm adapting to what the upstream build system is doing. I actually don't know the details of this test suite, so I assumed (maybe wrongly) that they where installing the correct files when enabling the relevant option.

Maybe their build system is broken, but since I'm not proficient with their testing system (not a master with CMake either) I just followed suit.

I'm open to suggestions and patches. At least I fixed the actual problem at hand which was the file conflict.