Repository navigation
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
I wrote this in my meson.build:
icondir = join_paths('icons', '16x16')
install_data(join_paths(icondir, 'cangjie.png'),
install_dir: join_paths(icondir),
rename: 'cangjie.png')
That was a mistake, because I didn't even realize I was trying to join a path with nothing, yet the name join kind of indicates it should work on several things... 🤦
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
I sort of expected meson to error out because I didn't respect its expectations (the function needing multiple arguments and my passing only one), what I did not expect was this:
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 194, in run
return options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 358, in run
app.generate()
File "/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 181, in generate
return self._generate(env, capture, vslite_ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 243, in _generate
self.finalize_postconf_hooks(b, intr)
File "/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 311, in finalize_postconf_hooks
mod.postconf_hook(b)
File "/usr/lib/python3.12/site-packages/mesonbuild/modules/python.py", line 433, in postconf_hook
b.install_scripts.extend(self._get_install_scripts())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mesonbuild/modules/python.py", line 389, in _get_install_scripts
installdata = backend.create_install_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/mesonbuild/backend/backends.py", line 1659, in create_install_data
self.generate_target_install(d)
File "/usr/lib/python3.12/site-packages/mesonbuild/backend/backends.py", line 1821, in generate_target_install
i = TargetInstallData(f, outdir, outdir_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 14, in __init__
File "/usr/lib/python3.12/site-packages/mesonbuild/backend/backends.py", line 156, in __post_init__
outdir_name = os.path.join('{prefix}', self.outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 90, in join
File "<frozen genericpath>", line 164, in _check_arg_types
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
ERROR: Unhandled python exception
This is a Meson bug and should be reported!
system parameters
This the unmodified meson Fedora package:
meson-1.3.1-1.fc39.noarch
- Is this a cross build or just a plain native build (for the same computer)?
This is not a cross build - what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
Fedora 39 - what Python version are you using e.g. 3.8.0
python3-3.12.1-2.fc39.x86_64 - what
meson --version
1.3.1 - what
ninja --versionif it's a Ninja build
1.11.1
Metadata
Metadata
Assignees
Labels
No labels
Activity
modules/i18n: CustomTargets must have `install_dir` if installing
modules/i18n: CustomTargets must have `install_dir` if installing
modules/i18n: CustomTargets must have `install_dir` if installing
mbridon commentedon Feb 22, 2024
I see you committed your code @dcbaker, should we now close the issue? 🤔
dcbaker commentedon Feb 22, 2024
I went ahead and merged the fix, thanks for reminding me
modules/i18n: CustomTargets must have `install_dir` if installing
modules/i18n: CustomTargets must have `install_dir` if installing
modules/i18n: CustomTargets must have `install_dir` if installing