Hans Wennborg via llvm-dev
2017-Mar-10 21:10 UTC
[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
Hi Khem, On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev <llvm-dev at lists.llvm.org> wrote:> On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> ARM and AArch64 looking good, uploaded. >> > > This is not particularly related to this RC but in general with 4.0.0 > I am seeing a failure quite common while building for arm > > | ./.libs/libsqlite3.so: undefined reference to `__mulodi4' > | clang-4.0: error: linker command failed with exit code 1 (use -v to > see invocation) > | make: *** [Makefile:509: sqlite3] Error 1 > > There are few bug reports in bugzilla also reporting similar issue > e.g. > > https://bugs.llvm.org//show_bug.cgi?id=14469Many of those bugs are pre-4.0.0. Did you see the same issues with earlier LLVM versions as well, or are you saying these errors are new with 4.0.0? Thanks, Hans
Khem Raj via llvm-dev
2017-Mar-10 22:07 UTC
[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
On 17-03-10 13:10:25, Hans Wennborg wrote:> Hi Khem, > > On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev > > <llvm-dev at lists.llvm.org> wrote: > >> ARM and AArch64 looking good, uploaded. > >> > > > > This is not particularly related to this RC but in general with 4.0.0 > > I am seeing a failure quite common while building for arm > > > > | ./.libs/libsqlite3.so: undefined reference to `__mulodi4' > > | clang-4.0: error: linker command failed with exit code 1 (use -v to > > see invocation) > > | make: *** [Makefile:509: sqlite3] Error 1 > > > > There are few bug reports in bugzilla also reporting similar issue > > e.g. > > > > https://bugs.llvm.org//show_bug.cgi?id=14469 > > Many of those bugs are pre-4.0.0. Did you see the same issues with > earlier LLVM versions as well, or are you saying these errors are new > with 4.0.0?I only see it with 4.0 branch, may be I was lucky thus far.> > Thanks, > Hans
Mehdi Amini via llvm-dev
2017-Mar-11 03:38 UTC
[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
Pushed macOS: b1a351290bffd190ff190638b6f4c013b5991d6a final/clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz — Mehdi> On Mar 10, 2017, at 2:07 PM, Khem Raj via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On 17-03-10 13:10:25, Hans Wennborg wrote: >> Hi Khem, >> >> On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >>> On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>>> ARM and AArch64 looking good, uploaded. >>>> >>> >>> This is not particularly related to this RC but in general with 4.0.0 >>> I am seeing a failure quite common while building for arm >>> >>> | ./.libs/libsqlite3.so: undefined reference to `__mulodi4' >>> | clang-4.0: error: linker command failed with exit code 1 (use -v to >>> see invocation) >>> | make: *** [Makefile:509: sqlite3] Error 1 >>> >>> There are few bug reports in bugzilla also reporting similar issue >>> e.g. >>> >>> https://bugs.llvm.org//show_bug.cgi?id=14469 >> >> Many of those bugs are pre-4.0.0. Did you see the same issues with >> earlier LLVM versions as well, or are you saying these errors are new >> with 4.0.0? > > I only see it with 4.0 branch, may be I was lucky thus far. > >> >> Thanks, >> Hans > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170310/0288f999/attachment-0001.html>
Khem Raj via llvm-dev
2017-Mar-14 05:09 UTC
[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
Hi Hans On 3/10/17 1:10 PM, Hans Wennborg wrote:> Hi Khem, > > On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >>> ARM and AArch64 looking good, uploaded. >>> >> >> This is not particularly related to this RC but in general with 4.0.0 >> I am seeing a failure quite common while building for arm >> >> | ./.libs/libsqlite3.so: undefined reference to `__mulodi4' >> | clang-4.0: error: linker command failed with exit code 1 (use -v to >> see invocation) >> | make: *** [Makefile:509: sqlite3] Error 1 >> >> There are few bug reports in bugzilla also reporting similar issue >> e.g. >> >> https://bugs.llvm.org//show_bug.cgi?id=14469 > > Many of those bugs are pre-4.0.0. Did you see the same issues with > earlier LLVM versions as well, or are you saying these errors are new > with 4.0.0? >I dug into a bit and here is a reproducer #include <stddef.h> size_t n; size_t s; ptrdiff_t z; main() { return __builtin_mul_overflow(n,s, &z); } compiling with clang --target=armv7l -mfloat-abi=hard hello.c -S This generates the call to __mulodi4 same code with gcc does not. I see that sqlite3 as well as m4 package pokes the compiler for these builtins before using them. For clang it uses __has_builtin() to determine if a given builtin is supported before using it. see http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/xalloc-oversized.h That is the source of trouble, since its in gnulib that explains why its showing up in lot of packages. perhaps this commit here http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/xalloc-oversized.h?id=9c919a06435266a88d91ffb9eb3f70a82aa65b4b brings this issue to fore.> Thanks, > Hans >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 204 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170313/e3ec81f2/attachment.sig>
Hans Wennborg via llvm-dev
2017-Mar-14 16:38 UTC
[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
On Mon, Mar 13, 2017 at 10:09 PM, Khem Raj <raj.khem at gmail.com> wrote:> Hi Hans > > On 3/10/17 1:10 PM, Hans Wennborg wrote: >> Hi Khem, >> >> On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >>> On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev >>> <llvm-dev at lists.llvm.org> wrote: >>>> ARM and AArch64 looking good, uploaded. >>>> >>> >>> This is not particularly related to this RC but in general with 4.0.0 >>> I am seeing a failure quite common while building for arm >>> >>> | ./.libs/libsqlite3.so: undefined reference to `__mulodi4' >>> | clang-4.0: error: linker command failed with exit code 1 (use -v to >>> see invocation) >>> | make: *** [Makefile:509: sqlite3] Error 1 >>> >>> There are few bug reports in bugzilla also reporting similar issue >>> e.g. >>> >>> https://bugs.llvm.org//show_bug.cgi?id=14469 >> >> Many of those bugs are pre-4.0.0. Did you see the same issues with >> earlier LLVM versions as well, or are you saying these errors are new >> with 4.0.0? >> > > I dug into a bit and here is a reproducer > > #include <stddef.h> > size_t n; > size_t s; > ptrdiff_t z; > main() > { > return __builtin_mul_overflow(n,s, &z); > } > > compiling with > clang --target=armv7l -mfloat-abi=hard hello.c -S > > This generates the call to __mulodi4 > > same code with gcc does not. > > I see that sqlite3 as well as m4 package pokes the compiler for these > builtins before using them. For clang it uses __has_builtin() to > determine if a given builtin is supported before using it. > > see > http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/xalloc-oversized.h > > That is the source of trouble, since its in gnulib that explains why its > showing up in lot of packages. > > perhaps this commit here > http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/xalloc-oversized.h?id=9c919a06435266a88d91ffb9eb3f70a82aa65b4b > > brings this issue to fore.I get a __mulodi4 call with your reproducer also with llvm 3.9 and 3.8, so I'm not sure this changed on our end. (I also added the __has_builtin check from the code you linked, with the same result.) In any case, it's no good generating calls to functions if they're not defined in the runtime. Can you file a bug about this in the Bugzilla and cc myself and Renato? Thanks, Hans
Apparently Analagous Threads
- [cfe-dev] [4.0.0 Release] 'final' has been tagged
- [cfe-dev] [4.0.0 Release] 'final' has been tagged
- [PATCH] Dont bypass compiler driver for Dependency generation options
- [PATCH] Dont bypass compiler driver for Dependency generation options
- [nbdkit PATCH] cc: Allow configuration without absolute paths