unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests.
@ 2015-01-20 17:52 Federico Beffa
  2015-01-21 13:01 ` Federico Beffa
  2015-01-22 20:39 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Federico Beffa @ 2015-01-20 17:52 UTC (permalink / raw)
  To: Guix-devel

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

Please find attached a patch for libpeas.

This package, up to now, is the only one experiencing some
side-effects from the gobject-introspection patch that we adopted from
nix and which installs the full path name of shared libraries in
.typelib and .gir files.

The side-effect here is that some tests fail because:

* they are executed before installation (solvable by swapping 'check
and 'install phases) and

* because it makes use of libtool convenience libraries (libraries
which are only intermediate steps and are not installed). This is
implemented by specifying a fake installation directory called
"/nowhere" which, of course, does not exists. This is the error
message:

/tmp/nix-build-libpeas-1.12.1.drv-0/libpeas-1.12.1/tests/libpeas/.libs/extension-c:11955):
libpeas-ERROR **: Unhandled warning: (null): Failed to load shared
library '/nowhere/libintrospection-1.0.so.0' referenced by the
typelib: /nowhere/libintrospection-1.0.so.0: cannot open shared object
file: No such file or directory

Unless someone knows how to solve this problem, I suggest to disable the tests.

Regards,
Fede

[-- Attachment #2: 0001-gnu-libpeas-Update-to-1.12.1-add-arguments-and-disab.patch --]
[-- Type: text/x-patch, Size: 2890 bytes --]

From f64aede7de3f2a8fdaf0db144ce0eb14fbc1a68c Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Tue, 20 Jan 2015 18:43:55 +0100
Subject: [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable
 tests.

* gnu/packages/gnome.scm (libpeas): Update to version 1.12.1, add 'pre-build
  and 'check-after-install phases and delete 'check phase.  Given that
  'check-after-install only solves part of the problem, disable the tests.
---
 gnu/packages/gnome.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index acc964e..7622e0a 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -427,7 +428,7 @@ some form of information without getting in the user's way.")
 (define-public libpeas
   (package
     (name "libpeas")
-    (version "1.9.0")
+    (version "1.12.1")
     (source
      (origin
       (method url-fetch)
@@ -436,7 +437,7 @@ some form of information without getting in the user's way.")
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "13fzyzv6c0cfdj83z1s16lv8k997wpnzyzr0wfwcfkcmvz64g1q0"))))
+        "1mjjjjwphc83bjznmbsm7x0jg7ql261nys6qnl7mi0nkr4qvw476"))))
     (build-system gnu-build-system)
     (inputs
      `(("atk" ,atk)
@@ -449,6 +450,21 @@ some form of information without getting in the user's way.")
        ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)))
+    (arguments
+     ;; Some tests make use of libtool convenience libraries.  This, together
+     ;; with our patched 'gobject-introspection', results in temporary
+     ;; .gir/.typelib files referring to non-existent directories.  The
+     ;; installed files do not include those entries.
+     `(#:tests? #f
+       #:phases 
+       (alist-cons-before
+        'build 'pre-build
+        (lambda* _
+          (setenv "CC" "gcc"))
+        (alist-cons-after
+         'install 'check-after-install
+         (assq-ref %standard-phases 'check)
+         (alist-delete 'check %standard-phases)))))
     (home-page "https://wiki.gnome.org/Libpeas")
     (synopsis "GObject plugin system")
     (description
@@ -457,7 +473,6 @@ every application the chance to assume its own extensibility.  It also has a
 set of features including, but not limited to: multiple extension points; on
 demand (lazy) programming language support for C, Python and JS; simplicity of
 the API")
-
     (license license:lgpl2.0+)))
 
 (define-public gtkglext
-- 
1.8.4


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

* Re: [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests.
  2015-01-20 17:52 [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests Federico Beffa
@ 2015-01-21 13:01 ` Federico Beffa
  2015-01-22 20:43   ` Ludovic Courtès
  2015-01-22 20:39 ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Federico Beffa @ 2015-01-21 13:01 UTC (permalink / raw)
  To: Guix-devel

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

On Tue, Jan 20, 2015 at 6:52 PM, Federico Beffa <beffa@ieee.org> wrote:
> Please find attached a patch for libpeas.
>
> This package, up to now, is the only one experiencing some
> side-effects from the gobject-introspection patch that we adopted from
> nix and which installs the full path name of shared libraries in
> .typelib and .gir files.

I find the above side-effect disturbing. For this reason I would like
to propose an additional patch to 'gobject-introspection'. When
'gobject-introspection' consults a .typelib file (due to the patch we
introduced earlier) it will find a reference to a shared library which
includes the absolute path. With the new patch, if the library is not
found at the absolute path, then it discards the path and tries to
look for the library using the OS dynamic library loading
infrastructure (which is the normal behavior of
'gobject-introspection').

With this change 'libpeas' (and all its dependencies) passes all tests.

Regards,
Fede

[-- Attachment #2: 0001-gnu-libpeas-Update-to-1.12.1-add-pre-build-phase.patch --]
[-- Type: text/x-patch, Size: 2305 bytes --]

From 58d32305b609eccf54de620398a54457af0af0c5 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Tue, 20 Jan 2015 18:43:55 +0100
Subject: [PATCH 1/2] gnu: libpeas: Update to 1.12.1, add 'pre-build phase.

* gnu/packages/gnome.scm (libpeas): Update to version 1.12.1 and add
  'pre-build phase.
---
 gnu/packages/gnome.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index acc964e..0f33880 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -427,7 +428,7 @@ some form of information without getting in the user's way.")
 (define-public libpeas
   (package
     (name "libpeas")
-    (version "1.9.0")
+    (version "1.12.1")
     (source
      (origin
       (method url-fetch)
@@ -436,7 +437,7 @@ some form of information without getting in the user's way.")
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "13fzyzv6c0cfdj83z1s16lv8k997wpnzyzr0wfwcfkcmvz64g1q0"))))
+        "1mjjjjwphc83bjznmbsm7x0jg7ql261nys6qnl7mi0nkr4qvw476"))))
     (build-system gnu-build-system)
     (inputs
      `(("atk" ,atk)
@@ -449,6 +450,13 @@ some form of information without getting in the user's way.")
        ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)))
