Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meson build error "Function does not take positional arguments." #87

Open
St3fi opened this issue Jan 12, 2022 · 4 comments
Open

Meson build error "Function does not take positional arguments." #87

St3fi opened this issue Jan 12, 2022 · 4 comments

Comments

@St3fi
Copy link

St3fi commented Jan 12, 2022

Hello!

I just updated my archlinux and revelation stopped working. I followed the current install steps with meson but could not create the _build directory:

Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
data/meson.build:61:5: ERROR: Function does not take positional arguments.

How can this be fixed?

Kind regards
Stefi

@nicfit
Copy link

nicfit commented Jan 13, 2022

@St3fi I worked around this, but it appears this a meson issue. First, I installed meson-git (on archlinux) hoping this was fixed, as this mesonbuild/meson#9445 addresses the issue. No luck though, so I edited /usr/lib/python3.10/site-packages/mesonbuild/modules/i18n.py and removed the @noPosArgs. After making this change I was able to yay -S revelaton

@St3fi
Copy link
Author

St3fi commented Jan 13, 2022

@nicfit thank you for your reply!

I was able to install revelation via yay -S beforehand, however I go another error in the first place when executing revelation:
ModuleNotFoundError: No module named 'revelation'

However, it somehow works now, this is what I did:

  1. edited /usr/lib/python3.10/site-packages/mesonbuild/modules/i18n.py and removed the @noPosArgs (as you suggested)
  2. reinstalled revelation with yay -S revelation (same error as before then)
  3. Run the meson-setup again: meson setup --prefix=$HOME/.local _build
  4. Run compilation/installation: meson install -C _build (that did not run as well)
  5. reinstalled revelation with yay -S revelation

Now it somehow worked, although I don't know why...

@eli-schwartz
Copy link

First, I installed meson-git (on archlinux) hoping this was fixed, as this mesonbuild/meson#9445 addresses the issue.

Uhmmmmm... no.

This does not "fix the issue".

Meson 0.60 printed a warning that this line is always wrong, does nothing, and should be removed:

metainfo,

The meson ticket you are linking to is the one that made it a warning instead of an error. Now, it is back to being an error. People were supposed to be removing those lines.

Why edit root-owned files like mesonbuild/modules/i18n.py when you could just fix this project the correct way?

@nicfit
Copy link

nicfit commented Jan 13, 2022

@eli-schwartz I said "I worked around this...".. Nothing was fixed. Why edit? Because that is what it took for me to install revelation, when I needed a password then. Not later.

jayofdoom added a commit to jayofdoom/gentoo that referenced this issue Apr 22, 2022
Patches out a deprecated use of positional argument in
i18n.merge_files to ensure build can succeed on
meson 0.60 and newer. This change should not break support
for meson 0.59.4, as this usage was already deprecated but
only throwing warnings at that release.

Upstream is tracking this issue at
mikelolasagasti/revelation#87

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jay Faulkner <jay@jvf.cc>
jayofdoom added a commit to jayofdoom/gentoo that referenced this issue Apr 22, 2022
mikelolasagasti/revelation#87

Patches out a deprecated use of positional argument in
i18n.merge_files to ensure build can succeed on
meson 0.60 and newer. This change should not break support
for meson 0.59.4, as this usage was already deprecated but
only throwing warnings at that release.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jay Faulkner <jay@jvf.cc>
jayofdoom added a commit to jayofdoom/gentoo that referenced this issue Apr 22, 2022
Patches out a deprecated use of positional argument in
i18n.merge_files to ensure build can succeed on
meson 0.60 and newer. This change should not break support
for meson 0.59.4, as this usage was already deprecated but
only throwing warnings at that release.

mikelolasagasti/revelation#87

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jay Faulkner <jay@jvf.cc>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Apr 22, 2022
Patches out a deprecated use of positional argument in
i18n.merge_files to ensure build can succeed on
meson 0.60 and newer. This change should not break support
for meson 0.59.4, as this usage was already deprecated but
only throwing warnings at that release.

mikelolasagasti/revelation#87

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jay Faulkner <jay@jvf.cc>
Closes: #25146
Signed-off-by: Sam James <sam@gentoo.org>
jayofdoom added a commit to jayofdoom/revelation that referenced this issue Apr 22, 2022
Meson 0.60 and newer are completely unable to build revelation without
this fix, due to the deprecation of the positional argument used.

It can be removed without any change to the output.

This is an upstreaming of the patch required to make this build in gentoo:
gentoo/gentoo@3496474

Fixes Issue mikelolasagasti#87
mikelolasagasti pushed a commit that referenced this issue Apr 23, 2022
Meson 0.60 and newer are completely unable to build revelation without
this fix, due to the deprecation of the positional argument used.

It can be removed without any change to the output.

This is an upstreaming of the patch required to make this build in gentoo:
gentoo/gentoo@3496474

Fixes Issue #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants