Antergos / web-greeter

A modern, visually appealing greeter for LightDM.
http://antergos.github.io/web-greeter
GNU General Public License v3.0
233 stars 57 forks source link

Meson aborts when compiling generated Fortran code #113

Closed adamryczkowski closed 7 years ago

adamryczkowski commented 7 years ago

This is the minimum meson.build to reproduce the error:

project('simple fortran', 'fortran')
pp = find_program('python/pp_ser.py')
pp_gen = generator(pp, 
        arguments: ['-d @BUILD_DIR@', '@INPUT@'], output:'@BASENAME@.f90')
sources = ['src1.f90'   ]
generated_src = []
foreach s : sources
   generated_src += pp_gen.process(s)
endforeach
e = executable('dwarf', generated_src)

You also need to touch src1.f90 and echo "#!/usr/bin/env python">pp_ser.py in the same directory as meson.build.

After mkdir build && cd build && meson .. I get

The Meson build system
Version: 0.38.0
Source dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug
Build dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug/build
Build type: native build
Project name: simple fortran
Native fortran compiler: gfortran (gcc 5.4.1)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Program pp_ser.py found: YES (/usr/bin/env python /home/adam/meson_bug/pp_ser.py)
Build targets in project: 1
Traceback (most recent call last):
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 286, in run
    app.generate()
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 170, in generate
    g.generate(intr)
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/backend/ninjabackend.py", line 191, in generate
    self.generate_target(t, outfile)
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/backend/ninjabackend.py", line 386, in generate_target
    header_deps=header_deps)
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/backend/ninjabackend.py", line 1916, in generate_single_compile
    extra_deps += self.get_fortran_deps(compiler, abs_src, target)
  File "/home/adam/.local/lib/python3.5/site-packages/mesonbuild/backend/ninjabackend.py", line 1632, in get_fortran_deps
    with open(src) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/adam/meson_bug/build/dwarf@exe/src1.f90'

I use Ubuntu 16.04 bit and meson 0.38. python3 --version yields Python 3.5.2.

adamryczkowski commented 7 years ago

Maybe I did something wrong (this is my first try of the meson), but at least the error message should be better ;-)

lots0logs commented 7 years ago

Hmm..I think you created your issue in the wrong repo. You can find meson's github repo here: https://github.com/mesonbuild/meson

adamryczkowski commented 7 years ago

... I think this qualifies as one of the weirdest things I coincidentally done.

Sorry for spamming your mailbox.