Opened 5 years ago

Last modified 3 months ago

#58807 assigned defect

xdmf: Error: Failed to activate xdmf: Image error: /opt/local/include/ProjectVersion.hpp is being used by the active vtk port

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stromnov (Andrey Stromnov), cooljeanius (Eric Gallager)
Port: xdmf vtk

Description

Upgrading vtk fails:

$ sudo port -u upgrade vtk
--->  Computing dependencies for jsoncpp
--->  Fetching archive for jsoncpp
--->  Attempting to fetch jsoncpp-1.9.1_0+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/jsoncpp
--->  Fetching distfiles for jsoncpp
--->  Attempting to fetch jsoncpp-1.9.1.tar.gz from https://distfiles.macports.org/jsoncpp
--->  Verifying checksums for jsoncpp
--->  Extracting jsoncpp
--->  Configuring jsoncpp
--->  Building jsoncpp
--->  Staging jsoncpp into destroot
--->  Installing jsoncpp @1.9.1_0+universal
--->  Cleaning jsoncpp
--->  Deactivating jsoncpp @1.8.4_0+universal
--->  Cleaning jsoncpp
--->  Activating jsoncpp @1.9.1_0+universal
--->  Cleaning jsoncpp
--->  Uninstalling jsoncpp @1.8.4_0+universal
--->  Cleaning jsoncpp
--->  Computing dependencies for libharu
--->  Fetching archive for libharu
--->  Attempting to fetch libharu-2.3.0_2+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/libharu
--->  Fetching distfiles for libharu
--->  Attempting to fetch RELEASE_2_3_0.tar.gz from https://distfiles.macports.org/libharu
--->  Verifying checksums for libharu
--->  Extracting libharu
--->  Applying patches to libharu
--->  Configuring libharu
--->  Building libharu
--->  Staging libharu into destroot
--->  Installing libharu @2.3.0_2+universal
--->  Activating libharu @2.3.0_2+universal
--->  Cleaning libharu
--->  Computing dependencies for xdmf
--->  Fetching archive for xdmf
--->  Attempting to fetch xdmf-3.0.0_0+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/xdmf
--->  Fetching distfiles for xdmf
--->  Verifying checksums for xdmf
--->  Extracting xdmf
--->  Applying patches to xdmf
--->  Configuring xdmf
--->  Building xdmf
--->  Staging xdmf into destroot
--->  Installing xdmf @3.0.0_0+universal
--->  Activating xdmf @3.0.0_0+universal
Error: Failed to activate xdmf: Image error: /opt/local/include/ProjectVersion.hpp is being used by the active vtk port.  Please deactivate this port first, or use 'port -f activate xdmf' to force the activation.
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports-ryandesign-fork_science_xdmf/xdmf/main.log for details.
Error: Problem while installing xdmf
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
$

If I force deactivate vtk before upgrading it, it works fine:

$ sudo port -f deactivate vtk; sudo port -u upgrade vtk
--->  Deactivating vtk @8.1.1_1+hdf5+python27+universal
--->  Cleaning vtk
--->  Computing dependencies for vtk
--->  Dependencies to be installed: xdmf
--->  Activating xdmf @3.0.0_0+universal
--->  Cleaning xdmf
--->  Fetching archive for vtk
--->  Attempting to fetch vtk-8.1.2_1+hdf5+python27+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/vtk
--->  Fetching distfiles for vtk
--->  Attempting to fetch VTK-8.1.2.tar.gz from https://distfiles.macports.org/vtk
--->  Verifying checksums for vtk
--->  Extracting vtk
--->  Configuring vtk
--->  Building vtk
--->  Staging vtk into destroot
--->  Installing vtk @8.1.2_1+hdf5+python27+universal
--->  Cleaning vtk
--->  Computing dependencies for vtk
--->  Activating vtk @8.1.2_1+hdf5+python27+universal
--->  Cleaning vtk
--->  Uninstalling vtk @8.1.1_1+hdf5+python27+universal
--->  Cleaning vtk
$

So a file or files which used to be provided by the vtk port are now provided by vtk's dependency xdmf. So xdmf needs to employ the deactivate hack to deactivate vtk, if a vtk of that vintage is active.

Are we sure that /opt/local/include/ProjectVersion.hpp is a file that should be installed at all by any port? Its name sounds very generic, such that I would not expect such a file to be installed in a public include directory.

Change History (3)

comment:1 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:2 Changed 3 months ago by Dave-Allured (Dave Allured)

Someone please retest this with current VTK version. In testing a new VTK update, 9.3.1, I found no trace of the offending include file, $prefix/include/ProjectVersion.hpp.

comment:3 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

I agree, searching the ports web site xdmf is the only port that installs that file today. I filed a bug report with them: https://gitlab.kitware.com/xdmf/xdmf/-/issues/34

Note: See TracTickets for help on using tickets.