install directory of headers

Issue #20 new
Nico Schlömer created an issue

When installing MOAB, most headers install into /usr/include/moab/; some others, however, go directly into /usr/include/;

drwxr-xr-x root/root         0 2015-10-26 11:32 ./
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/include/
-rw-r--r-- root/root     25085 2015-10-26 11:22 ./usr/include/Coupler.hpp
-rw-r--r-- root/root     27149 2015-10-26 11:22 ./usr/include/DagMC.hpp
-rw-r--r-- root/root     15280 2015-10-26 11:22 ./usr/include/ElemUtil.hpp
-rw-r--r-- root/root      7183 2015-10-26 11:22 ./usr/include/MBCN.h
-rw-r--r-- root/root      3467 2015-10-26 11:30 ./usr/include/MBCN_protos.h
-rw-r--r-- root/root      5119 2015-10-26 11:22 ./usr/include/MBEntityType.h
-rw-r--r-- root/root      3587 2015-10-26 11:22 ./usr/include/MBParallelConventions.h
-rw-r--r-- root/root      7843 2015-10-26 11:22 ./usr/include/MBTagConventions.hpp
-rw-r--r-- root/root      4558 2015-10-26 11:22 ./usr/include/MBiMesh.hpp
-rw-r--r-- root/root       260 2015-10-26 11:29 ./usr/include/MOAB_FCDefs.h
-rw-r--r-- root/root      8182 2015-10-26 11:22 ./usr/include/WriteHDF5Parallel.hpp
-rw-r--r-- root/root     26231 2015-10-26 11:22 ./usr/include/iBase.h
-rw-r--r-- root/root      5253 2015-10-26 11:29 ./usr/include/iBase_f.h
-rw-r--r-- root/root    122516 2015-10-26 11:22 ./usr/include/iMesh.h
-rw-r--r-- root/root        55 2015-10-26 11:31 ./usr/include/iMeshP_extensions_protos.h
-rw-r--r-- root/root      6351 2015-10-26 11:31 ./usr/include/iMeshP_protos.h
-rw-r--r-- root/root     21427 2015-10-26 11:22 ./usr/include/iMesh_extensions.h
-rw-r--r-- root/root      1500 2015-10-26 11:31 ./usr/include/iMesh_extensions_protos.h
-rw-r--r-- root/root      1242 2015-10-26 11:22 ./usr/include/iMesh_f.h
-rw-r--r-- root/root      8991 2015-10-26 11:31 ./usr/include/iMesh_protos.h
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/include/moab/
-rw-r--r-- root/root     23789 2015-10-26 11:22 ./usr/include/moab/AdaptiveKDTree.hpp
-rw-r--r-- root/root     17336 2015-10-26 11:22 ./usr/include/moab/BSPTree.hpp
-rw-r--r-- root/root      2260 2015-10-26 11:22 ./usr/include/moab/BSPTreePoly.hpp
-rw-r--r-- root/root     16717 2015-10-26 11:22 ./usr/include/moab/BVHTree.hpp
-rw-r--r-- root/root      6092 2015-10-26 11:22 ./usr/include/moab/BoundBox.hpp
-rw-r--r-- root/root     28696 2015-10-26 11:22 ./usr/include/moab/CN.hpp
-rw-r--r-- root/root      5151 2015-10-26 11:22 ./usr/include/moab/CartVect.hpp
-rw-r--r-- root/root      3726 2015-10-26 11:22 ./usr/include/moab/Compiler.hpp
-rw-r--r-- root/root     65162 2015-10-26 11:22 ./usr/include/moab/Core.hpp
-rw-r--r-- root/root       878 2015-10-26 11:22 ./usr/include/moab/CpuTimer.hpp
-rw-r--r-- root/root     18260 2015-10-26 11:22 ./usr/include/moab/DualTool.hpp
-rw-r--r-- root/root     24931 2015-10-26 11:22 ./usr/include/moab/ElemEvaluator.hpp
-rw-r--r-- root/root      1133 2015-10-26 11:29 ./usr/include/moab/EntityHandle.hpp
-rw-r--r-- root/root       136 2015-10-26 11:22 ./usr/include/moab/EntityType.hpp
-rw-r--r-- root/root      2044 2015-10-26 11:22 ./usr/include/moab/Error.hpp
-rw-r--r-- root/root      7441 2015-10-26 11:22 ./usr/include/moab/ErrorHandler.hpp
-rw-r--r-- root/root      2411 2015-10-26 11:22 ./usr/include/moab/ExoIIInterface.hpp
-rw-r--r-- root/root     10234 2015-10-26 11:22 ./usr/include/moab/FBEngine.hpp
-rw-r--r-- root/root      9260 2015-10-26 11:22 ./usr/include/moab/FileOptions.hpp
-rw-r--r-- root/root     23414 2015-10-26 11:22 ./usr/include/moab/FindPtFuncs.h
-rw-r--r-- root/root       839 2015-10-26 11:22 ./usr/include/moab/Forward.hpp
-rw-r--r-- root/root      6286 2015-10-26 11:22 ./usr/include/moab/GeomTopoTool.hpp
-rw-r--r-- root/root     16592 2015-10-26 11:22 ./usr/include/moab/GeomUtil.hpp
-rw-r--r-- root/root      5362 2015-10-26 11:22 ./usr/include/moab/HigherOrderFactory.hpp
-rw-r--r-- root/root     22577 2015-10-26 11:22 ./usr/include/moab/HomXform.hpp
-rw-r--r-- root/root    105420 2015-10-26 11:22 ./usr/include/moab/Interface.hpp
-rw-r--r-- root/root      2590 2015-10-26 11:22 ./usr/include/moab/LinearHex.hpp
-rw-r--r-- root/root      2573 2015-10-26 11:22 ./usr/include/moab/LinearQuad.hpp
-rw-r--r-- root/root      2866 2015-10-26 11:22 ./usr/include/moab/LinearTet.hpp
-rw-r--r-- root/root      2872 2015-10-26 11:22 ./usr/include/moab/LinearTri.hpp
-rw-r--r-- root/root     10580 2015-10-26 11:29 ./usr/include/moab/MOABConfig.h
-rw-r--r-- root/root     15366 2015-10-26 11:22 ./usr/include/moab/Matrix3.hpp
-rw-r--r-- root/root      1893 2015-10-26 11:22 ./usr/include/moab/MergeMesh.hpp
-rw-r--r-- root/root      8499 2015-10-26 11:22 ./usr/include/moab/MeshTopoUtil.hpp
-rw-r--r-- root/root      6226 2015-10-26 11:22 ./usr/include/moab/MetisPartitioner.hpp
-rw-r--r-- root/root     22441 2015-10-26 11:22 ./usr/include/moab/OrientedBoxTreeTool.hpp
-rw-r--r-- root/root     72428 2015-10-26 11:22 ./usr/include/moab/ParallelComm.hpp
-rw-r--r-- root/root      1567 2015-10-26 11:22 ./usr/include/moab/ParallelData.hpp
-rw-r--r-- root/root      2702 2015-10-26 11:22 ./usr/include/moab/ParallelMergeMesh.hpp
-rw-r--r-- root/root      1852 2015-10-26 11:22 ./usr/include/moab/ProcConfig.hpp
-rw-r--r-- root/root     11690 2015-10-26 11:22 ./usr/include/moab/ProgOptions.hpp
-rw-r--r-- root/root      2711 2015-10-26 11:22 ./usr/include/moab/QuadraticHex.hpp
-rw-r--r-- root/root     26625 2015-10-26 11:22 ./usr/include/moab/Range.hpp
-rw-r--r-- root/root      9876 2015-10-26 11:22 ./usr/include/moab/RangeMap.hpp
-rw-r--r-- root/root      7751 2015-10-26 11:22 ./usr/include/moab/ReadUtilIface.hpp
-rw-r--r-- root/root      3893 2015-10-26 11:22 ./usr/include/moab/ReaderIface.hpp
-rw-r--r-- root/root      5379 2015-10-26 11:22 ./usr/include/moab/ReaderWriterSet.hpp
-rw-r--r-- root/root      8728 2015-10-26 11:22 ./usr/include/moab/ReorderTool.hpp
-rw-r--r-- root/root     55041 2015-10-26 11:22 ./usr/include/moab/ScdInterface.hpp
-rw-r--r-- root/root      5542 2015-10-26 11:22 ./usr/include/moab/SetIterator.hpp
-rw-r--r-- root/root     14517 2015-10-26 11:22 ./usr/include/moab/Skinner.hpp
-rw-r--r-- root/root     14137 2015-10-26 11:22 ./usr/include/moab/SpatialLocator.hpp
-rw-r--r-- root/root      5040 2015-10-26 11:22 ./usr/include/moab/SpectralMeshTool.hpp
-rw-r--r-- root/root     11504 2015-10-26 11:22 ./usr/include/moab/Tree.hpp
-rw-r--r-- root/root      6537 2015-10-26 11:22 ./usr/include/moab/TreeStats.hpp
-rw-r--r-- root/root      4365 2015-10-26 11:22 ./usr/include/moab/Types.hpp
-rw-r--r-- root/root      2648 2015-10-26 11:22 ./usr/include/moab/UnknownInterface.hpp
-rw-r--r-- root/root      1755 2015-10-26 11:22 ./usr/include/moab/Util.hpp
-rw-r--r-- root/root      6442 2015-10-26 11:22 ./usr/include/moab/VerdictWrapper.hpp
-rw-r--r-- root/root     18949 2015-10-26 11:22 ./usr/include/moab/WriteUtilIface.hpp
-rw-r--r-- root/root      2673 2015-10-26 11:22 ./usr/include/moab/WriterIface.hpp
-rw-r--r-- root/root      7260 2015-10-26 11:22 ./usr/include/moab/gs.hpp
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/include/moab/point_locater/
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/include/moab/point_locater/element_maps/
-rw-r--r-- root/root      4254 2015-10-26 11:22 ./usr/include/moab/point_locater/element_maps/linear_hex_map.hpp
-rw-r--r-- root/root      2770 2015-10-26 11:22 ./usr/include/moab/point_locater/element_maps/linear_tet_map.hpp
-rw-r--r-- root/root      7046 2015-10-26 11:22 ./usr/include/moab/point_locater/element_maps/quadratic_hex_map.hpp
-rw-r--r-- root/root      6471 2015-10-26 11:22 ./usr/include/moab/point_locater/element_maps/spectral_hex_map.hpp
-rw-r--r-- root/root      8167 2015-10-26 11:22 ./usr/include/moab/point_locater/io.hpp
-rw-r--r-- root/root      3304 2015-10-26 11:22 ./usr/include/moab/point_locater/parametrizer.hpp
-rw-r--r-- root/root      4374 2015-10-26 11:22 ./usr/include/moab/point_locater/point_locater.hpp
drwxr-xr-x root/root         0 2015-10-26 11:32 ./usr/include/moab/point_locater/tree/
-rw-r--r-- root/root     24252 2015-10-26 11:22 ./usr/include/moab/point_locater/tree/bvh_tree.hpp
-rw-r--r-- root/root      6580 2015-10-26 11:22 ./usr/include/moab/point_locater/tree/common_tree.hpp
-rw-r--r-- root/root     18186 2015-10-26 11:22 ./usr/include/moab/point_locater/tree/element_tree.hpp
-rw-r--r-- root/root     46223 2015-10-26 11:22 ./usr/include/moab/verdict.h
-rw-r--r-- root/root      1100 2015-10-26 11:22 ./usr/include/moab_mpi.h
-rw-r--r-- root/root       266 2015-10-26 11:29 ./usr/include/moab_mpi_config.h

