[Scons-users] TypeError: File found where directory expected.:

Gary Oberbrunner garyo at oberbrunner.com
Sun Nov 26 12:03:34 EST 2017


What I usually do in cases like that is ask "what compile/link lines would
I use if I didn't have SCons?" I.e. do you want the link line to be
".../bin/gfortran -g ..."? If so, sounds like you should do it the way you
have it.

-- Gary

On Sun, Nov 26, 2017 at 10:44 AM, Christopher Dimech <dimech at gmx.com> wrote:

> Dear Gary,
>
> This has solved the impasse. A final question I have difficulty with are
> the two variables
> FORTRAN and LINK. I have installed the latest gcc snapshot for gfortran
> locally in
>
> /home/hagbard/spack/gcc/gcc-8-20171119/bin/gfortran
>
> Would I need both  FORTRAN and LINK to point to the gfortran compiler. I
> have set them
> to the came gfortran executable
>
> env = Environment (
>   ENV = {'PATH' : path},
>   FORTRAN='/home/hagbard/spack/gcc/gcc-8-20171119/bin/gfortran',
>   FORTRANFLAGS='-ffree-form -J./build/lib/ -fdiagnostics-color -Wall -g
> -pg',
>   LINK='/home/hagbard/spack/gcc/gcc-8-20171119/bin/gfortran',
>   LINKFLAGS='-g'
> )
>
>
> *Sent:* Sunday, November 26, 2017 at 4:27 PM
> *From:* "Gary Oberbrunner" <garyo at oberbrunner.com>
> *To:* "SCons users mailing list" <scons-users at scons.org>
> *Subject:* Re: [Scons-users] TypeError: File found where directory
> expected.:
> I doubt you want this line:
>   src_dir = 'lib/core/central.f',
> probably remove the "central.f" filename.
>
> -- Gary
>
> On Sun, Nov 26, 2017 at 5:01 AM, Christopher Dimech <dimech at gmx.com>
> wrote:
>>
>> Dear Scons Users
>>
>> I am trying to build a test for my fortran module and I am
>> getting the following error. I can figure out how to solve
>> this problem yet. Can anybody help with this problem, if you
>> please?
>>
>> path = ['/bin', '/usr/bin', '/usr/local/bin']
>>
>> env = Environment (
>>   ENV = {'PATH' : path},
>>   FORTRAN='/home/hagbard/spack/gcc/gcc-8-20171119/bin/gfortran',
>>   FORTRANFLAGS='-ffree-form -J./build/lib -Wall -fdiagnostics-color -g
>> -pg',
>>   LINK='gfortran',
>>   LINKFLAGS='-g'
>> )
>>
>> env.VariantDir (
>>   variant_dir = 'build/lib/core',
>>   src_dir = 'lib/core/central.f',
>>   duplicate = 0
>> )
>>
>> env.VariantDir (
>>   variant_dir = 'build/lib/captests/scout--core',
>>   src_dir = 'lib/captests/scout--core/inspect--central.f',
>>   duplicate = 0
>> )
>>
>> sources = [
>>   'build/lib/core/central.f',
>>   'build/lib/captests/scout--core/inspect--central.f'
>> ]
>>
>> # Constructs object files without the .mod
>> allobjs = env.Object (sources)
>> objs = filter (lambda o: str(o)[-4:] != '.mod', allobjs)
>>
>> env.Program (
>>   target = 'bin/cap/scout--core--central.exec',
>>   source = objs
>> )
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> --
> Gary
> _______________________________________________ Scons-users mailing list
> Scons-users at scons.org https://pairlist4.pair.net/
> mailman/listinfo/scons-users
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171126/9c9aedbb/attachment-0001.html>


More information about the Scons-users mailing list