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

Bill Deegan bill at baddogconsulting.com
Sun Nov 26 19:35:04 EST 2017


It's possible that the tool/platform initialization is overwriting your
LINK value.
Try adding:

env['LINK']='/home/hagbard/spack/gcc/gcc-8-20171119/bin/gfortran'
After your Environment()..
See if it does the right thing then.


On Sun, Nov 26, 2017 at 3:32 PM, Mats Wichmann <mats at wichmann.us> wrote:

> yes. gfortran isn't the linker, but like all the gnu compilers it knows
> how to correctly invoke it for linking, so you use it as the LINK value.
> Else you have to figure out all the flags and use ld.
>
>
> On November 26, 2017 8:44:56 AM MST, 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
>>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171126/a17804d0/attachment.html>


More information about the Scons-users mailing list