cf. https://launchpadlibrarian.net/222867073/buildlog_ubuntu-wily-amd64.moab_4.8.3pre~201510261227-wily1_BUILDING.txt.gz.

While there's nothing programatically wrong with that, it's certainly inconsistent.

Comments (10)

  1. Vijay M

    I think this is a minor issue. Even an aesthetic one IMO. The separation of the headers is typically based on whether the feature is private or public. I think much of this philosophy has changed over the last two years but we haven't updated the installation because it will invariably break all user code out there.

    I think, probably for v5.0, we could namespace all MOAB headers, and install them under moab subdirectory. We can discuss this further in the list as needed.

  2. Nico Schlömer reporter

    For a MOAB dev it may be of aesthetic value. The problems start to become more relevant when packaging for a distribution. The rationale is generally: If all packages install their generic read.hpp, common.hpp etc. into /usr/include/, you'll very quickly run into problems. That's why namespacing headers (either by filename or by subdirectory) is generally considered good practice.

    will invariably break all user code out there.

    It will indeed, so I totally understand if this is held back until 6.0.

  3. Vijay M

    I think most of the headers either do use namespaced directory or file names but looking closely, some culprits do exist. I didn't realize we were not installing WriteHDF5Parallel.hpp under include/moab directory. And all the tools related headers should not be out there either. I'll look into this.

    I agree that from a package management standpoint this is cumbersome. We will at least standardize the above two points in the next release.

  4. Vijay M

    @gonuke @iulian07 @pshriwise Except for ITAPS and headers from tools (DagMC, Coupler and MB* wrappers), all the other headers are namespaced with moab now. Should we modify this behavior and install these other files under moab/tools and moab/mbwrappers respectively ? If downstream applications are configured with MOAB correctly using moab.make, this should be a simple enough change without breaking any code. Comments ?

  5. Paul Wilson

    I'm happy to support this change, but with our impending dagmc_refactor PR and a follow on that will remove DagMC headers, this won't impact us.

  6. Vijay M

    Sounds good. @iulian07 @rajeeja Do you see any issues from the MeshKit standpoint ? I hope not and if there is any, we should fix those accordingly too.

  7. Rajeev Jain

    Using vijaysm/fix-installation branch, I'm still getting this error: make[5]: Entering directory `/nfs2/jain/MeshKIT/src/algs/CoreGen' CXX CoreGen.lo CoreGen.cpp:2:35: fatal error: moab/VerdictWrapper.hpp: No such file or directory #include "moab/VerdictWrapper.hpp" ^

  8. Vijay M

    @gonuke Does your latest set of changes to fix header installations address some of these really old concerns ?

  9. Log in to comment