[Flang-dev] Fortran compatible ninja; flang circular dependencies

blubee blubeeme gurenchan at gmail.com
Fri Oct 12 13:46:44 EDT 2018


On Sat, Oct 13, 2018 at 12:59 AM Isuru Fernando <isuruf at gmail.com> wrote:

> This was fixed in https://github.com/flang-compiler/flang/pull/464/files
> among other things, but that PR has not been reviewed yet.
>
> Isuru
>
> On Fri, Oct 12, 2018 at 10:56 AM Stephen Scalpone <sscalpone at nvidia.com>
> wrote:
>
>> There’s an issue raised on github about the ieee_arithmetic.F95 build
>> problem.  The the flang libraries are built twice, once as a shared library
>> and once as a static library.  Both builds write their mod files to the
>> same directory (‘include’), which is the problem.  Seems like we need to
>> fix the build to use the -module option for compilations & then atomically
>> copy the resulting .mod files into the include directory.  It’s probably a
>> good idea to verify that the mod files are the same except for the time
>> stamp.
>>
>>
>>
>> *From: *flang-dev <flang-dev-bounces at lists.flang-compiler.org> on behalf
>> of blubee blubeeme <gurenchan at gmail.com>
>> *Date: *Friday, October 12, 2018 at 1:03 AM
>> *To: *"flang-dev at lists.flang-compiler.org" <
>> flang-dev at lists.flang-compiler.org>
>> *Subject: *Re: [Flang-dev] Fortran compatible ninja; flang circular
>> dependencies
>>
>>
>>
>>
>>
>> On Fri, Oct 12, 2018 at 2:39 PM blubee blubeeme <gurenchan at gmail.com>
>> wrote:
>>
>> There's a fork of ninja that supports fortran files:
>> https://github.com/ninja-build/ninja
>>
>>
>>
>> When attempting to build you'll get an error:
>>
>> dupbuild=err
>>
>>
>>
>> You can change that from error to warning with
>>
>> -w dupbuild=warn
>>
>>
>>
>> but then the build still fails with circular dependencies:
>>
>> -- Build files have been written to:
>> /wrkdirs/usr/ports/devel/pflang/work/.build
>>
>> ninja: warning: multiple rules generate include/iso_c_binding.mod. builds
>> involving this target will not be correct; continuing anyway [-w
>> dupbuild=warn]
>>
>> ninja: error: dependency cycle:
>> runtime/flang/CMakeFiles/flang_shared.dir/Fortran.dd ->
>> runtime/flang/CMakeFiles/flang_shared.dir/ieee_arithmetic.F95-pp.f95.ddi ->
>> include/iso_c_binding.mod ->
>> runtime/flang/CMakeFiles/flang_shared.dir/iso_c_bind.F95.o ->
>> runtime/flang/CMakeFiles/flang_shared.dir/Fortran.dd
>>
>>
>>
>>
>>
>> It doesn't fail with Makefiles but ninja allows building a lot faster.
>>
>>
>>
>> Is this something that the flang developers are interested in taking a
>> look at?
>>
>>
>>
>> Best
>>
>> I forgot to mention but building libpgmath with kitware ninja works just
>> fine.
>>
>>
>>
>> Best
>> ------------------------------
>> This email message is for the sole use of the intended recipient(s) and
>> may contain confidential information.  Any unauthorized review, use,
>> disclosure or distribution is prohibited.  If you are not the intended
>> recipient, please contact the sender by reply email and destroy all copies
>> of the original message.
>> ------------------------------
>> _______________________________________________
>> flang-dev mailing list
>> flang-dev at lists.flang-compiler.org
>>
>> http://lists.flang-compiler.org/mailman/listinfo/flang-dev_lists.flang-compiler.org
>
> I also did some work that allows Flang to build on FreeBSD:
https://github.com/teamblubee/flang

I've been testing it on various code bases;
blas,lapack,atlas,openblas,openmpi,mpich2 and so far so good.

I'd just like to make sure I run a full suite of tests before I submit a
pull request.

@Isuru Fernando
Did you sign the CLA?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20181013/189d38f0/attachment.html>


More information about the flang-dev mailing list