all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* fixing python-gpg package, need help
@ 2017-01-08 21:09 Troy Sankey
  2017-01-09 10:14 ` Efraim Flashner
  2017-01-09 21:28 ` Leo Famulari
  0 siblings, 2 replies; 5+ messages in thread
From: Troy Sankey @ 2017-01-08 21:09 UTC (permalink / raw)
  To: guix-devel

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

I'm trying to fix the python-gpg package.  Latest build [0] was a
failure because gpgme.h claims gpgme was compiled with _FILE_OFFSET_BITS
= 64, implying the current build (python-gpg) doesn't define any
_FILE_OFFSET_BITS (it should also be set to 64, I think).

Relevant build log snippet:

---- cut here / start ----
swigging gpgme.i to gpgme_wrap.c
swig -python -py3 -builtin -threads -outdir gpg -o gpgme_wrap.c gpgme.i
gpgme.h:104: Error: CPP #error "GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME
manual.". Use the -cpperraswarn option to continue swig processing.
error: command 'swig' failed with exit status 1
---- cut here / end ----

Attached is a patch which forces _FILE_OFFSET_BITS = 64 and
_LARGEFILE_SOURCE = 1, as per the gpgme documentation [1].  This fixes
the build on my laptop (i686), but I'm quite sure this is a bad hack.

Seeking help!

Troy

[0] http://hydra.gnu.org/build/1749143
[1] https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html

