Re: Cannot compile m4 1.4.18 with clang 4.0

Bruno Haible <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.gnu.m4.bugs
Message-ID <3459719.y13oOkFUlj@omega>
> Thompson, KT wrote:
> > As reported at https://github.com/LLNL/spack/issues/4883, there appears to be a problem compiling m4 (version 1.4.18) on Linux with LLVM clang 4.0.  The error is:
> > 
> > ...
> >   CC       m4.o
> >   CC       builtin.o
> >   CC       debug.o
> >   CC       eval.o
> >   CC       format.o
> >   CC       freeze.o
> >   CC       macro.o
> >   CC       input.o
> >   CC       output.o
> >   CC       path.o
> >   CC       symtab.o
> >   CCLD     m4
> > ../lib/libm4.a(xmalloc.o): In function `xnmalloc':
> > .../m4-1.4.18/lib/xmalloc.c:(.text+0x71): undefined reference to `__muloti4'
> 
> That appears to be a bug in clang.
> 
> > 
> > Is there a known work around or patch to resolve this issue?  This same version of m4 appears to compile w/o issue for several versions of gcc.
> 
> I don't know if the bug has already been fixed in gnulib (the provider
> for xmalloc.c) ...
>  In the meantime, I'm adding gnulib in cc to see if this is a known issue.

Yes, this is a known issue [1].

No, I don't think this is in the scope of gnulib to fix. Rather, it's the
person who installs and uses clang who needs to be careful. See comment 12
of [1].

Bruno

[1] https://bugs.llvm.org/show_bug.cgi?id=16404
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.