Re: make fails
On Mon, Sep 09, 2019 at 06:12:49PM -0700, Kevin J. McCarthy wrote: > On Wed, Sep 04, 2019 at 10:26:31AM -0500, Derek Martin wrote: > > I'll try to look at this no later than this weekend... > > Derek, I've merged Gero's patch into the stable branch in git. It should > compile with inotify support for you now. If you have the chance, please > try compiling the stable git branch instead. > > Thank you! Thanks Kevin, I never did get the chance to look into this, but I will hopefully have time tonight. -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
Re: make fails
On Wed, Sep 04, 2019 at 10:26:31AM -0500, Derek Martin wrote: I'll try to look at this no later than this weekend... Derek, I've merged Gero's patch into the stable branch in git. It should compile with inotify support for you now. If you have the chance, please try compiling the stable git branch instead. Thank you! -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: make fails
I'll try to look at this no later than this weekend... Thanks! On Sun, Sep 01, 2019 at 06:19:17PM +0200, Gero Treuner wrote: > Hi Derek, > > On Wed, Aug 28, 2019 at 02:16:10PM -0700, Kevin J. McCarthy wrote: > > On Mon, Aug 26, 2019 at 02:12:56PM -0500, Derek Martin wrote: > > > /home/ddm/tmp/mutt-1.12.1/buffy.c:276: undefined reference to > > > `mutt_monitor_remove' > > > /home/ddm/tmp/mutt-1.12.1/buffy.c:310: undefined reference to > > > `mutt_monitor_remove' > > > /home/ddm/tmp/mutt-1.12.1/buffy.c:326: undefined reference to > > > `mutt_monitor_add' > > > > I think I know what the problem is: it's an improper usage of > > AC_CHECK_FUNCS. I'm guessing your system has one or more of > > "inotify_init1() inotify_add_watch() inotify_rm_watch()" but not all of > > them. > > Probably only inotify_init1() is missing, which can easily be replaced. > > If it's this - verifyable by config.status - then the attached patch > helps not only to compile, but makes inotify running for Mutt on your > system. I tested it by simulating this scenario in the build, leading > to a binary using the alternate function. > > > I'll push a patch to stable, but for now just keep the > > '--disable-filemontor'. The fix will just end up disabling it on your > > system. > > I created a merge request in GitLab. > > If Derek can confirm that we are guessing right (I noticed that this > might not be soon) this can be committed. > > > Gero > diff -ur mutt-1.12.1.orig/config.h.in mutt-1.12.1/config.h.in > --- mutt-1.12.1.orig/config.h.in 2019-06-15 18:07:25.0 +0200 > +++ mutt-1.12.1/config.h.in 2019-09-01 17:38:05.794709214 +0200 > @@ -223,6 +223,9 @@ > /* Define to 1 if you have the `inotify_add_watch' function. */ > #undef HAVE_INOTIFY_ADD_WATCH > > +/* Define to 1 if you have the `inotify_init' function. */ > +#undef HAVE_INOTIFY_INIT > + > /* Define to 1 if you have the `inotify_init1' function. */ > #undef HAVE_INOTIFY_INIT1 > > diff -ur mutt-1.12.1.orig/configure mutt-1.12.1/configure > --- mutt-1.12.1.orig/configure2019-06-15 18:04:19.0 +0200 > +++ mutt-1.12.1/configure 2019-09-01 17:38:05.670708221 +0200 > @@ -619,6 +619,7 @@ > # include > #endif" > > +ac_func_list= > ac_header_list= > ac_subst_vars='am__EXEEXT_FALSE > am__EXEEXT_TRUE > @@ -2610,6 +2611,7 @@ >>$cache_file > fi > > +as_fn_append ac_func_list " inotify_init1" > as_fn_append ac_header_list " stdlib.h" > as_fn_append ac_header_list " unistd.h" > as_fn_append ac_header_list " sys/param.h" > @@ -11065,7 +11067,7 @@ > > > if test x$have_filemonitor != xno ; then > -for ac_func in inotify_init1 inotify_add_watch inotify_rm_watch > +for ac_func in inotify_init inotify_add_watch inotify_rm_watch > do : >as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` > ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" > @@ -11074,18 +11076,33 @@ > #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 > _ACEOF > > +else > + have_filemonitor=no > +fi > +done > + > +if test x$have_filemonitor != xno ; then > > $as_echo "#define USE_INOTIFY 1" >>confdefs.h > > > -else > > -have_filemonitor=no > + > + for ac_func in $ac_func_list > +do : > + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` > +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" > +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : > + cat >>confdefs.h <<_ACEOF > +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 > +_ACEOF > > fi > done > > -if test x$have_filemonitor != xno ; then > + > + > + > for ac_header in sys/inotify.h > do : >ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" > "ac_cv_header_sys_inotify_h" "$ac_includes_default" > diff -ur mutt-1.12.1.orig/configure.ac mutt-1.12.1/configure.ac > --- mutt-1.12.1.orig/configure.ac 2019-06-15 17:57:01.0 +0200 > +++ mutt-1.12.1/configure.ac 2019-09-01 17:27:18.933520732 +0200 > @@ -854,14 +854,11 @@ > ]) > > if test x$have_filemonitor != xno ; then > -AC_CHECK_FUNCS(inotify_init1 inotify_add_watch inotify_rm_watch, > -[ > -AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for > filesystem monitoring (available in Linux only). ]) > -], > -[ > -have_filemonitor=no > -]) > +AC_CHECK_FUNCS(inotify_init inotify_add_watch inotify_rm_watch, > + [], [have_filemonitor=no]) > if test x$have_filemonitor != xno ; then > +AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for > filesystem monitoring (available in Linux only). ]) > +AC_CHECK_FUNCS_ONCE(inotify_init1) > AC_CHECK_HEADERS(sys/inotify.h) > MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o" > fi > diff -ur mutt-1.12.1.orig/monitor.c mutt-1.12.1/monitor.c > --- mutt-1.12.1.orig/monitor.c2019-05-25 18:22:39.0
Re: make fails
On Sun, Sep 01, 2019 at 06:19:17PM +0200, Gero Treuner wrote: Probably only inotify_init1() is missing, which can easily be replaced. If it's this - verifyable by config.status - then the attached patch helps not only to compile, but makes inotify running for Mutt on your system. I tested it by simulating this scenario in the build, leading to a binary using the alternate function. Thanks Gero. I already fixed the compile error in commit 4c2f7c70, but it will be good to have the functionality available on older systems too. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: make fails
Hi Derek, On Wed, Aug 28, 2019 at 02:16:10PM -0700, Kevin J. McCarthy wrote: > On Mon, Aug 26, 2019 at 02:12:56PM -0500, Derek Martin wrote: > > /home/ddm/tmp/mutt-1.12.1/buffy.c:276: undefined reference to > > `mutt_monitor_remove' > > /home/ddm/tmp/mutt-1.12.1/buffy.c:310: undefined reference to > > `mutt_monitor_remove' > > /home/ddm/tmp/mutt-1.12.1/buffy.c:326: undefined reference to > > `mutt_monitor_add' > > I think I know what the problem is: it's an improper usage of > AC_CHECK_FUNCS. I'm guessing your system has one or more of > "inotify_init1() inotify_add_watch() inotify_rm_watch()" but not all of > them. Probably only inotify_init1() is missing, which can easily be replaced. If it's this - verifyable by config.status - then the attached patch helps not only to compile, but makes inotify running for Mutt on your system. I tested it by simulating this scenario in the build, leading to a binary using the alternate function. > I'll push a patch to stable, but for now just keep the > '--disable-filemontor'. The fix will just end up disabling it on your > system. I created a merge request in GitLab. If Derek can confirm that we are guessing right (I noticed that this might not be soon) this can be committed. Gero diff -ur mutt-1.12.1.orig/config.h.in mutt-1.12.1/config.h.in --- mutt-1.12.1.orig/config.h.in 2019-06-15 18:07:25.0 +0200 +++ mutt-1.12.1/config.h.in 2019-09-01 17:38:05.794709214 +0200 @@ -223,6 +223,9 @@ /* Define to 1 if you have the `inotify_add_watch' function. */ #undef HAVE_INOTIFY_ADD_WATCH +/* Define to 1 if you have the `inotify_init' function. */ +#undef HAVE_INOTIFY_INIT + /* Define to 1 if you have the `inotify_init1' function. */ #undef HAVE_INOTIFY_INIT1 diff -ur mutt-1.12.1.orig/configure mutt-1.12.1/configure --- mutt-1.12.1.orig/configure 2019-06-15 18:04:19.0 +0200 +++ mutt-1.12.1/configure 2019-09-01 17:38:05.670708221 +0200 @@ -619,6 +619,7 @@ # include #endif" +ac_func_list= ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE @@ -2610,6 +2611,7 @@ >$cache_file fi +as_fn_append ac_func_list " inotify_init1" as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" @@ -11065,7 +11067,7 @@ if test x$have_filemonitor != xno ; then -for ac_func in inotify_init1 inotify_add_watch inotify_rm_watch +for ac_func in inotify_init inotify_add_watch inotify_rm_watch do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -11074,18 +11076,33 @@ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +else + have_filemonitor=no +fi +done + +if test x$have_filemonitor != xno ; then $as_echo "#define USE_INOTIFY 1" >>confdefs.h -else -have_filemonitor=no + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi done -if test x$have_filemonitor != xno ; then + + + for ac_header in sys/inotify.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" diff -ur mutt-1.12.1.orig/configure.ac mutt-1.12.1/configure.ac --- mutt-1.12.1.orig/configure.ac 2019-06-15 17:57:01.0 +0200 +++ mutt-1.12.1/configure.ac 2019-09-01 17:27:18.933520732 +0200 @@ -854,14 +854,11 @@ ]) if test x$have_filemonitor != xno ; then -AC_CHECK_FUNCS(inotify_init1 inotify_add_watch inotify_rm_watch, -[ -AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ]) -], -[ -have_filemonitor=no -]) +AC_CHECK_FUNCS(inotify_init inotify_add_watch inotify_rm_watch, + [], [have_filemonitor=no]) if test x$have_filemonitor != xno ; then +AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ]) +AC_CHECK_FUNCS_ONCE(inotify_init1) AC_CHECK_HEADERS(sys/inotify.h) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o" fi diff -ur mutt-1.12.1.orig/monitor.c mutt-1.12.1/monitor.c --- mutt-1.12.1.orig/monitor.c 2019-05-25 18:22:39.0 +0200 +++ mutt-1.12.1/monitor.c 2019-09-01 17:26:55.173329944 +0200 @@ -25,6 +25,9 @@ # include # include #endif +#ifndef HAVE_INOTIFY_INIT1 +# include +#endif #include "mutt.h" #include "buffy.h" @@ -106,12 +109,23 @@ { if (INotifyFd == -1) { +#if HAVE_INOTIFY_INIT1 INotifyFd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); if (INotifyFd == -1) { dprint (2, (debugfile, "monitor: inotify_init1 failed,
Re: make fails
On Wed, Aug 28, 2019 at 02:19:39PM -0700, Kevin J. McCarthy wrote: > On Mon, Aug 26, 2019 at 02:29:22PM -0500, Derek Martin wrote: > > However, just now, trying to pgp-sign this message, I got: > > > > gpg: can't query passphrase in batch mode > > gpg: skipped "0xDFBEAD02": bad passphrase > > gpg: signing failed: bad passphrase > > Try adding 'unset pgp_use_gpg_agent' to your muttrc. Starting in 1.12, I > defaulted that on because of the increasing prevalence of gpg 2.1 (which > uses an agent by default). > > Also, make sure to use the latest contrib/gpg.rc settings. Some of them are > now necessary for proper decryption and signing verification. > Thanks Kevin--I still haven't had any spare cycles to look at this, but when I do this will be the first thing I look at. =8^) -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
Re: make fails
On Mon, Aug 26, 2019 at 02:29:22PM -0500, Derek Martin wrote: However, just now, trying to pgp-sign this message, I got: gpg: can't query passphrase in batch mode gpg: skipped "0xDFBEAD02": bad passphrase gpg: signing failed: bad passphrase Try adding 'unset pgp_use_gpg_agent' to your muttrc. Starting in 1.12, I defaulted that on because of the increasing prevalence of gpg 2.1 (which uses an agent by default). Also, make sure to use the latest contrib/gpg.rc settings. Some of them are now necessary for proper decryption and signing verification. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: make fails
On Mon, Aug 26, 2019 at 02:12:56PM -0500, Derek Martin wrote: /home/ddm/tmp/mutt-1.12.1/buffy.c:276: undefined reference to `mutt_monitor_remove' /home/ddm/tmp/mutt-1.12.1/buffy.c:310: undefined reference to `mutt_monitor_remove' /home/ddm/tmp/mutt-1.12.1/buffy.c:326: undefined reference to `mutt_monitor_add' I think I know what the problem is: it's an improper usage of AC_CHECK_FUNCS. I'm guessing your system has one or more of "inotify_init1() inotify_add_watch() inotify_rm_watch()" but not all of them. I'll push a patch to stable, but for now just keep the '--disable-filemontor'. The fix will just end up disabling it on your system. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: make fails
On Mon, Aug 26, 2019, at 3:13 PM, Derek Martin wrote: > Folks, > > I downloaded mutt-1.12.1 today, and tried to compile it. I ran > configure thusly: Derek I will be back from my trip tomorrow and take a look at this. Probably the calls are not ifdef'ed out. -Kevin
Re: make fails
Hi Derek, On Mon, Aug 26, 2019 at 02:29:22PM -0500, Derek Martin wrote: > On Mon, Aug 26, 2019 at 02:12:56PM -0500, Derek Martin wrote: > > I may also just configure with --disable-filemonitor and try again, > > but I suspect I want whatever awesomeness that brings (I vaguely > > remember a discussion about this but sadly not the details). I can't reproduce it here even with option -std=gnu99. System is Debian 10.0 buster. Somehow monitor.o must be missing as object file from MUTT_LIB_OBJECTS in the Makefile. Disabling it certainly circumvents the issue, but preferably things work as expected... Could you please post the lines from config.log starting with configure:11038: checking for inotify_init1 Gero
Re: make fails
On Mon, Aug 26, 2019 at 02:12:56PM -0500, Derek Martin wrote: > I may also just configure with --disable-filemonitor and try again, > but I suspect I want whatever awesomeness that brings (I vaguely > remember a discussion about this but sadly not the details). FWIW this worked. However, just now, trying to pgp-sign this message, I got: gpg: can't query passphrase in batch mode gpg: skipped "0xDFBEAD02": bad passphrase gpg: signing failed: bad passphrase Press any key to continue... But I'm not in batch mode. :-( I had to remove PGP options in order to send this. :-( -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.