[-- Attachment #2: fix-python-gpg.patch --]
[-- Type: text/x-diff, Size: 1341 bytes --]

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index dc801a6a4..a20dd9928 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -402,7 +402,8 @@ and every application benefits from this.")
               (uri (pypi-uri "gpg" version))
               (sha256
                (base32
-                "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
+                "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))
+              (patches (search-patches "python-gpg-add-largefile-cflags.patch"))))
     (build-system python-build-system)
     (arguments
      '(#:tests? #f)) ; No test suite.
diff --git a/gnu/packages/patches/python-gpg-add-largefile-cflags.patch b/gnu/packages/patches/python-gpg-add-largefile-cflags.patch
new file mode 100644
index 000000000..e57efe307
--- /dev/null
+++ b/gnu/packages/patches/python-gpg-add-largefile-cflags.patch
@@ -0,0 +1,12 @@
+--- gpg-1.8.0-old/setup.py      2016-11-30 04:41:41.000000000 -0500
++++ gpg-1.8.0/setup.py  2017-01-08 15:13:20.437996702 -0500
+@@ -34,6 +34,9 @@
+ extra_swig_opts = []
+ extra_macros = dict()
+
++# force largefile support
++extra_macros.update({"_FILE_OFFSET_BITS": 64, "_LARGEFILE_SOURCE": 1})
++
+ if os.path.exists("../../src/gpgme-config"):
+     # In-tree build.
+     in_tree = True

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

* Re: fixing python-gpg package, need help
  2017-01-08 21:09 fixing python-gpg package, need help Troy Sankey
@ 2017-01-09 10:14 ` Efraim Flashner
  2017-01-09 14:04   ` Troy Sankey
  2017-01-09 21:28 ` Leo Famulari
  1 sibling, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2017-01-09 10:14 UTC (permalink / raw)
  To: Troy Sankey; +Cc: guix-devel

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

On Sun, Jan 08, 2017 at 04:09:17PM -0500, Troy Sankey wrote:
> I'm trying to fix the python-gpg package.  Latest build [0] was a
> failure because gpgme.h claims gpgme was compiled with _FILE_OFFSET_BITS
> = 64, implying the current build (python-gpg) doesn't define any
> _FILE_OFFSET_BITS (it should also be set to 64, I think).
> 
> Relevant build log snippet:
> 
> ---- cut here / start ----
> swigging gpgme.i to gpgme_wrap.c
> swig -python -py3 -builtin -threads -outdir gpg -o gpgme_wrap.c gpgme.i
> gpgme.h:104: Error: CPP #error "GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME
> manual.". Use the -cpperraswarn option to continue swig processing.
> error: command 'swig' failed with exit status 1
> ---- cut here / end ----
> 
> Attached is a patch which forces _FILE_OFFSET_BITS = 64 and
> _LARGEFILE_SOURCE = 1, as per the gpgme documentation [1].  This fixes
> the build on my laptop (i686), but I'm quite sure this is a bad hack.
> 

Since your laptop is actually 32-bit, does python-gpg build without the
patch? If it does build without the patch, then it means that the
64-bit-ness of the build-machine on hydra is leaking into the build
environment, and it should be set to the 32/64-bit-ness of the
%target-system.

> Seeking help!
> 
> Troy
> 
> [0] http://hydra.gnu.org/build/1749143
> [1] https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: fixing python-gpg package, need help
  2017-01-09 10:14 ` Efraim Flashner
@ 2017-01-09 14:04   ` Troy Sankey
  2017-01-09 14:32     ` Troy Sankey
  0 siblings, 1 reply; 5+ messages in thread
From: Troy Sankey @ 2017-01-09 14:04 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

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

Quoting Efraim Flashner (2017-01-09 05:14:29)
> On Sun, Jan 08, 2017 at 04:09:17PM -0500, Troy Sankey wrote:
> > I'm trying to fix the python-gpg package.  Latest build [0] was a
> > failure because gpgme.h claims gpgme was compiled with _FILE_OFFSET_BITS
> > = 64, implying the current build (python-gpg) doesn't define any
> > _FILE_OFFSET_BITS (it should also be set to 64, I think).
> > 
> > Relevant build log snippet:
> > 
> > ---- cut here / start ----
> > swigging gpgme.i to gpgme_wrap.c
> > swig -python -py3 -builtin -threads -outdir gpg -o gpgme_wrap.c gpgme.i
> > gpgme.h:104: Error: CPP #error "GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME
> > manual.". Use the -cpperraswarn option to continue swig processing.
> > error: command 'swig' failed with exit status 1
> > ---- cut here / end ----
> > 
> > Attached is a patch which forces _FILE_OFFSET_BITS = 64 and
> > _LARGEFILE_SOURCE = 1, as per the gpgme documentation [1].  This fixes
> > the build on my laptop (i686), but I'm quite sure this is a bad hack.
> > 
> 
> Since your laptop is actually 32-bit, does python-gpg build without the
> patch? If it does build without the patch, then it means that the
> 64-bit-ness of the build-machine on hydra is leaking into the build
> environment, and it should be set to the 32/64-bit-ness of the
> %target-system.

No, without the patch my 32-bit system produces the same error as
hydra's 32-bit build.

Troy

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE0zLJ6STd4Cp+CgbIgs677ofYV8IFAlhzmFsACgkQgs677ofY
V8JbpQ/+PqlhLg202J5jzfYCsXpK8/T/S5uv/zNwJE4LQLmQpDO5dau7+dmH2bcY
aCYhdIO16TaIyu89eyoAFMLxvuf2xmakfH5ZPgBHghuLIom0AP1uY+v8kZkQdxQa
LZ7L9McFE+tDsJyuXECm9j+cr0aQbQJfnh7FV5rPwXqYuQ7oVoTz1SrlyZznaTHD
zPqeh8hJLYFPalLWbasumKYqRumDk3i3bN99vJaztaS3CrlUbMU9/ZV4pRKXpJRW
Lz2C53ZNLlbx9ho7M3igplLfYB3MPOgl6qQAJvpklrajo3HF1UIclUCbw5K7W0b8
rnONIyrCPJepHPa9hBQVSdq4WlQLT1Q5Cz//Jw8idGtwuCZENllks3u3pO8Zcpp/
89aO7INfdaKOlpaMiKbnrHAeEphk8qseoYAUEXniJnKo/mKqX6gdk05rfSumMUSu
UVyvymzINplnRy32y+L8NKdy0jH4UbrsXPNEB3FZd9jeQrBeyQ3BIUWqZmaYQEmV
gSux96GvIW/K7Ze6unxiD+0dLz/B+9XbvMZpCNxh0h74wiUOe40DmYZ1+mdRSlIl
05IW/ZgJwvAihCpHPeQKM9IWVp8c+MdI7eInswjXvYBVLf28NSTkz+iZRBwhVMA2
vK4Qk8NnwYP0L5PRBnX9257SIgpD04PG2cSH5zYELhKUXJIPJ9I=
=rosd
-----END PGP SIGNATURE-----

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

* Re: fixing python-gpg package, need help
  2017-01-09 14:04   ` Troy Sankey
@ 2017-01-09 14:32     ` Troy Sankey
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Sankey @ 2017-01-09 14:32 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

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

Quoting Troy Sankey (2017-01-09 09:04:17)
> > Since your laptop is actually 32-bit, does python-gpg build without the
> > patch? If it does build without the patch, then it means that the
> > 64-bit-ness of the build-machine on hydra is leaking into the build
> > environment, and it should be set to the 32/64-bit-ness of the
> > %target-system.
> 
> No, without the patch my 32-bit system produces the same error as
> hydra's 32-bit build.

Oh, I should clarify: python-gpg x86_64 builds successfully on hydra and
on my x86_64 workstation at home.  The i686 build on hydra fails, as
well as my thinkpad x60 laptop.

Troy

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE0zLJ6STd4Cp+CgbIgs677ofYV8IFAlhznwMACgkQgs677ofY
V8KcIw//e56fnM5KCvIBq/LL3pXwbj7pMXCRKroQ66Zi9/yyhrtYVADpip5gHYNz
wAdlXtQYMzg2c5rdCAwbdFo+9GjHb3BxLedL9wD7DGr/qpeac3crxnPEYu8YMmgY
9fg28dDTQFr/+PUbXpl9sLxb1zXrwoKBhrrSEEdJncNMkLlXys9J8wQ4U3bgLiCL
NW95z2fcfsCXELw/ELpWMuyfeWaOVKSJsimckdO/T1pQS1XObC12iARMJ5fTy+Pp
r7n7cBBC9qO1vUyN3ocWVPg7gmr7aLIU/3L7wR60dEmxk18KKUXnqu7TELtqG2kJ
cAstMD4ogFWxvELU+F39k1fXhg+qUW7NkOLXP4KJ8fA0RRk4sRSKcsb4cLy5q0Nl
uuezoLUhGdPW8OpMo5emGyVhtj6dHOzPkh2G06kmJa9/QbUYB0B7xSnFFWMMsydW
QPk0Ajk9RSawje6vob06y88h3KA0AeANSuVHDMuQlgkl/knKaTab76PF2QcQNc0t
s6FKQiGPVl7l2o4nehCbu4fGlZQLJ1d22bXxM2cfzuvEEXm1rBa3BQIBiwEpUbV4
IZeU29gQPddAazexY3GdWh1imfLmPQfUc7M3iuYIjmp26NVvnEOm0LlBF7UYkiQc
cEUr44poIS3Nsmz9yJils5kros5tqBlsoEz0zDlploWb5rY0QdA=
=PSc2
-----END PGP SIGNATURE-----

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

* Re: fixing python-gpg package, need help
  2017-01-08 21:09 fixing python-gpg package, need help Troy Sankey
  2017-01-09 10:14 ` Efraim Flashner
@ 2017-01-09 21:28 ` Leo Famulari
  1 sibling, 0 replies; 5+ messages in thread
From: Leo Famulari @ 2017-01-09 21:28 UTC (permalink / raw)
  To: Troy Sankey; +Cc: guix-devel

On Sun, Jan 08, 2017 at 04:09:17PM -0500, Troy Sankey wrote:
> I'm trying to fix the python-gpg package.  Latest build [0] was a
> failure because gpgme.h claims gpgme was compiled with _FILE_OFFSET_BITS
> = 64, implying the current build (python-gpg) doesn't define any
> _FILE_OFFSET_BITS (it should also be set to 64, I think).
> 
> Relevant build log snippet:
> 
> ---- cut here / start ----
> swigging gpgme.i to gpgme_wrap.c
> swig -python -py3 -builtin -threads -outdir gpg -o gpgme_wrap.c gpgme.i
> gpgme.h:104: Error: CPP #error "GPGME was compiled with _FILE_OFFSET_BITS = 64, please see the section "Largefile support (LFS)" in the GPGME
> manual.". Use the -cpperraswarn option to continue swig processing.
> error: command 'swig' failed with exit status 1
> ---- cut here / end ----

It seems related to this upstream discussion:

https://lists.gnupg.org/pipermail/gnupg-devel/2016-September/031660.html

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

end of thread, other threads:[~2017-01-09 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-08 21:09 fixing python-gpg package, need help Troy Sankey
2017-01-09 10:14 ` Efraim Flashner
2017-01-09 14:04   ` Troy Sankey
2017-01-09 14:32     ` Troy Sankey
2017-01-09 21:28 ` Leo Famulari

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.