Discussion:
dfa.c bug on Solaris C compilers
(too old to reply)
Paul Eggert
2017-01-06 20:53:51 UTC
Permalink
Raw Message
Compilation with native Sun compilers, both on GNU/Linux, and on the
CC lib/dfa.o
"lib/dfa.c", line 1592: warning: statement not reached
"lib/dfa.c", line 2099: void function cannot return value
cc: acomp failed for lib/dfa.c
Thanks, fixed in Gnulib with the attached.
Paul Eggert
2017-01-06 21:42:09 UTC
Permalink
Raw Message
I want to report a clang
issue that showed up on surprisingly many platforms, and with multiple
versions of clang, but not with all clangs on all platforms: linking
lib/xmalloc.c:(.text+0x71): undefined reference to `__muloti4'
Thanks, this turns out to be LLVM bug 16404, an unfixed bug I wish I'd
known. I installed the attached patches to Gnulib to stop using
integer-overflow builtins on Clang, which should work around the LLVM
bug. In the meantime, on Fedora you can work around the sed problem by
installing the Clang-related compiler-rt package and by building with
LDFLAGS=-rtlib=compiler-rt, admittedly quite an annoyance. (I don't know
why Clang sometimes needs special library support to check for size_t
overflow.)
Paul Eggert
2017-01-06 22:15:32 UTC
Permalink
Raw Message
test-localename.c:(.text+0x6a): undefined reference to `uselocale'
Thanks, I installed the attached Gnulib patch, which should work around
that problem.
Nelson H. F. Beebe
2017-01-07 00:01:10 UTC
Permalink
Raw Message
Paul Eggert writes today about the missing __muloti4() in clang builds
Post by Paul Eggert
Thanks, this turns out to be LLVM bug 16404, an unfixed bug I wish I'd
known. I installed the attached patches to Gnulib to stop using
integer-overflow builtins on Clang, which should work around the LLVM
bug. In the meantime, on Fedora you can work around the sed problem by
installing the Clang-related compiler-rt package and by building with
LDFLAGS=-rtlib=compiler-rt, ....
I looked at the description of that bug at

https://llvm.org/bugs/show_bug.cgi?id=16404

and find that I share the annoyance of many of the posters in a
compiler's being unable to find its own libraries.

Nevertheless, I just started a series of 106 builds of sed-4.3.p2
(containing the patches

0001-dfa-fix-return-typo.patch
0001-localename-tests-port-to-NetBSD-7.patch

) using clang, launched like this:

build-all -u clang-all --env LDFLAGS=--rtlib=compiler-rt sed-4.3.p2

Several are still in progress, but of the ones that have completed, it
seems that the LDFLAGS value does the trick of getting a successful
build.

Because I expect to be using clang for builds of many other packages,
I'm adding that LDFLAGS settings to the configuration files for
build-all for all those on which it solves the problem.

Although sed's configure script could check for clang and the 128-bit
multiply that triggers the missing function problem, it would seem
better to have autoconf handle that, in view of the reticence of the
clang developers to repair their clear error. However, getting a new
autoconf pushed to developer sites is a huge task, so I'm just going
to supply the fix locally for my build-all procedures.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: ***@math.utah.edu -
- 155 S 1400 E RM 233 ***@acm.org ***@computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Nelson H. F. Beebe
2017-01-07 01:48:41 UTC
Permalink
Raw Message
I've now completed builds of sed-4.3.p2 with

CC=clang LDFLAGS=--rtlib=compiler-rt

I have 68 builds where that did the trick, and another 12 where the
failure rate was low enough to allow sed to be installed (though I did
not do those installs).

However, I also have 23 builds where the above recipe did not succeed,
either because the compiler did not recognize the option, or it could
not find the library that it refers to, and that library is indeed
missing from the vendor packaging system.

What a mess! I'm inclined now to leave my build-all configuration
files for clang unchanged, and simply declared that despite all of the
effort that has gone into clang, it still is not a mature compiler,
sigh....

-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: ***@math.utah.edu -
- 155 S 1400 E RM 233 ***@acm.org ***@computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Loading...