Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#51600 closed defect (fixed)

hdf4, hdf5, hdf5-18: h4cc, h5cc, h5c++, h5cc-18, h5c++-18 contain directives to use ccache

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc:
Port: hdf4, hdf5, hdf5-18

Description

I use ccache on my system. (I set configure_ccache yes in macports.conf.) As a consequence of this, /opt/local/bin/h4cc contains references to ccache:

CCBASE="ccache /usr/bin/clang"
CLINKERBASE="ccache /usr/bin/clang"

This causes ports (such as hdfeos) that want to use hdf4 to fail to build with an error message:

configure: error: C compiler cannot create executables

and in config.log:

ccache: error: Failed to create temporary file for /opt/local/var/macports/build/.ccache/3/stats.tmp: Operation not permitted

hdf4 should not bake directives to use ccache into its files, nor, ideally, should it bake a reference to a specific compiler. Instead, ports should respect the values of configure.compiler and configure.ccache.

Related: #30258.

Change History (5)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Port: hdf5 hdf5-18 added
Summary: hdf4: h4cc contains directive to use ccachehdf4, hdf5, hdf5-18: h4cc, h5cc, h5c++, h5cc-18, h5c++-18 contain directives to use ccache

Same issue applies to hdf5 and hdf5-18.

comment:2 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Thank you for pointing this. I didn't know ccache and have just found out what it is. h4cc is provided by the upstream so I'd rather leave it. While I understand I should respect configure.compiler, but h4cc script is used to make the same compiler consistently. A quick fix would be to set configure.ccache no as in #30258, but I'll see what I can do for improvement.

comment:3 Changed 8 years ago by tenomoto (Takeshi Enomoto)

With ccache CC is set ccache ${configiure.cc}. I couldn't figure out which environmental variable contains the path to C compiler without ccache. So I simply remove the string ccache in h4cc or in h5cc. Stopped using h4cc in hdfeos. Left hdfeos5 as it is because of MPI variants. Done in r149527.

comment:4 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

comment:5 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

In 75b92ac963c57cd2d90bbb65f8e8178725315522/macports-ports (master):

hdf4, hdf5: Fix reinplace warning

Only remove "ccache " from wrappers when MacPorts put it there.

See: #51600

Note: See TracTickets for help on using tickets.