You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ericson2314 opened this issue
Aug 21, 2024
· 1 comment
· Fixed by #14342
Assignees
Labels
bugexceptionMajor bug that raises a python-level exceptionpathlibupgrading to/downgrading from pathlib.Path--including temporary workarounds for older Python
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 270, in run
return msetup.run(['--reconfigure'] + args[2:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/msetup.py", line 363, in run
app.generate()
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/msetup.py", line 187, in generate
return self._generate(env, capture, vslite_ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/msetup.py", line 226, in _generate
intr.run()
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreter/interpreter.py", line 3011, in run
super().run()
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 162, in run
self.evaluate_codeblock(self.ast, start=1)
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 188, in evaluate_codeblock
raise e
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 180, in evaluate_codeblock
self.evaluate_statement(cur)
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 194, in evaluate_statement
return self.function_call(cur)
^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 520, in function_call
res = func(node, func_args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/decorators.py", line 53, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreterbase/decorators.py", line 569, in wrapper
return f(*wrapped_args, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/5s1iy38gicvf90a9k0dn0b2x1kb072zm-meson-1.4.2/lib/python3.11/site-packages/mesonbuild/interpreter/interpreter.py", line 714, in func_declare_dependency
if p.is_absolute() and p.is_dir() and srcdir / self.root_subdir in [p] + list(Path(os.path.abspath(p)).parents):
^^^^^^^^^^
File "/nix/store/7m3ii30148dwjmfvl9w0m51idnv3y91m-python3-3.11.9/lib/python3.11/pathlib.py", line 1250, in is_dir
return S_ISDIR(self.stat().st_mode)
^^^^^^^^^^^
File "/nix/store/7m3ii30148dwjmfvl9w0m51idnv3y91m-python3-3.11.9/lib/python3.11/pathlib.py", line 1013, in stat
return os.stat(self, follow_symlinks=follow_symlinks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/Users/jcericson/src/nix/build/secret/asdf'
ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
If a directory that is passed to declare_dependency is not accessible
(a parent has the x permission cleared), this can result in an OSError:
ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
This can cause false positives, for example, if the directory is
under /var and root-owned. Do the is_dir() test last, once it's known
that the directory is related to the source directory, to avoid the
false positives.
Fixes: mesonbuild#13584
bugexceptionMajor bug that raises a python-level exceptionpathlibupgrading to/downgrading from pathlib.Path--including temporary workarounds for older Python
Describe the bug
The
declare_dependency
extra variable logic does not work with strings that are unreadable files, at least on macOS.To Reproduce
Given
/absolute/path/to/disallowed
is a directory without permission to read (I triedchmod 000
)I get
Expected behavior
Variable works, can be queried later.
*system parameters
Meson 1.4.2 on macOS
The text was updated successfully, but these errors were encountered: