GNU bug report logs - #29824
Meson 0.44.0 is broken with guix.

Previous Next

Package: guix;

Reported by: Fis Trivial <ybbs.daans <at> hotmail.com>

Date: Sat, 23 Dec 2017 19:20:02 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29824 in the body.
You can then email your comments to 29824 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Sat, 23 Dec 2017 19:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fis Trivial <ybbs.daans <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 23 Dec 2017 19:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fis Trivial <ybbs.daans <at> hotmail.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: Meson 0.44.0 is broken with guix.
Date: Sat, 23 Dec 2017 19:18:58 +0000
I installed meson with command `guix package -i meson`

* Error:
$ meson --version

Traceback (most recent call last):
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real", 
line 17, in <module>
     from mesonbuild import mesonmain, mesonlib
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/lib/python3.5/site-packages/mesonbuild/mesonmain.py", 
line 18, in <module>
     from . import environment, interpreter, mesonlib
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/lib/python3.5/site-packages/mesonbuild/environment.py", 
line 17, in <module>
     from . import coredata
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/lib/python3.5/site-packages/mesonbuild/coredata.py", 
line 20, in <module>
     from .mesonlib import MesonException, commonpath
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/lib/python3.5/site-packages/mesonbuild/mesonlib.py", 
line 60, in <module>
     meson_command = python_command + [detect_meson_py_location()]
   File 
"/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/lib/python3.5/site-packages/mesonbuild/mesonlib.py", 
line 51, in detect_meson_py_location
     raise RuntimeError('Could not determine how to run Meson. Please 
file a bug with details.')
RuntimeError: Could not determine how to run Meson. Please file a bug 
with details.


I'm currently using Guix on top of Fedora 26. The installed version of 
meson is 0.44.0.


* Possible cause:
 From /mesonlib.py/: line 47~51, we have:
#+BEGIN_BLOCK python
     # The only thing remaining is to try to find the bundled executable and
     # pray distro packagers have not moved it.
     fname = os.path.join(os.path.dirname(__file__), '..', 'meson.py')
     if not os.path.exists(fname):
         raise RuntimeError('Could not determine how to run Meson. 
Please file a bug with details.')
#+END_BLOCK
which means meson will try to find the meson.py script at startup, but 
it seems Guix has renamed the this file with the new file name 
*.meson-real* and warp it with a shell script /meson/ in bin.

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Tue, 02 Jan 2018 15:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 29824 <at> debbugs.gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: Meson 0.44.0 is broken with guix.
Date: Tue, 2 Jan 2018 16:52:18 +0100
[Message part 1 (text/plain, inline)]
We need to have a look at the whole `detect_meson_py_location()`, not
only on lines 47 to 51.

detect_meson_py_location() assumes the executable to be called "meson"
or "meson.py", but in guix it currently is called ".meson-real" (see teh
first entry in the trace-back).

The solution would be to get rid of the wrapper-scripts, see
<https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00041.html>

A work-around would be to substitute in file mesonbuild/mesonlib.py

meson_command = python_command + [detect_meson_py_location()]

by

meson_command = python_command + ["$OUT/bin/meson"]

(you got the idea, I assume). Of course we should verify
detect_meson_py_location() is not used elsewhere and consider renaming
that function to "disable" it.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Tue, 09 Jan 2018 12:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 29824 <at> debbugs.gnu.org, Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Tue, 09 Jan 2018 13:46:23 +0100
Hi Hartmut,

Hartmut Goebel <h.goebel <at> crazy-compilers.com> skribis:

> We need to have a look at the whole `detect_meson_py_location()`, not
> only on lines 47 to 51.
>
> detect_meson_py_location() assumes the executable to be called "meson"
> or "meson.py", but in guix it currently is called ".meson-real" (see teh
> first entry in the trace-back).
>
> The solution would be to get rid of the wrapper-scripts, see
> <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00041.html>
>
> A work-around would be to substitute in file mesonbuild/mesonlib.py
>
> meson_command = python_command + [detect_meson_py_location()]
>
> by
>
> meson_command = python_command + ["$OUT/bin/meson"]

Sounds reasonable.  Does it work for you?  If so, could you provide a
patch?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Tue, 09 Jan 2018 21:11:01 GMT) Full text and rfc822 format available.

Message #14 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29824 <at> debbugs.gnu.org, Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Tue, 9 Jan 2018 22:10:28 +0100
Am 09.01.2018 um 13:46 schrieb Ludovic Courtès:
> Sounds reasonable.  Does it work for you?  If so, could you provide a
> patch?

I don't have any cards in this game and not time for working on it ATM,
I just did the analysis.

@peter: What about you?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Tue, 09 Jan 2018 23:35:01 GMT) Full text and rfc822 format available.

