Discussion:
Cannot compile m4 1.4.18 with clang 4.0
(too old to reply)
Eric Blake
2017-07-25 20:43:02 UTC
Permalink
Raw Message
...
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
.../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) - if so, then m4 will be fixed the next time we update to
newer gnulib and release an updated m4 (which may be sooner rather than
later, given that clang is a popular compiler, in spite of the fact that
although it is open source, it does not protect your freedoms like gcc).
In the meantime, I'm adding gnulib in cc to see if this is a known issue.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Bruno Haible
2017-07-25 22:21:44 UTC
Permalink
Raw Message
Post by Eric Blake
...
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
.../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
Thompson, KT
2017-07-26 01:06:41 UTC
Permalink
Raw Message
Thank you for the quick feedback. I have copied your comments and links to the spack issue tracker (https://github.com/LLNL/spack/issues/4883). I think we should be able to provide a work around similar to what you suggested.

-kt

-----Original Message-----
From: Bruno Haible [mailto:***@clisp.org]
Sent: Tuesday, July 25, 2017 4:22 PM
To: bug-***@gnu.org
Cc: Eric Blake <***@redhat.com>; Thompson, KT <***@lanl.gov>; bug-***@gnu.org
Subject: Re: Cannot compile m4 1.4.18 with clang 4.0
Post by Eric Blake
...
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
.../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

Loading...