[MacPorts] #69928: hdf5 @1.14.4.2_1+cxx+fortran+gcc13+hl: error: 'PATH_MAX' undeclared (first use in this function) (was: Compiling hdf5 with gcc13)
MacPorts
noreply at macports.org
Mon May 6 21:50:41 UTC 2024
#69928: hdf5 @1.14.4.2_1+cxx+fortran+gcc13+hl: error: 'PATH_MAX' undeclared (first
use in this function)
--------------------------+----------------------
Reporter: jvianalopes | Owner: eborisch
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: hdf5 |
--------------------------+----------------------
Changes (by ryandesign):
* version: => 2.9.3
Old description:
> Hi,
>
> I tried to install hdf5 port with:
> sudo port -v install hdf5 +gcc13
>
> And it aborts with an error:
>
> ----
>
> {{{
> make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_hdf5/hdf5/work/hdf5-1.14.4.2/src'
> make[1]: *** [all] Error 2
>
> }}}
>
> ----
>
> moving to the directory:
>
> cd
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_hdf5/hdf5/work/hdf5-1.14.4.2
>
> and trying to compile:
>
> make
>
> Give-me the error:
>
> ----
>
> {{{
> In file included from H5encode.h:23,
> from H5private.h:1845,
> from H5Fint.c:22:
> H5Fint.c: In function 'H5F__build_actual_name':
> H5Fint.c:2817:65: error: 'PATH_MAX' undeclared (first use in this
> function); did you mean 'AF_MAX'?
> 2817 | if (NULL == (realname = (char
> *)H5MM_calloc((size_t)PATH_MAX * sizeof(char))))
> |
> ^~~~~~~~
> H5MMprivate.h:36:34: note: in definition of macro 'H5MM_calloc'
> 36 | #define H5MM_calloc(Z) calloc(1, Z)
> | ^
> H5Fint.c:2817:65: note: each undeclared identifier is reported only once
> for each function it appears in
> 2817 | if (NULL == (realname = (char
> *)H5MM_calloc((size_t)PATH_MAX * sizeof(char))))
> |
> ^~~~~~~~
> H5MMprivate.h:36:34: note: in definition of macro 'H5MM_calloc'
> 36 | #define H5MM_calloc(Z) calloc(1, Z)
> | ^
> make[2]: *** [H5Fint.lo] Error 1
> make[1]: *** [all] Error 2
> make: *** [all-recursive] Error 1
> }}}
>
> ----
>
> If complaints about this PATH_MAX definition.
> Do you have any suggestions? I was able to compile it with gcc12
>
> Thanks in advance
New description:
Hi,
I tried to install hdf5 port with:
{{{
sudo port -v install hdf5 +gcc13
}}}
And it aborts with an error:
----
{{{
make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_hdf5/hdf5/work/hdf5-1.14.4.2/src'
make[1]: *** [all] Error 2
}}}
----
moving to the directory:
{{{
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_hdf5/hdf5/work/hdf5-1.14.4.2
}}}
and trying to compile:
{{{
make
}}}
Give-me the error:
----
{{{
In file included from H5encode.h:23,
from H5private.h:1845,
from H5Fint.c:22:
H5Fint.c: In function 'H5F__build_actual_name':
H5Fint.c:2817:65: error: 'PATH_MAX' undeclared (first use in this
function); did you mean 'AF_MAX'?
2817 | if (NULL == (realname = (char
*)H5MM_calloc((size_t)PATH_MAX * sizeof(char))))
|
^~~~~~~~
H5MMprivate.h:36:34: note: in definition of macro 'H5MM_calloc'
36 | #define H5MM_calloc(Z) calloc(1, Z)
| ^
H5Fint.c:2817:65: note: each undeclared identifier is reported only once
for each function it appears in
2817 | if (NULL == (realname = (char
*)H5MM_calloc((size_t)PATH_MAX * sizeof(char))))
|
^~~~~~~~
H5MMprivate.h:36:34: note: in definition of macro 'H5MM_calloc'
36 | #define H5MM_calloc(Z) calloc(1, Z)
| ^
make[2]: *** [H5Fint.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
}}}
----
If complaints about this `PATH_MAX` definition.
Do you have any suggestions? I was able to compile it with gcc12
Thanks in advance
--
Comment:
`PATH_MAX` is defined in <limits.h>. Sounds like hdf5 hasn't included it
here. This would be an upstream bug that should be
[https://github.com/HDFGroup/hdf5/issues/new/choose reported to the
developers].
--
Ticket URL: <https://trac.macports.org/ticket/69928#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list