nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] problem compiling nmh 1.6 on linux gentoo

2015-11-29 11:26:35
Ken Hornstein <kenh(_at_)pobox(_dot_)com> writes:
Normally we don't expect anyone to run a 'make clean' after running
configure (I'm trying to figure out why you would want to do that).

Really?  I should think that would be a supported procedure.  FWIW,
I would not expect either "clean" or "distclean" to remove files that
were shipped in the tarball; only "make maintainer-clean", or some
such target not meant to be called by end users, ought to do that.

If you do a 'make clean' or otherwise remove sbr/dtimep.c, it is
generated by lex or flex (probably flex) that is shipped on _your_
system.  In your case, the resulting output was not able to be compiled
by the compiler that exists on your system.

As far as I can tell (and I've got quite a bit of data to back me up),
there are no C compilers anywhere anymore that don't accept //-style
comments by default.  gcc will reject them only if you specify -ansi
... which John did:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -I./sbr
-DNMHETCDIR='"/etc/nmh"' -DMAILSPOOL='"/var/mail"'
-DSENDMAILPATH='"/usr/sbin/sendmail"' -DNMHBINDIR='"/usr/bin"'
-DNMHLIBDIR='"/usr/lib64/nmh"' -D_GNU_SOURCE  -g -O2 -ansi -pedantic
                                                     ^^^^^^^^^^^^^^^
-Wno-unused-result -Wall -Wextra -MT sbr/sbr_libmh_a-dtimep.o -MD -MP -MF
sbr/.deps/sbr_libmh_a-dtimep.Tpo -c -o sbr/sbr_libmh_a-dtimep.o `test -f
'sbr/dtimep.c' || echo './'`sbr/dtimep.c

I would put the true blame on whatever decided to add -ansi -pedantic
(particularly the latter) to the compiler switches.  Those are useful
switches for software developers to use, if they are concerned about
hewing as closely as possible to ancient C standards ... but one should
never ever set things up to select them by default for builds in-the-wild.
That won't ever lead to anything but grief, as it did here, because you
can't expect that system tools or system header files are going to still
be trying to be C89-compliant, let alone satisfy -pedantic.

                        regards, tom lane

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>