mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.61k stars 1.63k forks source link

building mesa failed with meson #10450

Open lygstate opened 2 years ago

lygstate commented 2 years ago

Describe the bug

Enter-VsDevShell : The specified wildcard character pattern is not valid: 
src/amd/vulkan/radv_pipeline.c:4119:29: error: implicit declaration of 
function 'os_time_get_nano' [-Werror
At C:\Users\Administrator\runner\builds\lygstate\mesa\.gitlab-ci\windows\mesa_b
uild.ps1:29 char:1
+ Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enter-VsDevShell], WildcardPa 
   tternException
    + FullyQualifiedErrorId : RuntimeException,Microsoft.VisualStudio.DevShell 
   .Commands.EnterVsDevShellCommand

Traceback (most recent call last):
  File "C:\python3\lib\site-packages\mesonbuild\mesonmain.py", line 153, in run
    return options.run_func(options)
  File "C:\python3\lib\site-packages\mesonbuild\msetup.py", line 301, in run
    app.generate()
  File "C:\python3\lib\site-packages\mesonbuild\msetup.py", line 185, in generate
    self._generate(env)
  File "C:\python3\lib\site-packages\mesonbuild\msetup.py", line 207, in _generate
    intr = interpreter.Interpreter(b, user_defined_options=user_defined_options)
  File "C:\python3\lib\site-packages\mesonbuild\interpreter\interpreter.py", line 317, in __init__
    self.parse_project()
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 119, in parse_project
    self.evaluate_codeblock(self.ast, end=1)
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 174, in evaluate_codeblock
    raise e
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 167, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 180, in evaluate_statement
    return self.function_call(cur)
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\interpreterbase.py", line 455, in function_call
    res = func(node, func_args, kwargs)
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\decorators.py", line 277, in wrapper
    return f(*nargs, **wrapped_kwargs)
  File "C:\python3\lib\site-packages\mesonbuild\interpreterbase\decorators.py", line 574, in wrapper
    return f(*wrapped_args, **wrapped_kwargs)
  File "C:\python3\lib\site-packages\mesonbuild\interpreter\interpreter.py", line 1198, in func_project
    if mesonlib.setup_vsenv(force_vsenv):
  File "C:\python3\lib\site-packages\mesonbuild\mesonlib\vsenv.py", line [105](https://gitlab.freedesktop.org/lygstate/mesa/-/jobs/23436934#L105), in setup_vsenv
    return _setup_vsenv(force)
  File "C:\python3\lib\site-packages\mesonbuild\mesonlib\vsenv.py", line 99, in _setup_vsenv
    k, v = bat_line.split('=', 1)
ValueError: not enough values to unpack (expected 2, got 1)
The Meson build system
Version: 0.62.1
Source dir: C:\Users\Administrator\runner\builds\lygstate\mesa
Build dir: C:\Users\Administrator\runner\builds\lygstate\mesa\_build
Build type: native build
Program python found: YES (C:\python3\python.EXE)
Project name: mesa
Project version: 22.2.0-devel
Activating VS 16.11.15
..\meson.build:21:0: ERROR: Unhandled python exception
    This is a Meson bug and should be reported!
ERROR: No such build data file as "'C:\\Users\\Administrator\\runner\\builds\\lygstate\\mesa\\_build\\meson-private\\build.dat'".
Wednesday, June 1, 2022 1:01:45 PM
Mesa build or test failed
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.

To Reproduce https://gitlab.freedesktop.org/lygstate/mesa/-/pipelines/601767

dcbaker commented 2 years ago

That looks to me like the mesa_build.ps1 script went off the rails, and created a garbage environment meson falls over in. We may be able to clean up the error handling, but it looks like it comes up with no path for vswhere.exe, and then prints your commit message as the finalPath, which it's interpreting as wildcards makes me think this isn't meson's fault

eli-schwartz commented 2 years ago

It looks like the output is mixed up there due to weird buffering, and the lines are out of order.

There's a traceback in there for a command that should be running the following batch script:

@ECHO OFF

call "...../VC/Auxiliary/Build/vcvars64.bat"

ECHO ---SPLIT---
SET

What does this output in the CI environment?

lygstate commented 2 years ago

I guess it's oom, now it's recovered

lygstate commented 2 years ago

Does the stack-trace show any meaningfull?

lygstate commented 2 years ago

seems the environemt variables are polluted, but don't know who did that

lygstate commented 2 years ago

Seems meson parsing environment variables in a invalid way.... https://gist.github.com/lygstate/201dd9d2db3d411668f7bbdc17daf74a