[144336] trunk/dports/science/silo/Portfile

Ryan Schmidt ryandesign at macports.org
Sat Jan 9 21:09:42 PST 2016


On Jan 9, 2016, at 9:45 PM, David Strubbe wrote:

>>> On Sat, Jan 9, 2016 at 2:31 AM, Ryan Schmidt wrote:
> 
>> On Jan 6, 2016, at 1:21 PM, dstrubbe at macports.org wrote:
>> >
>> > Revision
>> > 144336
>> > Author
>> > dstrubbe at macports.org
>> > Date
>> > 2016-01-06 11:21:10 -0800 (Wed, 06 Jan 2016)
>> > Log Message
>> >
>> > silo: Use compilers portgroup for Fortran variants. Clarify meaning in description. Update livecheck. Remove irrelevant comment. Add caution about MPI with HDF5.
>> 
>> Well, the comment was relevant in that it documented the error message one got when ccache was used, thus explaining why it had been disabled for this port.
>> 
>> > Modified Paths
>> >
>> >       • trunk/dports/science/silo/Portfile
>> > Diff
>> >
>> > Modified: trunk/dports/science/silo/Portfile (144335 => 144336)
>> 
>> > -# Makefile:152: *** missing separator.  Stop.
>> > +compilers.choose    fc f77 f90
>> > +compilers.setup
>> > +
>> >  configure.ccache    no
> 

> Are you sure that is what this line meant? It is hard to believe that ccache could be related to this error message of illegal syntax in a Makefile. And, I just commented out the ccache line and the port seems to work fine without that line, or with configure.ccache yes.

Yes I'm sure, in that I put it there when I initially added the port in https://trac.macports.org/changeset/78261 and I mentioned it in https://trac.macports.org/ticket/29325#comment:4.


I just now backdated the port to that revision, re-enabled ccache and changed "hdf5-18" to "hdf5", and verified that silo 4.8 did have this problem. Lines 151-152 of the Makefile ended up as:

CC_FULLPATH = /opt/local/bin/ccache
/usr/bin/clang

and later in the same file:

CXX_FULLPATH = /opt/local/bin/ccache
/usr/bin/clang++

In other words, the MacPorts-provided CC and CXX values "ccache /usr/bin/clang" and "ccache /usr/bin/clang++" were erroneously expanded and corrupted.


Now, in silo 4.10.2, if I re-enable ccache, the corresponding lines of Makefile read:

CC_FULLPATH = /opt/local/bin/ccache

and:

CXX_FULLPATH = /opt/local/bin/ccache

This is still wrong -- these variables are evidently meant to be the absolute paths to the compilers, but they have instead been computed as the absolute path to ccache -- but at least they've fixed things to use only the first word. It looks like the only places these variables are used is to show a summary at the end of the configure phase:

Compiling Options:
                     C Compiler /opt/local/bin/ccache
                       CPPFLAGS -I/opt/local -I/opt/local/include
                         CFLAGS -pipe -Os -arch x86_64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wdeclaration-after-statement
                        LDFLAGS -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64
                           LIBS -lhdf5  
Languages:
                   C++ Compiler /opt/local/bin/ccache
                       CXXFLAGS -pipe -Os -stdlib=libc++ -arch x86_64
               Fortran Compiler 
                        FCFLAGS -pipe -Os -m64
                         FCLIBS 

And the same information gets written to the installed file /opt/local/lib/libsiloh5.settings as well.

It should probably be changed to directly use the unmodified values of CC and CXX and not attempt the error-prone process of trying to expand them into an absolute path, especially since it seems to serve no purpose other than to be informational to the user. Then ccache support for this portfile can be reenabled.




More information about the macports-dev mailing list