all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Red Notebook will not build.
@ 2019-05-07  4:01 Jesse Gibbons
  2019-05-07 10:19 ` L p R n d n
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Gibbons @ 2019-05-07  4:01 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

I am trying to make a Red Notebook package (home page
<rednotebook.app>). I defined a package that should work, but I get an
error when I try to build it. Attached are my package definition
(rednotebook.scm), and the build log
(g05wsv8nqq8m71n3wg65043lixsfaa-rednotebook-2.11.1.drv.bz2). The build
log was produced after I ran `guix pull` and `guix upgrade` on May 6
2019 (guix (GNU Guix) d6a68e90483b35bdc2ea78afe2c81873be67ec95). During
the builld process the '_()' method appears to be undefined. However,
this is not a problem on other systems.

When I try getting source with `guix build --source rednotebook` and
enter an environment with `guix environment rednotebook` I cannot run
the program from the source directory (`bash ./run` or `python3
rednotebook/journal.py` both have the same results). Attached is output
from my attempt (rednotebook.log). It appears Python cannot find the
libgtksourceview shared library, though I can confirm it is located
in the environment's LIBRARY_PATH.

I need a hint on where the problem is:
- If the problem is something wrong with guix it needs to be identified
  and sent to the bug mailing list.
- If it is in my package definition, what should be changed in the
  definition?
- If it is in the package itself (due to programmers neglecting best
  practices of developing in python), how can I apply a custom patch
  until we can get it fixed in the github repository? The info doc
  appears to be missing the details.

I suspect it is a combination of the three.

Thanks in advance!
-Jesse

[-- Attachment #2: g05wsv8nqq8m71n3wg65043lixsfaa-rednotebook-2.11.1.drv.bz2 --]
[-- Type: application/x-bzip, Size: 9409 bytes --]

[-- Attachment #3: rednotebook.log --]
[-- Type: text/x-log, Size: 354 bytes --]

Traceback (most recent call last):
  File "rednotebook/journal.py", line 44, in <module>
    gi.require_version('GtkSource', '3.0')
  File "/gnu/store/zgq6zx6riin708xcl31xwz1ca786wr85-profile/lib/python3.7/site-packages/gi/__init__.py", line 134, in require_version
    (namespace, version))
ValueError: Namespace GtkSource not available for version 3.0

[-- Attachment #4: rednotebook.scm --]
[-- Type: text/x-scheme, Size: 1404 bytes --]


#!
see https://github.com/jendrikseipp/rednotebook
!#
(define-module (custom packages rednotebook)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system python)
  #:use-module (guix licenses))
(define-public rednotebook
  (package
   (name "rednotebook")
   (version "2.11.1")
   (source
    (origin
     (method url-fetch)
     (uri (string-append
           "https://github.com/jendrikseipp/rednotebook/archive/v"
           version
           ".tar.gz"))
     (sha256
      (base32
       "15n1ziypfj3lzpvhha7r637zrb259l9yrcsvkic9cg5mndiaivs3"))))
   (build-system python-build-system)
   (inputs
    `(("python" ,(@ (gnu packages python) python-3))))
   (propagated-inputs
    `(("python-pygobject"
       ,(@ (gnu packages glib) python-pygobject))
      ("gtk+" ,(@ (gnu packages gtk) gtk+))
      ("gtksourceview"
       ,(@ (gnu packages gtk) gtksourceview))
      ("webkitgtk"
       ,(@ (gnu packages webkit) webkitgtk-2.24))
      ("python-pyyaml"
       ,(@ (gnu packages python-xyz) python-pyyaml))))
   (home-page "https://www.rednotebook.app")
   (synopsis "Desktop Journal")
   (description
    "RedNotebook is a modern desktop journal.  It lets you format, tag
and search your entries.  You can also add pictures, links and
customizable templates, spell check your notes, and export to plain
text, HTML, Latex or PDF.")
   (license gpl2+))
  )


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

* Re: Red Notebook will not build.
  2019-05-07  4:01 Red Notebook will not build Jesse Gibbons
@ 2019-05-07 10:19 ` L p R n d n
  2019-05-07 13:37   ` Jesse Gibbons
  0 siblings, 1 reply; 4+ messages in thread
From: L p R n d n @ 2019-05-07 10:19 UTC (permalink / raw)
  To: Jesse Gibbons; +Cc: help-guix

Hello,

Jesse Gibbons <jgibbons2357@gmail.com> writes:

> I am trying to make a Red Notebook package (home page
> <rednotebook.app>). I defined a package that should work, but I get an
> error when I try to build it. Attached are my package definition
> (rednotebook.scm), and the build log
> (g05wsv8nqq8m71n3wg65043lixsfaa-rednotebook-2.11.1.drv.bz2). The build
> log was produced after I ran `guix pull` and `guix upgrade` on May 6
> 2019 (guix (GNU Guix) d6a68e90483b35bdc2ea78afe2c81873be67ec95). During
> the builld process the '_()' method appears to be undefined. However,
> this is not a problem on other systems.
>
> When I try getting source with `guix build --source rednotebook` and
> enter an environment with `guix environment rednotebook` I cannot run
> the program from the source directory (`bash ./run` or `python3
> rednotebook/journal.py` both have the same results). Attached is output
> from my attempt (rednotebook.log). It appears Python cannot find the
> libgtksourceview shared library, though I can confirm it is located
> in the environment's LIBRARY_PATH.
>
> I need a hint on where the problem is:
> - If the problem is something wrong with guix it needs to be identified
>   and sent to the bug mailing list.
> - If it is in my package definition, what should be changed in the
>   definition?
> - If it is in the package itself (due to programmers neglecting best
>   practices of developing in python), how can I apply a custom patch
>   until we can get it fixed in the github repository? The info doc
>   appears to be missing the details.
>
> I suspect it is a combination of the three.
>
> Thanks in advance!
> -Jesse
>
>
> Traceback (most recent call last):
>   File "rednotebook/journal.py", line 44, in <module>
>     gi.require_version('GtkSource', '3.0')
>   File "/gnu/store/zgq6zx6riin708xcl31xwz1ca786wr85-profile/lib/python3.7/site-packages/gi/__init__.py", line 134, in require_version
>     (namespace, version))
> ValueError: Namespace GtkSource not available for version 3.0
>
>
> #!
> see https://github.com/jendrikseipp/rednotebook
> !#
> (define-module (custom packages rednotebook)
>   #:use-module (guix packages)
>   #:use-module (guix download)
>   #:use-module (guix build-system python)
>   #:use-module (guix licenses))
> (define-public rednotebook
>   (package
>    (name "rednotebook")
>    (version "2.11.1")
>    (source
>     (origin
>      (method url-fetch)
>      (uri (string-append
>            "https://github.com/jendrikseipp/rednotebook/archive/v"
>            version
>            ".tar.gz"))
>      (sha256
>       (base32
>        "15n1ziypfj3lzpvhha7r637zrb259l9yrcsvkic9cg5mndiaivs3"))))
>    (build-system python-build-system)
>    (inputs
>     `(("python" ,(@ (gnu packages python) python-3))))
>    (propagated-inputs
>     `(("python-pygobject"
>        ,(@ (gnu packages glib) python-pygobject))
>       ("gtk+" ,(@ (gnu packages gtk) gtk+))
>       ("gtksourceview"
>        ,(@ (gnu packages gtk) gtksourceview))
>       ("webkitgtk"
>        ,(@ (gnu packages webkit) webkitgtk-2.24))
>       ("python-pyyaml"
>        ,(@ (gnu packages python-xyz) python-pyyaml))))
>    (home-page "https://www.rednotebook.app")
>    (synopsis "Desktop Journal")
>    (description
>     "RedNotebook is a modern desktop journal.  It lets you format, tag
> and search your entries.  You can also add pictures, links and
> customizable templates, spell check your notes, and export to plain
> text, HTML, Latex or PDF.")
>    (license gpl2+))
>   )

I didn't take the time to read the full log so sorry if I'm beside the
point but according to the traceback you provided, it seems to me it's
searching for gtksourceview-3.0 which, since recently, is provided by
gtksoureview-3 and not gtksourceview. What happens if you change
gtksourceview to gtksourceview-3 in the propagated-inputs?

Have a nice day,

Lprndn

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

* Re: Red Notebook will not build.
  2019-05-07 10:19 ` L p R n d n
@ 2019-05-07 13:37   ` Jesse Gibbons
  2019-05-08  6:54     ` swedebugia
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Gibbons @ 2019-05-07 13:37 UTC (permalink / raw)
  To: L p R n d n; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 5693 bytes --]

