unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Sankey <sankeytms@gmail.com>
To: guix-devel@gnu.org
Subject: fixing python-gpg package, need help
Date: Sun, 08 Jan 2017 16:09:17 -0500	[thread overview]
Message-ID: <148390975770.27447.2744857101049384652@what> (raw)

[-- 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

             reply	other threads:[~2017-01-08 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-08 21:09 Troy Sankey [this message]
2017-01-09 10:14 ` fixing python-gpg package, need help Efraim Flashner
2017-01-09 14:04   ` Troy Sankey
2017-01-09 14:32     ` Troy Sankey
2017-01-09 21:28 ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=148390975770.27447.2744857101049384652@what \
    --to=sankeytms@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).