unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: Re: configure checks for python3-notmuch2 module
Date: Sun, 25 Jul 2021 15:00:25 +0300	[thread overview]
Message-ID: <m2czr6a9ie.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <162607404067.6675.14807523852321430834.git@grubix.eu>

On Mon, Jul 12 2021, Michael J. Gruber wrote:

> David Bremner venit, vidit, dixit 2021-07-11 23:29:57:
>> 
>> It turns out we need pyconfig.h to build the (new) python bindings.  I
>> don't think this is adequately checked for by the configure script,
>> since I had a Fedora user report a build failure (during make install,
>> which I found odd) missing pyconfig.h
>> 
>> On Debian this is on libpython3.x-dev, which is not a dependency of the
>> python3-cffi package.
>
> You need python3-cffi to run python code which uses cffi bindings -
> think of it as the "lib" part. You need the devel package to generate a
> python module using cffi (i.e. binding for a specific c library).
>
> So, it makes sense for the lib package not to depend on the devel
> package (which is python3-devel on Fedora).
>
> I can't help with adapting configure to the header requirement, though.

In case of python3-devel missing in Fedora, the compilation should not pass
as far as shown in David's email (and in log below) as it is needed for 

Checking for python3 cffi and setuptools... 

configure part to complete with 'Yes'

But the message could be better. Perhaps

Checking for python3 dev(el), cffi and setuptools...

(although this may not be clear enough for debian users as the package
there is libpython3-dev, cannot say...)

For me, to figure out what was needed in Fedora 34 (ok, 33, but now tested
in upgraded fedora 34 host in running fedora:34 podman container) was to run
script -c 'sh -x ./configure'; less typescript; and then do internet search
how to install missing 'Python.h' include file...

Tomi

>
> Michael
>
>> log follows.
>> ----------------------------------------------------------------------
>> 
>> cd bindings/python-cffi && \
>>         python3 setup.py build --build-lib build/stage && \
>>         mkdir -p build/stage/tests && cp tests/*.py build/stage/tests
>> running build
>> running build_py
>> running build_ext
>> generating cffi module 'build/temp.linux-x86_64-3.9/notmuch2._capi.c'
>> creating build/temp.linux-x86_64-3.9
>> building 'notmuch2._capi' extension
>> creating build/temp.linux-x86_64-3.9/build
>> creating build/temp.linux-x86_64-3.9/build/temp.linux-x86_64-3.9
>> gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I../../lib -I/usr/include/python3.9 -c build/temp.linux-x86_64-3.9/notmuch2._capi.c -o 
 b
>  ui
>>  ld/temp.linux-x86_64-3.9/build/temp.linux-x86_64-3.9/notmuch2._capi.o
>> build/temp.linux-x86_64-3.9/notmuch2._capi.c:50:14: fatal error: pyconfig.h: No such file or directory
>>    50 | #    include <pyconfig.h>
>>       |              ^~~~~~~~~~~~
>> compilation terminated.
>> error: command '/usr/bin/gcc' failed with exit code 1

  reply	other threads:[~2021-07-25 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 21:29 configure checks for python3-notmuch2 module David Bremner
2021-07-12  7:14 ` Michael J Gruber
2021-07-25 12:00   ` Tomi Ollila [this message]
2021-07-15 11:14 ` Tomi Ollila
2021-10-06 11:42   ` David Bremner
2021-10-06 12:45     ` Tomi Ollila
2021-10-06 18:58       ` Tomi Ollila
2021-10-07 12:09 ` [PATCH] configure: check explicitely for python dev (include) files David Bremner
2021-10-08 19:22   ` Tomi Ollila
2021-10-09 20:15     ` David Bremner

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=m2czr6a9ie.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).