On Tue, 07 May 2019 12:19:45 +0200
L  p R n  d n    <guix@lprndn.info> wrote:

> Hello,
> 
> Jesse Gibbons <jgibbons2357@gmail.com> writes:
> 
> > I am trying to make a Red Notebook package (home page
> > <rednotebook.app>). I defined a package that should work, but I get
> > an error when I try to build it. Attached are my package definition
> > (rednotebook.scm), and the build log
> > (g05wsv8nqq8m71n3wg65043lixsfaa-rednotebook-2.11.1.drv.bz2). The
> > build log was produced after I ran `guix pull` and `guix upgrade`
> > on May 6 2019 (guix (GNU Guix)
> > d6a68e90483b35bdc2ea78afe2c81873be67ec95). During the builld
> > process the '_()' method appears to be undefined. However, this is
> > not a problem on other systems.
> >
> > When I try getting source with `guix build --source rednotebook` and
> > enter an environment with `guix environment rednotebook` I cannot
> > run the program from the source directory (`bash ./run` or `python3
> > rednotebook/journal.py` both have the same results). Attached is
> > output from my attempt (rednotebook.log). It appears Python cannot
> > find the libgtksourceview shared library, though I can confirm it
> > is located in the environment's LIBRARY_PATH.
> >
> > I need a hint on where the problem is:
> > - If the problem is something wrong with guix it needs to be
> > identified and sent to the bug mailing list.
> > - If it is in my package definition, what should be changed in the
> >   definition?
> > - If it is in the package itself (due to programmers neglecting best
> >   practices of developing in python), how can I apply a custom patch
> >   until we can get it fixed in the github repository? The info doc
> >   appears to be missing the details.
> >
> > I suspect it is a combination of the three.
> >
> > Thanks in advance!
> > -Jesse
> >
> >
> > Traceback (most recent call last):
> >   File "rednotebook/journal.py", line 44, in <module>
> >     gi.require_version('GtkSource', '3.0')
> >   File
> > "/gnu/store/zgq6zx6riin708xcl31xwz1ca786wr85-profile/lib/python3.7/site-packages/gi/__init__.py",
> > line 134, in require_version (namespace, version)) ValueError:
> > Namespace GtkSource not available for version 3.0
> >
> >
> > #!
> > see https://github.com/jendrikseipp/rednotebook
> > !#
> > (define-module (custom packages rednotebook)
> >   #:use-module (guix packages)
> >   #:use-module (guix download)
> >   #:use-module (guix build-system python)
> >   #:use-module (guix licenses))
> > (define-public rednotebook
> >   (package
> >    (name "rednotebook")
> >    (version "2.11.1")
> >    (source
> >     (origin
> >      (method url-fetch)
> >      (uri (string-append
> >            "https://github.com/jendrikseipp/rednotebook/archive/v"
> >            version
> >            ".tar.gz"))
> >      (sha256
> >       (base32
> >        "15n1ziypfj3lzpvhha7r637zrb259l9yrcsvkic9cg5mndiaivs3"))))
> >    (build-system python-build-system)
> >    (inputs
> >     `(("python" ,(@ (gnu packages python) python-3))))
> >    (propagated-inputs
> >     `(("python-pygobject"
> >        ,(@ (gnu packages glib) python-pygobject))
> >       ("gtk+" ,(@ (gnu packages gtk) gtk+))
> >       ("gtksourceview"
> >        ,(@ (gnu packages gtk) gtksourceview))
> >       ("webkitgtk"
> >        ,(@ (gnu packages webkit) webkitgtk-2.24))
> >       ("python-pyyaml"
> >        ,(@ (gnu packages python-xyz) python-pyyaml))))
> >    (home-page "https://www.rednotebook.app")
> >    (synopsis "Desktop Journal")
> >    (description
> >     "RedNotebook is a modern desktop journal.  It lets you format,
> > tag and search your entries.  You can also add pictures, links and
> > customizable templates, spell check your notes, and export to plain
> > text, HTML, Latex or PDF.")
> >    (license gpl2+))
> >   )
> 
> I didn't take the time to read the full log so sorry if I'm beside the
> point but according to the traceback you provided, it seems to me it's
> searching for gtksourceview-3.0 which, since recently, is provided by
> gtksoureview-3 and not gtksourceview. What happens if you change
> gtksourceview to gtksourceview-3 in the propagated-inputs?
> 
> Have a nice day,
> 
> Lprndn

Thank you for looking into this. I have been trying to fix this for a
while and wondered why I did not get the ususal error. I did not look
too far into it because it was late.

I had generated the package definition from a json file I made
(rednotebook.json) so I could generate the package definition by running
`guix import json rednotebook.json`. I did not update the package
definition after I updated guix. The build log looks mostly unchanged.

I went into the environment again and got a different error this time
(rednotebook.log). I started with this error:

RuntimeError: could not create new GType:
rednotebook+gui+browser+Browser (subclass of void)


When I look into the file that defines the Browser class I see it tries
to import the "webKit2" package, version 4.0 which is not defined by
guix. Then it defines a subclass of WebKit2.WebView which Python says
is null.

Luckily there is a warning about what it is looking for:

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libwebkit2gtk-4.0.so.37' referenced by the typelib: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libjavascriptcoregtk-4.0.so.18' referenced by the typelib: libjavascriptcoregtk-4.0.so.18: cannot open shared object file: No such file or directory

This was the error I had before i updated guix. Both of these shared
libraries are in the environment's $LIBRARY_PATH.

Thanks again,
-Jesse

[-- Attachment #2: rednotebook.json --]
[-- Type: application/json, Size: 649 bytes --]

[-- Attachment #3: rednotebook.log --]
[-- Type: text/x-log, Size: 2325 bytes --]

Adding /home/jesse/Documents/rednotebook/rednotebook-2.11.1 to sys.path
2019-05-07 07:12:54,057 INFO     Writing log to file "/home/jesse/.rednotebook/rednotebook.log"
2019-05-07 07:12:54,057 INFO     System encoding: utf-8
2019-05-07 07:12:54,058 INFO     Language code: None
rednotebook/journal.py:161: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
2019-05-07 07:12:54,117 WARNING  For spell checking, please install enchant (python3-enchant).

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libwebkit2gtk-4.0.so.37' referenced by the typelib: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory

** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libjavascriptcoregtk-4.0.so.18' referenced by the typelib: libjavascriptcoregtk-4.0.so.18: cannot open shared object file: No such file or directory
/gnu/store/kz1d84nv5rlqdf415i16wz8zvf492l1c-profile/lib/python3.7/site-packages/gi/types.py:226: Warning: cannot derive 'rednotebook+gui+browser+Browser' from non-derivable parent type 'void'
  _gi.type_register(cls, namespace.get('__gtype_name__'))
Traceback (most recent call last):
  File "rednotebook/journal.py", line 168, in <module>
    from rednotebook.gui.main_window import MainWindow
  File "/home/jesse/Documents/rednotebook/rednotebook-2.11.1/rednotebook/gui/main_window.py", line 45, in <module>
    from rednotebook.gui import browser
  File "/home/jesse/Documents/rednotebook/rednotebook-2.11.1/rednotebook/gui/browser.py", line 41, in <module>
    class Browser(WebKit2.WebView):
  File "/gnu/store/kz1d84nv5rlqdf415i16wz8zvf492l1c-profile/lib/python3.7/site-packages/gi/types.py", line 235, in __init__
    super(GObjectMeta, cls).__init__(name, bases, dict_)
  File "/gnu/store/kz1d84nv5rlqdf415i16wz8zvf492l1c-profile/lib/python3.7/site-packages/gi/types.py", line 214, in __init__
    cls._type_register(cls.__dict__)
  File "/gnu/store/kz1d84nv5rlqdf415i16wz8zvf492l1c-profile/lib/python3.7/site-packages/gi/types.py", line 226, in _type_register
    _gi.type_register(cls, namespace.get('__gtype_name__'))
RuntimeError: could not create new GType: rednotebook+gui+browser+Browser (subclass of void)

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

* Re: Red Notebook will not build.
  2019-05-07 13:37   ` Jesse Gibbons
@ 2019-05-08  6:54     ` swedebugia
  0 siblings, 0 replies; 4+ messages in thread
From: swedebugia @ 2019-05-08  6:54 UTC (permalink / raw)
  To: help-guix

On 2019-05-07 15:37, Jesse Gibbons wrote:
...

> 
> When I look into the file that defines the Browser class I see it tries
> to import the "webKit2" package, version 4.0 which is not defined by
> guix. Then it defines a subclass of WebKit2.WebView which Python says
> is null.
> 
> Luckily there is a warning about what it is looking for:
> 
> ** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libwebkit2gtk-4.0.so.37' referenced by the typelib: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory
> 
> ** (journal.py:2637): WARNING **: 07:12:54.144: Failed to load shared library 'libjavascriptcoregtk-4.0.so.18' referenced by the typelib: libjavascriptcoregtk-4.0.so.18: cannot open shared object file: No such file or directory
> 
> This was the error I had before i updated guix. Both of these shared
> libraries are in the environment's $LIBRARY_PATH.

It is quite common that software is hardcoded to expect the libraries in 
certain paths e.g. /usr/lib or whatever. I suggest you substitute the 
path in journal.py to help it find the libraries.

-- 
Cheers
Swedebugia

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

end of thread, other threads:[~2019-05-08  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07  4:01 Red Notebook will not build Jesse Gibbons
2019-05-07 10:19 ` L p R n d n
2019-05-07 13:37   ` Jesse Gibbons
2019-05-08  6:54     ` swedebugia

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.