Message #17 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 29824 <at> debbugs.gnu.org
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Wed, 10 Jan 2018 00:34:16 +0100
[Message part 1 (text/plain, inline)]
Hi,

Den 9. jan. 2018 22.10 skrev "Hartmut Goebel" <h.goebel <at> crazy-compilers.com
>:

Am 09.01.2018 um 13:46 schrieb Ludovic Courtès:
> Sounds reasonable.  Does it work for you?  If so, could you provide a
> patch?

I don't have any cards in this game and not time for working on it ATM,
I just did the analysis.

@peter: What about you?




I am sorry to let you down, but I dont have any time for developing on guix
at the moment :/ and by the way, I am not, and have never considered myself
a user of meson, I just wanted the buildsystem in guix because I noticed
that gnome was starting to use it :)

-- Peter Mikkelsen
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Sun, 14 Jan 2018 20:07:01 GMT) Full text and rfc822 format available.

Message #20 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: Fis Trivial <ybbs.daans <at> hotmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, Hartmut Goebel
 <h.goebel <at> crazy-compilers.com>
Cc: "29824 <at> debbugs.gnu.org" <29824 <at> debbugs.gnu.org>,
 Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Sun, 14 Jan 2018 20:06:39 +0000
>>
>> detect_meson_py_location() assumes the executable to be called "meson"
>> or "meson.py", but in guix it currently is called ".meson-real" (see teh
>> first entry in the trace-back).
>>
>> The solution would be to get rid of the wrapper-scripts, see
>> <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00041.html>
>>
>> A work-around would be to substitute in file mesonbuild/mesonlib.py
>>
>> meson_command = python_command + [detect_meson_py_location()]
>>
>> by
>>
>> meson_command = python_command + ["$OUT/bin/meson"]
> 
> Sounds reasonable.  Does it work for you?  If so, could you provide a
> patch?
> 
> Ludo’.
> 

Or in this case, python script, we can change the wrapper script into something
like this:

#+BEGIN_SRC python
import os
os.environ['PYTHONPATH']="/gnu/store/.../site-packages${PYTHONPATH:+:}$PYTHONPATH"
exec(open("/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real").read())
#+END_SRC

or

#+BEGIN_SRC python
import os
os.environ['PYTHONPATH']="/gnu/store/.../site-packages${PYTHONPATH:+:}$PYTHONPATH"
exec(compile(
    open(
        "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real".read(),
        "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real",
        'exec'
    )))
#+END_SRC

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Sun, 14 Jan 2018 20:16:02 GMT) Full text and rfc822 format available.

Message #23 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: Fis Trivial <ybbs.daans <at> hotmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, Hartmut Goebel
 <h.goebel <at> crazy-compilers.com>
Cc: "29824 <at> debbugs.gnu.org" <29824 <at> debbugs.gnu.org>,
 Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Sun, 14 Jan 2018 20:14:56 +0000
> or
> 
> #+BEGIN_SRC python
> import os
> os.environ['PYTHONPATH']="/gnu/store/.../site-packages${PYTHONPATH:+:}$PYTHONPATH"
> exec(compile(
>     open(
>         "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real".read(),
>         "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real",
>         'exec'
>     )))
> #+END_SRC
> 
Sorry about that, this section is wrong. Here is the correct one. Be careful with the "..."
in the environ assignment. I omitted part of the path due to it's too long.

#+BEGIN_SRC python
#!/usr/bin/env python3
import os
os.environ['PYTHONPATH'] = "/gnu/store/.../site-packages${PYTHONPATH:+:}$PYTHONPATH"
# exec(open("/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real").read())
exec(compile(
    open(
        "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real"
    ).read(),
    "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real",
    'exec'
))

#+END_SRC

And the wrapper should be named as "meson", in this case.
The above code set the environment variables and execute the corresponding code
by loading it(not spawning a new process). Hence the argv will be preserved.

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Sun, 14 Jan 2018 22:03:01 GMT) Full text and rfc822 format available.

