unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Request for help with writing defenition for pyxel.
@ 2021-08-29 17:07 Dmitry Polyakov
  2021-08-30 11:12 ` Antwane Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Polyakov @ 2021-08-29 17:07 UTC (permalink / raw)
  To: help-guix

I requesting for help with writing defenition for python retro game engine[fn:1].

There are steps according to manual to build this engine[fn:2]:

1. Get sources with ~git clone https://github.com/kitao/pyxel~
2. "cd" to this dir
3. Invoke ~guix environment --pure --ad-hoc gcc make python python-pip
   coreutils findutils sdl2 sdl2-image~
4. Appnend this to in file pyxel/core/Makefile on line 50
   ~-I/gnu/store/flvzd76nb8xzbp1sf5ckkvpwhspz9fqx-sdl-union-1.2.15/include/SDL2~
5. Invoke ~make -C pyxel/core clean all~
6. Invoke ~pip3 install .~ to install this package

And I got fully functional (according to examples) package in my
system, but when I was tried to write defenition:
#+begin_src scheme
(define-public python-pyxel
  (package
   (name "python-pyxel")
   (version "1.4.3")
   (source
    (origin
     (method url-fetch)
     (uri "file:///home/lil/src/ring/pyxel" ;; this is version with modified Makefile
	  ;; (pypi-uri "pyxel" version) <- this is original content from $ guix import pypi pyxel
	  )
     (sha256
      (base32
       "1gxvagmj37gs871bh77xafm5jyiaw1hvs76wb97w96kf3g8abhkz"))))
   (build-system python-build-system)
   (inputs
    `(("gifsicle" ,gifsicle)
      ("sdl2" ,(sdl-union (list sdl2 sdl2-image)))))
   (home-page "https://github.com/kitao/pyxel")
   (synopsis "A retro game engine for Python")
   (description "A retro game engine for Python")
   (license license:expat)))
#+end_src

I was stacked with that error[fn:3]
#+begin_src bash
starting phase `build'
running "python setup.py" with command "build" and parameters ()
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 2, in <module>
    from pyxel import VERSION
  File "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/__init__.py", line 10, in <module>
    from . import core  # type: ignore
  File "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/core/__init__.py", line 42, in <module>
    _lib = _load_library()
  File "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/core/__init__.py", line 39, in _load_library
    return cdll.LoadLibrary(lib_path)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
    return self._dlltype(name)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed with status 1
builder for `/gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv' failed with exit code 1
build of /gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv failed
View build log at '/var/log/guix/drvs/2v/3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv.bz2'.
guix build: error: build of `/gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv' failed
#+end_src

As far as I can understand, firstly guix should build C++ dependencies
and /then/ install python package. Isn't it? But I don't know how to do
this.

* Footnotes

[fn:1] https://github.com/kitao/pyxel Actually is C++ and Python engine

[fn:2] https://github.com/kitao/pyxel#execute-the-following-command-in-any-folder

[fn:3] For full error see https://pastebin.com/d18Wrrq4


-- 
魔法少女リルテチヅデですよ。


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Request for help with writing defenition for pyxel.
  2021-08-29 17:07 Request for help with writing defenition for pyxel Dmitry Polyakov
@ 2021-08-30 11:12 ` Antwane Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Antwane Mason @ 2021-08-30 11:12 UTC (permalink / raw)
  To: Dmitry Polyakov; +Cc: help-guix

I suspect something is wrong with where python is expecting libSDL2-2.0.so.
One thing you could try is trying to figure out where libSDL2-2.0.so is and
ensuring that it's in your PATH environment variable during build time.
Looking at build log and using -K option during guix build will be helpful
for this. I think the build log should tell you what environment variables
are set to. If it doesn't, going into the temporary build directory should
help you find this information. The link below should help with how to
debug the failed build.

https://guix.gnu.org/manual/en/html_node/Debugging-Build-Failures.html

Regards,
Antwane


