[MacPorts] #70295: gdal +hdf5 and/or +netcdf look for non-existing include path (was: gdal +hdf5 looks for non-existing include path)
MacPorts
noreply at macports.org
Wed Jun 26 10:08:16 UTC 2024
#70295: gdal +hdf5 and/or +netcdf look for non-existing include path
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: gdal, mpich |
---------------------------+--------------------
Description changed by barracuda156:
Old description:
> This code in the portfile is wrong:
> {{{
> variant hdf5 description {Enable HDF5 file format} {
> pre-configure {
> # If HDF5 is built with a mpi variant, we need to know the path
> to "mpi.h".
> # Figure out HDF5's mpi include directory:
> set mpl_include_dir ""
> if {![catch {set result [active_variants hdf5 openmpi]}]} {
> if {$result} {
> set mpl_include_dir "-I${prefix}/include/openmpi-mp"
> }
> }
> if {![catch {set result [active_variants hdf5 mpich]}]} {
> if {$result} {
> set mpl_include_dir "-I${prefix}/include/mpich-mp"
> }
> }
> if {$mpl_include_dir ne ""} {
> configure.cxxflags-append ${mpl_include_dir}
> }
> }
> depends_lib-append port:hdf5
> configure.args-replace -DGDAL_USE_HDF5=OFF -DGDAL_USE_HDF5=ON
> configure.args-append -DGDAL_ENABLE_DRIVER_HDF5=ON
> }
> }}}
>
> It assumes `mpich-default` is used, apparently. It needs not be the case.
>
> And the this happens:
> {{{
> [ 13%] Building CXX object ogr/CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o
> cd
> /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/ogr
> && /opt/local/bin/g++-mp-13 -DDONT_DEPRECATE_SPRINTF -DGDAL_COMPILATION
> -DHAVE_EXPAT -DHAVE_GEOS=1 -DHAVE_MITAB -DHAVE_ZLIB -DHAVE_ZLIB_H
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/apps
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/alg
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/gcore
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/gcore
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/port
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/port
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/frmts
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/geojson
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/mem
> -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/geojson/libjson
> -I/opt/local/lib/proj9/include -I/opt/local/include/geos
> -I/opt/local/include -pipe -DGDAL_COMPILATION -DNDEBUG
> -I/opt/local/include -I/opt/local/include/LegacySupport
> -I/opt/local/include/mpich-mp -I/opt/local/include/mpich-mp
> -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -arch ppc -mmacosx-
> version-min=10.6 -fPIC -Wall -Wextra -Winit-self -Wunused-parameter
> -Wmissing-declarations -Wlogical-op -Wshadow -Wmissing-include-dirs
> -Wformat -Werror=format-security -Wno-format-nonliteral -Werror=vla -Wno-
> clobbered -Wdate-time -Wnull-dereference -Wextra-semi -Wfloat-conversion
> -Wnon-virtual-dtor -Woverloaded-virtual -Wsuggest-override -fno-operator-
> names -Wzero-as-null-pointer-constant -Wold-style-cast -Weffc++ -MD -MT
> ogr/CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o -MF
> CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o.d -o
> CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o -c
> /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrfeaturestyle.cpp
> cc1plus: warning: /opt/local/include/mpich-mp: No such file or directory
> [-Wmissing-include-dirs]
> cc1plus: warning: /opt/local/include/mpich-mp: No such file or directory
> [-Wmissing-include-dirs]
> }}}
>
> While the correct path would be `/opt/local/include/mpich-gcc13`.
>
> Just in case, this is not a powerpc-specific problem, even though I faced
> it on powerpc. If one installs `mpich-gcc*` on any system, it likewise
> will break down.
New description:
This code in the portfile is wrong:
{{{
variant hdf5 description {Enable HDF5 file format} {
pre-configure {
# If HDF5 is built with a mpi variant, we need to know the path to
"mpi.h".
# Figure out HDF5's mpi include directory:
set mpl_include_dir ""
if {![catch {set result [active_variants hdf5 openmpi]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/openmpi-mp"
}
}
if {![catch {set result [active_variants hdf5 mpich]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/mpich-mp"
}
}
if {$mpl_include_dir ne ""} {
configure.cxxflags-append ${mpl_include_dir}
}
}
depends_lib-append port:hdf5
configure.args-replace -DGDAL_USE_HDF5=OFF -DGDAL_USE_HDF5=ON
configure.args-append -DGDAL_ENABLE_DRIVER_HDF5=ON
}
}}}
It assumes `mpich-default` is used, apparently. It needs not be the case.
And the this happens:
{{{
[ 13%] Building CXX object ogr/CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o
cd
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/ogr
&& /opt/local/bin/g++-mp-13 -DDONT_DEPRECATE_SPRINTF -DGDAL_COMPILATION
-DHAVE_EXPAT -DHAVE_GEOS=1 -DHAVE_MITAB -DHAVE_ZLIB -DHAVE_ZLIB_H
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/apps
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/alg
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/gcore
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/gcore
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/port
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/build/port
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/frmts
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/geojson
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/mem
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrsf_frmts/geojson/libjson
-I/opt/local/lib/proj9/include -I/opt/local/include/geos
-I/opt/local/include -pipe -DGDAL_COMPILATION -DNDEBUG
-I/opt/local/include -I/opt/local/include/LegacySupport
-I/opt/local/include/mpich-mp -I/opt/local/include/mpich-mp
-D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -arch ppc -mmacosx-version-
min=10.6 -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-
declarations -Wlogical-op -Wshadow -Wmissing-include-dirs -Wformat -Werror
=format-security -Wno-format-nonliteral -Werror=vla -Wno-clobbered -Wdate-
time -Wnull-dereference -Wextra-semi -Wfloat-conversion -Wnon-virtual-dtor
-Woverloaded-virtual -Wsuggest-override -fno-operator-names -Wzero-as-
null-pointer-constant -Wold-style-cast -Weffc++ -MD -MT
ogr/CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o -MF
CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o.d -o
CMakeFiles/ogr.dir/ogrfeaturestyle.cpp.o -c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_gis_gdal/gdal/work/gdal-3.9.0/ogr/ogrfeaturestyle.cpp
cc1plus: warning: /opt/local/include/mpich-mp: No such file or directory
[-Wmissing-include-dirs]
cc1plus: warning: /opt/local/include/mpich-mp: No such file or directory
[-Wmissing-include-dirs]
}}}
While the correct path would be `/opt/local/include/mpich-gcc13`.
Same problem with `+netcdf`.
Just in case, this is not a powerpc-specific problem, even though I faced
it on powerpc. If one installs `mpich-gcc*` on any system, it likewise
will break down.
--
--
Ticket URL: <https://trac.macports.org/ticket/70295#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list