+    (arguments
+     `(#:phases 
+       (alist-cons-before
+        'build 'pre-build
+        (lambda* _
+          (setenv "CC" "gcc"))
+        %standard-phases)))
     (home-page "https://wiki.gnome.org/Libpeas")
     (synopsis "GObject plugin system")
     (description
@@ -457,7 +465,6 @@ every application the chance to assume its own extensibility.  It also has a
 set of features including, but not limited to: multiple extension points; on
 demand (lazy) programming language support for C, Python and JS; simplicity of
 the API")
-
     (license license:lgpl2.0+)))
 
 (define-public gtkglext
-- 
1.8.4


[-- Attachment #3: 0002-gnu-gobject-introspection-Add-patch.patch --]
[-- Type: text/x-patch, Size: 2264 bytes --]

From b90d70f312e9c298232d76f29099002f359f4468 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Wed, 21 Jan 2015 13:46:52 +0100
Subject: [PATCH 2/2] gnu: gobject-introspection: Add patch.

* gnu/packages/glib.scm (gobject-introspection): Add patch
  gobject-introspection-girepository.patch.
---
 gnu/packages/glib.scm                                   |  2 ++
 .../patches/gobject-introspection-girepository.patch    | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 gnu/packages/patches/gobject-introspection-girepository.patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 8294c4d..39fc736 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -213,6 +213,8 @@ dynamic loading, and an object system.")
               (base32 "1xwm7wmr9r9wp6xljb3bckx3a4siybavaq39w46ly7gpskxfv8iv"))
              (patches (list 
                        (search-patch "gobject-introspection-cc.patch")
+                       (search-patch
+                        "gobject-introspection-girepository.patch")
                        (search-patch 
                         "gobject-introspection-absolute-shlib-path.patch")))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/gobject-introspection-girepository.patch b/gnu/packages/patches/gobject-introspection-girepository.patch
new file mode 100644
index 0000000..5f1905f
--- /dev/null
+++ b/gnu/packages/patches/gobject-introspection-girepository.patch
@@ -0,0 +1,17 @@
+--- gobject-introspection-1.42.0/girepository/gitypelib.c.orig	2015-01-20 20:37:43.706684642 +0100
++++ gobject-introspection-1.42.0/girepository/gitypelib.c	2015-01-21 09:19:40.927751124 +0100
+@@ -2296,7 +2296,14 @@
+         {
+           GModule *module;
+ 
++          /* We expect an absolute directory name.  If the library is
++             not found, try with just the basename and the system
++             dynamic library infrastructure. */
+           module = load_one_shared_library (shlibs[i]);
++          if (module == NULL && g_path_is_absolute (shlibs[i]))
++            {
++              module = load_one_shared_library (g_basename(shlibs[i]));
++            }
+ 
+           if (module == NULL)
+             {
-- 
1.8.4


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

* Re: [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests.
  2015-01-20 17:52 [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests Federico Beffa
  2015-01-21 13:01 ` Federico Beffa
@ 2015-01-22 20:39 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-01-22 20:39 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> This package, up to now, is the only one experiencing some
> side-effects from the gobject-introspection patch that we adopted from
> nix and which installs the full path name of shared libraries in
> .typelib and .gir files.
>
> The side-effect here is that some tests fail because:
>
> * they are executed before installation (solvable by swapping 'check
> and 'install phases) and

That’s not a very good sign though.  In general, it should be possible
to run tests before installation.

> * because it makes use of libtool convenience libraries (libraries
> which are only intermediate steps and are not installed). This is
> implemented by specifying a fake installation directory called
> "/nowhere" which, of course, does not exists. This is the error
> message:
>
> /tmp/nix-build-libpeas-1.12.1.drv-0/libpeas-1.12.1/tests/libpeas/.libs/extension-c:11955):
> libpeas-ERROR **: Unhandled warning: (null): Failed to load shared
> library '/nowhere/libintrospection-1.0.so.0' referenced by the
> typelib: /nowhere/libintrospection-1.0.so.0: cannot open shared object
> file: No such file or directory

Does it mean that it’s trying to dlopen a convenience library?  This
shouldn’t work anyway, right?

Thanks for investigating!

Ludo’.

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

* Re: [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests.
  2015-01-21 13:01 ` Federico Beffa
@ 2015-01-22 20:43   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-01-22 20:43 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> On Tue, Jan 20, 2015 at 6:52 PM, Federico Beffa <beffa@ieee.org> wrote:
>> Please find attached a patch for libpeas.
>>
>> This package, up to now, is the only one experiencing some
>> side-effects from the gobject-introspection patch that we adopted from
>> nix and which installs the full path name of shared libraries in
>> .typelib and .gir files.
>
> I find the above side-effect disturbing. For this reason I would like
> to propose an additional patch to 'gobject-introspection'. When
> 'gobject-introspection' consults a .typelib file (due to the patch we
> introduced earlier) it will find a reference to a shared library which
> includes the absolute path. With the new patch, if the library is not
> found at the absolute path, then it discards the path and tries to
> look for the library using the OS dynamic library loading
> infrastructure (which is the normal behavior of
> 'gobject-introspection').

I see, that makes sense indeed.

> With this change 'libpeas' (and all its dependencies) passes all tests.

Perfect!

> From 58d32305b609eccf54de620398a54457af0af0c5 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Tue, 20 Jan 2015 18:43:55 +0100
> Subject: [PATCH 1/2] gnu: libpeas: Update to 1.12.1, add 'pre-build phase.
>
> * gnu/packages/gnome.scm (libpeas): Update to version 1.12.1 and add
>   'pre-build phase.

OK.

> From b90d70f312e9c298232d76f29099002f359f4468 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 21 Jan 2015 13:46:52 +0100
> Subject: [PATCH 2/2] gnu: gobject-introspection: Add patch.
>
> * gnu/packages/glib.scm (gobject-introspection): Add patch
>   gobject-introspection-girepository.patch.

[...]

> --- /dev/null
> +++ b/gnu/packages/patches/gobject-introspection-girepository.patch
> @@ -0,0 +1,17 @@
> +--- gobject-introspection-1.42.0/girepository/gitypelib.c.orig	2015-01-20 20:37:43.706684642 +0100
> ++++ gobject-introspection-1.42.0/girepository/gitypelib.c	2015-01-21 09:19:40.927751124 +0100
> +@@ -2296,7 +2296,14 @@
> +         {
> +           GModule *module;
> + 
> ++          /* We expect an absolute directory name.  If the library is
> ++             not found, try with just the basename and the system
> ++             dynamic library infrastructure. */
> +           module = load_one_shared_library (shlibs[i]);
> ++          if (module == NULL && g_path_is_absolute (shlibs[i]))
> ++            {
> ++              module = load_one_shared_library (g_basename(shlibs[i]));

Please explain at the top of the paragraph that libgobject-introspection
normally looks for library in the dynamic linker’s search path, and that
because we use absolute file names in gir files, we need this patch to
get closer to the initial behavior.

OK to push with this change.

Thank you!

Ludo’.

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

end of thread, other threads:[~2015-01-22 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 17:52 [PATCH] gnu: libpeas: Update to 1.12.1, add arguments and disable tests Federico Beffa
2015-01-21 13:01 ` Federico Beffa
2015-01-22 20:43   ` Ludovic Courtès
2015-01-22 20:39 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).