Bug 211334

Summary: science/paraview conflicts with math/vtk6 on Release 10.3
Product: Ports & Packages Reporter: Chen Xie <xiechen96>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: devel, stephen
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Description Flags
proposed patch none

Description Chen Xie 2016-07-24 12:56:41 UTC
science/paraview is built normally with default config. There is something wrong with installation.

Installing paraview-4.3.1_2...
pkg-static: paraview-4.3.1_2 conflicts with vtk6-6.2.0_2 (installs files into the same place).  Problematic file: /usr/local/share/cmake/hdf5/libhdf5.settings
*** Error code 70

make[1]: stopped in /usr/ports/science/paraview
*** Error code 1
Comment 1 Stephen Montgomery-Smith freebsd_committer 2016-07-26 11:42:33 UTC
I see the problem, but I have no idea how to fix it!  devel@stasyan, do yuo have any ideas?

Here is the diff of the two files.  The first file is that installed by math/vtk6.  The differences seem very inconsequential.

diff -u /usr/local/share/cmake/hdf5/libhdf5.settings work/stage//usr/local/share/cmake/hdf5/libhdf5.settings
--- /usr/local/share/cmake/hdf5/libhdf5.settings        2016-07-26 02:02:44.000000000 +0000
+++ work/stage//usr/local/share/cmake/hdf5/libhdf5.settings     2016-07-26 02:51:01.000000000 +0000
@@ -20,7 +20,7 @@
                          CFLAGS: -O2 -pipe  -fstack-protector -fno-strict-aliasing  -w -w -w
-                       CPPFLAGS: -O2 -pipe -fstack-protector -fno-strict-aliasing  -I/usr/local/include  -w -w -w
+                       CPPFLAGS: -O2 -pipe -fstack-protector -fno-strict-aliasing  -w -w -w
                Shared Libraries: YES
@@ -37,14 +37,14 @@
-               Fortran Compiler: 
+               Fortran Compiler: /usr/local/bin/gfortran
           Fortran 2003 Compiler: 
                   Fortran Flags: 
                H5 Fortran Flags: 
                AM Fortran Flags: 
                             C++: OFF
                    C++ Compiler: /usr/bin/c++
-                      C++ Flags: -O2 -pipe -fstack-protector -fno-strict-aliasing  -I/usr/local/include  -w -w -w
+                      C++ Flags: -O2 -pipe -fstack-protector -fno-strict-aliasing  -w -w -w
                    H5 C++ Flags: 
                    AM C++ Flags:
Comment 2 Stephen Montgomery-Smith freebsd_committer 2016-07-26 11:58:22 UTC
One possibility is for us to modify pkg-plist, so that libhdf5.settings is only installed if it doesn't already exist.  We do this somehow uing @exec style keywords: see

But I also foresee problems with installing from ports versus packages, especially with the deinstallation.
Comment 3 Stephen Montgomery-Smith freebsd_committer 2016-07-28 21:06:28 UTC
Created attachment 173079 [details]
proposed patch

Can you try this patch?  I know it builds and installs, but I want you to test to see if this stops vtk from working.  I don't use vtk these days.  Please test vtk when paraview is not installed.
Comment 4 Chen Xie 2016-07-29 12:45:47 UTC
I patch vtk6 and reinstall it. I run several simple examples, vtk6 works!(In reply to Stephen Montgomery-Smith from comment #3)
Comment 5 commit-hook freebsd_committer 2016-07-29 23:46:09 UTC
A commit references this bug:

Author: stephen
Date: Fri Jul 29 23:45:41 UTC 2016
New revision: 419283
URL: https://svnweb.freebsd.org/changeset/ports/419283

  - Don't install share/cmake/hdf5/libhdf5.settings to avoid clash with

  PR:		ports/211334
  Submitted by:	Chen Xie <xiechen96@gmail.com>

Comment 6 Stephen Montgomery-Smith freebsd_committer 2016-07-29 23:47:07 UTC
Patch committed, thanks.
Comment 7 Chen Xie 2016-07-31 06:25:11 UTC
Both of two are available, thanks all.