Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Paul Eggert

On 3/24/20 9:07 PM, YAMAMOTO Mitsuharu wrote:


Yes, this works for both -arch i386 and -flto cases.


Thanks for checking. I installed the patch into Gnulib and propagated the fix 
into Emacs master, and am marking this Emacs bug as done.




Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Paul Eggert

On 3/25/20 1:26 PM, Jeffrey Walton wrote:

I'm happy to help. This is the kind of monkey work a senior engineer
should offload.

What do you want, and what do you need?


Ideally, someone would take on the project of doing CI for Gnulib and/or some of 
its downstream projects, to maintain the corresponding .yml (or whatever) files 
that would be maintained as part of Gnulib etc., and to make sure that this is 
all done with free software. This should require minimal work by the current 
volunteers and should be easily partitionable.




Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Jeffrey Walton
On Wed, Mar 25, 2020 at 3:10 PM Paul Eggert  wrote:
>
> On 3/25/20 3:14 AM, Jeffrey Walton wrote:
> > Is there any reasons services like Travis or Cirrus are not being used
> > to proactively detect problems on Linux, OS X and FreeBSD?
>
> Not enough resources, I assume. I'm a volunteer and lack time to mess with 
> macOS
> and FreeBSD, much less all the GNU/Linux versions out there (plus all the
> programs that use Gnulib...).

CI is a force multiplier. Setting up CI tests now will save you
exponentially in the future. It is one of the best investments you can
make with your time.

Here's some additional projects that make heavy use of CI to detect
problems before users experience them. Crypto++, LDNS and Unbound even
perform Android and iOS cross-compiles to ensure they work for users,
too.

* https://github.com/randombit/botan
* https://github.com/weidai11/cryptopp
* https://github.com/NLnetLabs/unbound
* https://github.com/NLnetLabs/ldns
* https://github.com/NLnetLabs/nsd

I'm happy to help. This is the kind of monkey work a senior engineer
should offload.

What do you want, and what do you need?

Jeff



Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Paul Eggert

On 3/25/20 3:14 AM, Jeffrey Walton wrote:

Is there any reasons services like Travis or Cirrus are not being used
to proactively detect problems on Linux, OS X and FreeBSD?


Not enough resources, I assume. I'm a volunteer and lack time to mess with macOS 
and FreeBSD, much less all the GNU/Linux versions out there (plus all the 
programs that use Gnulib...).




Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread YAMAMOTO Mitsuharu
On Wed, 25 Mar 2020 11:58:19 +0900,
Paul Eggert wrote:
> 
> Thanks for the bug report. Does the attached patch to
> getopt-pfx-core.h fix the bug for you?

Yes, this works for both -arch i386 and -flto cases.  Thanks.

 YAMAMOTO Mitsuharu
mituh...@math.s.chiba-u.ac.jp



Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Zack Weinberg
On Tue, Mar 24, 2020 at 10:58 PM Paul Eggert  wrote:
>
> Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix 
> the
> bug for you?
>
> I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For 
> those
> new to this thread, please see .

Patch seems plausible enough to me.  I didn't think very hard about
the ways a system declaration of getopt could interfere when I wrote
this file.

zw



Re: 32bit or LTO movemail build fails on macOS

2020-03-25 Thread Jeffrey Walton
On Tue, Mar 24, 2020 at 10:58 PM Paul Eggert  wrote:
>
> Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix 
> the
> bug for you?
>
> I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For 
> those
> new to this thread, please see .

CI tests should be catching these mistakes. (And problems like
_NoReturn on OS X).

Is there any reasons services like Travis or Cirrus are not being used
to proactively detect problems on Linux, OS X and FreeBSD?

Daniel Stenberg has one of the best engineering processes in place
(that I have observed in the wild). You can find the curl testing
configurations in curl's GitHub at https://github.com/curl/curl. The
files of interest include .cirrus.yml, .travis.yml, and .lgtm.yml.

Jeff



Re: 32bit or LTO movemail build fails on macOS

2020-03-24 Thread Paul Eggert
Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix the 
bug for you?


I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For those 
new to this thread, please see .
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
index 31a747d67..a4891bc80 100644
--- a/lib/getopt-pfx-core.h
+++ b/lib/getopt-pfx-core.h
@@ -48,6 +48,14 @@
 # define optind __GETOPT_ID (optind)
 # define optopt __GETOPT_ID (optopt)
 
+/* Work around a a problem on macOS, which declares getopt with a
+   trailing __DARWIN_ALIAS(getopt) that would expand to something like
+   __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following
+   hack to suppress the macOS declaration .  */
+# ifdef __APPLE__
+#  define _GETOPT
+# endif
+
 /* The system's getopt.h may have already included getopt-core.h to
declare the unprefixed identifiers.  Undef _GETOPT_CORE_H so that
getopt-core.h declares them with prefixes.  */