On Sun, Aug 29, 2021 at 2:10 PM Dmitry Polyakov <polyakov@liltechdude.xyz>
wrote:

> I requesting for help with writing defenition for python retro game
> engine[fn:1].
>
> There are steps according to manual to build this engine[fn:2]:
>
> 1. Get sources with ~git clone https://github.com/kitao/pyxel~
> 2. "cd" to this dir
> 3. Invoke ~guix environment --pure --ad-hoc gcc make python python-pip
>    coreutils findutils sdl2 sdl2-image~
> 4. Appnend this to in file pyxel/core/Makefile on line 50
>
>  ~-I/gnu/store/flvzd76nb8xzbp1sf5ckkvpwhspz9fqx-sdl-union-1.2.15/include/SDL2~
> 5. Invoke ~make -C pyxel/core clean all~
> 6. Invoke ~pip3 install .~ to install this package
>
> And I got fully functional (according to examples) package in my
> system, but when I was tried to write defenition:
> #+begin_src scheme
> (define-public python-pyxel
>   (package
>    (name "python-pyxel")
>    (version "1.4.3")
>    (source
>     (origin
>      (method url-fetch)
>      (uri "file:///home/lil/src/ring/pyxel" ;; this is version with
> modified Makefile
>           ;; (pypi-uri "pyxel" version) <- this is original content from $
> guix import pypi pyxel
>           )
>      (sha256
>       (base32
>        "1gxvagmj37gs871bh77xafm5jyiaw1hvs76wb97w96kf3g8abhkz"))))
>    (build-system python-build-system)
>    (inputs
>     `(("gifsicle" ,gifsicle)
>       ("sdl2" ,(sdl-union (list sdl2 sdl2-image)))))
>    (home-page "https://github.com/kitao/pyxel")
>    (synopsis "A retro game engine for Python")
>    (description "A retro game engine for Python")
>    (license license:expat)))
> #+end_src
>
> I was stacked with that error[fn:3]
> #+begin_src bash
> starting phase `build'
> running "python setup.py" with command "build" and parameters ()
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "setup.py", line 2, in <module>
>     from pyxel import VERSION
>   File
> "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/__init__.py", line
> 10, in <module>
>     from . import core  # type: ignore
>   File
> "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/core/__init__.py",
> line 42, in <module>
>     _lib = _load_library()
>   File
> "/tmp/guix-build-python-pyxel-1.4.3.drv-0/source/pyxel/core/__init__.py",
> line 39, in _load_library
>     return cdll.LoadLibrary(lib_path)
>   File
> "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python3.8/ctypes/__init__.py",
> line 451, in LoadLibrary
>     return self._dlltype(name)
>   File
> "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python3.8/ctypes/__init__.py",
> line 373, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: libSDL2-2.0.so.0: cannot open shared object file: No such file or
> directory
> command "python" "-c" "import setuptools,
> tokenize;__file__='setup.py';f=getattr(tokenize, 'open',
> open)(__file__);code=f.read().replace('\\r\\n',
> '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed with
> status 1
> builder for
> `/gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv' failed
> with exit code 1
> build of
> /gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv failed
> View build log at
> '/var/log/guix/drvs/2v/3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv.bz2'.
> guix build: error: build of
> `/gnu/store/2v3wlpjg2mg3mllc4qkb22b34cmymiab-python-pyxel-1.4.3.drv' failed
> #+end_src
>
> As far as I can understand, firstly guix should build C++ dependencies
> and /then/ install python package. Isn't it? But I don't know how to do
> this.
>
> * Footnotes
>
> [fn:1] https://github.com/kitao/pyxel Actually is C++ and Python engine
>
> [fn:2]
> https://github.com/kitao/pyxel#execute-the-following-command-in-any-folder
>
> [fn:3] For full error see https://pastebin.com/d18Wrrq4
>
>
> --
> 魔法少女リルテチヅデですよ。
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-30 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-29 17:07 Request for help with writing defenition for pyxel Dmitry Polyakov
2021-08-30 11:12 ` Antwane Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).