* bug#29824: Meson 0.44.0 is broken with guix.
@ 2017-12-23 19:18 Fis Trivial
2018-01-02 15:52 ` Hartmut Goebel
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Fis Trivial @ 2017-12-23 19:18 UTC (permalink / raw)
To: 29824
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2017-12-23 19:18 bug#29824: Meson 0.44.0 is broken with guix Fis Trivial
@ 2018-01-02 15:52 ` Hartmut Goebel
2018-01-09 12:46 ` Ludovic Courtès
2020-09-28 13:00 ` zimoun
2020-11-30 16:14 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2 siblings, 1 reply; 10+ messages in thread
From: Hartmut Goebel @ 2018-01-02 15:52 UTC (permalink / raw)
To: 29824; +Cc: Peter Mikkelsen
[-- Attachment #1: Type: text/plain, Size: 957 bytes --]
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@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
[-- Attachment #2: Type: text/html, Size: 1767 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2018-01-02 15:52 ` Hartmut Goebel
@ 2018-01-09 12:46 ` Ludovic Courtès
2018-01-09 21:10 ` Hartmut Goebel
2018-01-14 20:06 ` Fis Trivial
0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-01-09 12:46 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: 29824, Peter Mikkelsen
Hi Hartmut,
Hartmut Goebel <h.goebel@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’.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2018-01-09 12:46 ` Ludovic Courtès
@ 2018-01-09 21:10 ` Hartmut Goebel
[not found] ` <CADh9keUUZNYBd7-doGcL1O9+bMdxtVK=PzVFL-9_MSUPWF7_=A@mail.gmail.com>
2018-01-14 20:06 ` Fis Trivial
1 sibling, 1 reply; 10+ messages in thread
From: Hartmut Goebel @ 2018-01-09 21:10 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29824, Peter Mikkelsen
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@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
[not found] ` <CADh9keWM+hyLV=ffDx7XDWQFLS9O4tEtBEJ3aQzHPQBX-yRfjw@mail.gmail.com>
@ 2018-01-09 23:34 ` Peter Mikkelsen
0 siblings, 0 replies; 10+ messages in thread
From: Peter Mikkelsen @ 2018-01-09 23:34 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: 29824
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
Hi,
Den 9. jan. 2018 22.10 skrev "Hartmut Goebel" <h.goebel@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
[-- Attachment #2: Type: text/html, Size: 1544 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2018-01-09 12:46 ` Ludovic Courtès
2018-01-09 21:10 ` Hartmut Goebel
@ 2018-01-14 20:06 ` Fis Trivial
2018-01-14 20:14 ` Fis Trivial
1 sibling, 1 reply; 10+ messages in thread
From: Fis Trivial @ 2018-01-14 20:06 UTC (permalink / raw)
To: Ludovic Courtès, Hartmut Goebel
Cc: 29824@debbugs.gnu.org, Peter Mikkelsen
>>
>> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2018-01-14 20:06 ` Fis Trivial
@ 2018-01-14 20:14 ` Fis Trivial
2018-01-14 22:02 ` Ludovic Courtès
0 siblings, 1 reply; 10+ messages in thread
From: Fis Trivial @ 2018-01-14 20:14 UTC (permalink / raw)
To: Ludovic Courtès, Hartmut Goebel
Cc: 29824@debbugs.gnu.org, Peter Mikkelsen
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2018-01-14 20:14 ` Fis Trivial
@ 2018-01-14 22:02 ` Ludovic Courtès
0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-01-14 22:02 UTC (permalink / raw)
To: Fis Trivial; +Cc: Hartmut Goebel, 29824@debbugs.gnu.org, Peter Mikkelsen
Hello,
Fis Trivial <ybbs.daans@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’.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2017-12-23 19:18 bug#29824: Meson 0.44.0 is broken with guix Fis Trivial
2018-01-02 15:52 ` Hartmut Goebel
@ 2020-09-28 13:00 ` zimoun
2020-11-30 16:14 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2 siblings, 0 replies; 10+ messages in thread
From: zimoun @ 2020-09-28 13:00 UTC (permalink / raw)
To: Fis Trivial; +Cc: 29824
Dear,
On Sat, 23 Dec 2017 at 19:18, Fis Trivial <ybbs.daans@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#29824: Meson 0.44.0 is broken with guix.
2017-12-23 19:18 bug#29824: Meson 0.44.0 is broken with guix Fis Trivial
2018-01-02 15:52 ` Hartmut Goebel
2020-09-28 13:00 ` zimoun
@ 2020-11-30 16:14 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2 siblings, 0 replies; 10+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2020-11-30 16:14 UTC (permalink / raw)
To: 29824-done
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-11-30 16:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-23 19:18 bug#29824: Meson 0.44.0 is broken with guix Fis Trivial
2018-01-02 15:52 ` Hartmut Goebel
2018-01-09 12:46 ` Ludovic Courtès
2018-01-09 21:10 ` Hartmut Goebel
[not found] ` <CADh9keUUZNYBd7-doGcL1O9+bMdxtVK=PzVFL-9_MSUPWF7_=A@mail.gmail.com>
[not found] ` <CADh9keWM+hyLV=ffDx7XDWQFLS9O4tEtBEJ3aQzHPQBX-yRfjw@mail.gmail.com>
2018-01-09 23:34 ` Peter Mikkelsen
2018-01-14 20:06 ` Fis Trivial
2018-01-14 20:14 ` Fis Trivial
2018-01-14 22:02 ` Ludovic Courtès
2020-09-28 13:00 ` zimoun
2020-11-30 16:14 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.