Message #26 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Fis Trivial <ybbs.daans <at> hotmail.com>
Cc: Hartmut Goebel <h.goebel <at> crazy-compilers.com>,
 "29824 <at> debbugs.gnu.org" <29824 <at> debbugs.gnu.org>,
 Peter Mikkelsen <petermikkelsen10 <at> gmail.com>
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Sun, 14 Jan 2018 23:02:16 +0100
Hello,

Fis Trivial <ybbs.daans <at> hotmail.com> skribis:

> Sorry about that, this section is wrong. Here is the correct one. Be careful with the "..."
> in the environ assignment. I omitted part of the path due to it's too long.
>
> #+BEGIN_SRC python
> #!/usr/bin/env python3
> import os
> os.environ['PYTHONPATH'] = "/gnu/store/.../site-packages${PYTHONPATH:+:}$PYTHONPATH"
> # exec(open("/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real").read())
> exec(compile(
>     open(
>         "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real"
>     ).read(),
>     "/gnu/store/n53zdnl4l3gm9sg15bfwxp0wdrwrvhg4-meson-0.44.0/bin/.meson-real",
>     'exec'
> ))
>
> #+END_SRC
>
> And the wrapper should be named as "meson", in this case.
> The above code set the environment variables and execute the corresponding code
> by loading it(not spawning a new process). Hence the argv will be preserved.

Sure, though Hartmut’s solution looked even simpler.

BTW, Ricardo has posted a patch on this topic here:

  https://bugs.gnu.org/29951

We could use it here (it won’t be merged until the next ‘core-updates’
cycle), but if there’s a simpler solution, we should probably go for
that.

Thanks,
Ludo’.




Added blocking bug(s) 29951 Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 04 Feb 2019 08:51:01 GMT) Full text and rfc822 format available.

Added indication that bug 29824 blocks29951 Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 04 Feb 2019 09:49:01 GMT) Full text and rfc822 format available.

Removed blocking bug(s) 29951 Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 04 Feb 2019 10:31:01 GMT) Full text and rfc822 format available.

Removed indication that bug 29824 blocks Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 04 Feb 2019 10:32:02 GMT) Full text and rfc822 format available.

Added blocking bug(s) 29951 Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 04 Feb 2019 10:34:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#29824; Package guix. (Mon, 28 Sep 2020 13:01:02 GMT) Full text and rfc822 format available.

Message #39 received at 29824 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Fis Trivial <ybbs.daans <at> hotmail.com>
Cc: 29824 <at> debbugs.gnu.org
Subject: Re: bug#29824: Meson 0.44.0 is broken with guix.
Date: Mon, 28 Sep 2020 15:00:22 +0200
Dear,

On Sat, 23 Dec 2017 at 19:18, Fis Trivial <ybbs.daans <at> hotmail.com> wrote:
> I installed meson with command `guix package -i meson`
>
> * Error:
> $ meson --version
>
> Traceback (most recent call last):
>    File 

[...]

> RuntimeError: Could not determine how to run Meson. Please file a bug 
> with details.

Using Guix on the top of Debian and running:

--8<---------------cut here---------------start------------->8---
guix environment -C --ad-hoc meson
meson --version
--8<---------------cut here---------------end--------------->8---

works for me with Guix 73e7a42.  Is it still an issue for you?

Since the commit 0fb9a8df429a7b9f40610ff15baaff0d8e31e8cf is merged on
master – if I read correctly – the issue should be fixed.

What is the status of this bug?


All the best,
simon




Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Mon, 30 Nov 2020 16:15:02 GMT) Full text and rfc822 format available.

Notification sent to Fis Trivial <ybbs.daans <at> hotmail.com>:
bug acknowledged by developer. (Mon, 30 Nov 2020 16:15:02 GMT) Full text and rfc822 format available.

Message #44 received at 29824-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 29824-done <at> debbugs.gnu.org
Subject: Meson 0.44.0 is broken with guix.
Date: Mon, 30 Nov 2020 17:14:44 +0100
[Message part 1 (text/plain, inline)]
Meson 0.44.0 is long gone and 0.55 works fine:

 ~ λ guix environment --{ad-hoc,pure} meson -- meson --version
 0.55.1

Closing this fixed old bug,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Dec 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.