[MITgcm-devel] make depend on sun (o:
Martin Losch
mlosch at awi-bremerhaven.de
Mon Feb 28 04:04:04 EST 2005
Hi Ed,
I checked in the changes to the sunos_sun4u_* build option files, so
that they work for me now.
Now I have to specify the cyrus-imapd-makedepend/makedepend in the
build options file to make sure that the system wide default is not
used (which may be available on Sun, usually in /usr/openwin/bin, but
doesn't work).
I suggest, that someone who can try the darwin_xlf optfile (I don't
have the XLF compile), tries if we can do without xmakedepend. If
that's the case xmakedepend is not necessary at all (what I suspect
will be the case).
xmakedepend is currently broken (the if statement at the beginning of
the file is not doing, what it is supposed to do, on Sun the cpp
compiler should ALWAYS be /lib/cpp in order to work, but only for
xmakedepend). What should we do about it?
1. hardwire /lib/cpp so that xmakedepend works only for sun (only if it
is not necessary for darwin_xlf), for which it was introduced in the
first place.
2. make it work with other "more universal" cpp settings, I don't know
how to do that.
Martin
On Feb 25, 2005, at 10:16 PM, Martin Losch wrote:
> Hi Ed,
>
> I don't think that I'll do anything today or on this weekend, but here
> are some further comments, see below,
>
> Martin
>
> On Feb 25, 2005, at 8:58 PM, Ed Hill wrote:
>
>> On Fri, 2005-02-25 at 20:35 +0100, Martin Losch wrote:
>>>
>>> I put this
>>> FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
>>> into sunos_sun4_g77 and it works (it's the same as in the
>>> sunos_sun4u_f77). I am surprised that it hasn't been a problem so far
>>> (sunos_sun4u_g77 is the default build_options file, as far as I can
>>> see. It's all very mysterious to me. But I'll happily go along with
>>> this:
>>
>> Hi Martin,
>>
>>
>>> - adjust sunos_sun4_g77 (include the FC_NAMEMANGLE line)
>>
>> Theres a "get_fortran_c_namemangling()" routine in genmake2 that tries
>> (and occasionally succeeds!) to figure out the correct setting for
>> that
>> macro. Is best not to rely on it, however.
>
> OK, I'll include that into sunos_sun4_g77 on monday, that won't hurt.
>>
>>> - use the cyrus makedepend by default on SunOS (how does this happen,
>>> is that the default anyway? otherwise I have to change at least 3
>>> files: sunos_sun4u_g77 sunos_sun4u_f77 sunos_sun4u_mpf77+mpi_sunfire.
>>> There are also two files sunos and sunos+mpi, which are almost the
>>> same
>>> and both obsolete, I think. Maybe we should remove them?)
>>
>> Within genmake2 theres a routine ["look_for_makedepend()"] that tries
>> to
>> figure out which codes can be used to satisfy the "make depend" stage.
>> There are some nice comments at the start of that code that explain
>> why.
> From these comments I conclude that I have to include the optfiles
> MAKEDEPEND=${TOOLS}/csyrus-imapd-makedepend/makedepend
> because
> 1) if not specified then
> 2) there may be a system wide default on sun which is usually
> insufficient (on slough it is in /usr/openwin/bin/makedepend and
> produces an errror, which is why xmakedepend was introduced in the
> first place)
> 3) and only in after 2 is false the cyrus-imapd-makedepend will be
> build.
> If I specify the cyrus makedepend in the optfile, will it
> automatically be build?
>
>> If you think those optfiles are unused (and, after all, *you're* the
>> authority on Suns!), then please either delete them or move them into
>> the
>>
>> MITgcm/tools/build_options/unsupported
>>
>> directory.
>
> OK, on monday.
>>
>>
>>> - maybe fix xmakedepend, so that it works with Sun (use hard coded
>>> /lib/cpp), but will that work with other systems? here are the files
>>> that still contain xmakedepend:
>>>> csysm3::build_options> grep xmakedepend *
>>>> darwin_absoft_f77:#MAKEDEPEND='${TOOLSDIR}/xmakedepend'
>>>> darwin_ppc_g77:#EH3 MAKEDEPEND='${TOOLSDIR}/xmakedepend'
>>>> darwin_ppc_xlf:MAKEDEPEND='${TOOLSDIR}/xmakedepend'
>>>> darwin_ppc_xlf_panther:MAKEDEPEND='${TOOLSDIR}/xmakedepend'
>>>> sunos_sun4u_f77:MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
>>>> sunos_sun4u_g77:MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
>>>> sunos_sun4u_g77~:MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
>>>> sunos_sun4u_mpf77+mpi_sunfire:MAKEDEPEND='$(TOOLSDIR)/xmakedepend'
>>> So it's only sun and apple with xlf (why is that necessary, when we
>>> don't need it for darwin_ppc_g77?). If that darwin+xlf thing is
>>> sorted
>>> out, xmakedepend is no longer necessary, except for a fallback.
>>
>> Yes, we should remove xmakedepend from the platforms that don't need
>> it.
>> And we should somehow have xmakedepend use settings from the optfile
>> and/or from the output of genmake2 so that it is more cnfigurable.
>> I'll
>> look at it and see what I can do to improve it...
>>
>>
>>> PS. I am at home now, so I'll respond only slowly (or not at all
>>> before
>>> monday).
>>
>> Hope you have a good weekend! I'll be on-line all weekend f you have
>> any more Sun problems.
>>
>> Ed
>>
>> --
>> Edward H. Hill III, PhD
>> office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
>> Cambridge, MA 02139-4307
>> emails: eh3 at mit.edu ed at eh3.com
>> URLs: http://web.mit.edu/eh3/ http://eh3.com/
>> phone: 617-253-0098
>> fax: 617-253-4464
>>
>> _______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://dev.mitgcm.org/mailman/listinfo/mitgcm-devel
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://dev.mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list