Alex Denisov via llvm-dev
2018-May-30 21:39 UTC
[llvm-dev] Miscompilation while switching from clang-4 to clang-5
Hello everyone, I observe a weird behavior switching from clang-4 to clang-5 (and any higher version). I compile an executable that depends on LLVM. Everything works fine with clang-4, but when I run the executable compiled with clang-5 I see the following error: : CommandLine Error: Option 'rewrite-map-file' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options I want to debug the problem, but don't even know where to start. I am happy to provide more info if anyone wants to participate. I would appreciate any hints. Thank you. Alex. -- AlexDenisov Software Engineer, https://lowlevelbits.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: Message signed with OpenPGP URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180530/fcbbd73d/attachment.sig>
Michael Kruse via llvm-dev
2018-May-30 21:58 UTC
[llvm-dev] Miscompilation while switching from clang-4 to clang-5
An LLVM library (in this case: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Utils/SymbolRewriter.cpp#L91 from LLVMTransformUtils) is linked into the address space more than once. For instance, a statically linked and a dynamically linked version. Michael 2018-05-30 16:39 GMT-05:00 Alex Denisov via llvm-dev <llvm-dev at lists.llvm.org>:> Hello everyone, > > I observe a weird behavior switching from clang-4 to clang-5 (and any higher version). > I compile an executable that depends on LLVM. Everything works fine with clang-4, but when I run the executable compiled with clang-5 I see the following error: > : CommandLine Error: Option 'rewrite-map-file' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options > > I want to debug the problem, but don't even know where to start. > I am happy to provide more info if anyone wants to participate. > > I would appreciate any hints. > > Thank you. > Alex. > -- > AlexDenisov > Software Engineer, https://lowlevelbits.org > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Tom Stellard via llvm-dev
2018-May-30 21:59 UTC
[llvm-dev] Miscompilation while switching from clang-4 to clang-5
On 05/30/2018 02:39 PM, Alex Denisov via llvm-dev wrote:> Hello everyone, > > I observe a weird behavior switching from clang-4 to clang-5 (and any higher version). > I compile an executable that depends on LLVM. Everything works fine with clang-4, but when I run the executable compiled with clang-5 I see the following error: > : CommandLine Error: Option 'rewrite-map-file' registered more than once! > LLVM ERROR: inconsistency in registered CommandLine options >This usually indicates an issue with how you link your application. Two causes of this would be your application is linked against 2 different versions of LLVM or your are linking against the llvm static libraries and also libLLVM.so. -Tom> I want to debug the problem, but don't even know where to start. > I am happy to provide more info if anyone wants to participate. > > I would appreciate any hints. > > Thank you. > Alex. > -- > AlexDenisov > Software Engineer, https://lowlevelbits.org > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Alex Denisov via llvm-dev
2018-May-31 07:41 UTC
[llvm-dev] Miscompilation while switching from clang-4 to clang-5
Hi Tom, hi Michael, Thank you for your help. I understand the linking problem. What I do not understand is how to debug the difference between two versions of compilers. This what I do (briefly): clang++-4 foobar.cpp -lLLVM -l/opt/llvm-3.9/lib clang++-5 foobar.cpp -lLLVM -l/opt/llvm-3.9/lib The first command produces a working executable, while the other one does not. I'm trying to understand whether I had this problem all the time but clang-4 could not see it, or there is no problem but clang-5 does something wrong.> On 30. May 2018, at 23:59, Tom Stellard <tstellar at redhat.com> wrote: > > On 05/30/2018 02:39 PM, Alex Denisov via llvm-dev wrote: >> Hello everyone, >> >> I observe a weird behavior switching from clang-4 to clang-5 (and any higher version). >> I compile an executable that depends on LLVM. Everything works fine with clang-4, but when I run the executable compiled with clang-5 I see the following error: >> : CommandLine Error: Option 'rewrite-map-file' registered more than once! >> LLVM ERROR: inconsistency in registered CommandLine options >> > > This usually indicates an issue with how you link your application. > Two causes of this would be your application is linked against 2 different > versions of LLVM or your are linking against the llvm static libraries and > also libLLVM.so. > > -Tom > >> I want to debug the problem, but don't even know where to start. >> I am happy to provide more info if anyone wants to participate. >> >> I would appreciate any hints. >> >> Thank you. >> Alex. >> -- >> AlexDenisov >> Software Engineer, https://lowlevelbits.org >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: Message signed with OpenPGP URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180531/1671cd6d/attachment-0001.sig>
Maybe Matching Threads
- Miscompilation while switching from clang-4 to clang-5
- Miscompilation while switching from clang-4 to clang-5
- Miscompilation while switching from clang-4 to clang-5
- Miscompilation while switching from clang-4 to clang-5
- Miscompilation while switching from clang-4 to clang-5