Stella Stamenova via llvm-dev
2018-Nov-14 22:41 UTC
[llvm-dev] Building LLVM with VisualStudio 2017
Hey Bjorn, Were you able to figure this out or is it still broken for you? Our scenario is a little bit different, but I have a theory as to what may be going wrong. What linker are you using when you compile your project with clang-cl? I am wondering whether the version of the linker and/or the libraries that you are using is too old in comparison to the one used for the clang compilation. Thanks, -Stella -----Original Message----- From: Gaier, Bjoern <Bjoern.Gaier at horiba.com> Sent: Sunday, October 28, 2018 11:48 PM To: Stella Stamenova <stilis at microsoft.com>; Dennis Luehring <dl.soluz at gmx.net> Cc: llvm-dev <llvm-dev at lists.llvm.org> Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 Hey Stella, (Gaier is my last name :0) I do the same steps as you do! The resulting Clang compiler is indeed working. I have problems with the LLVM library. When I build the LLVM7 I use the libraries of it in a different project - a JIT client. When I compile this solution with Visual Studio 2017 and the MSVC compiler, then I get no problems. But, when I switch to the Clang-cl compiler in Visual Studio 2017, then I get suddenly these undefined references. The strange thing is, that this also happens when I compile the LLVM with a preinstalled Clang. Kind greetings Björn -----Original Message----- From: Stella Stamenova <stilis at microsoft.com> Sent: Freitag, 26. Oktober 2018 21:02 To: Gaier, Bjoern <Bjoern.Gaier at horiba.com>; Dennis Luehring <dl.soluz at gmx.net> Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 Hey Gaier, Can you give a few more details on your scenario? We use build LLVM with VS 2017 and we can successfully compile programs with clang afterwards. At a high level, what we do is: 1) Call Cmake to generate VS2017 Solution 2) Build the solution 3) Now use clang to compile other programs Thanks, -Stella -----Original Message----- From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Gaier, Bjoern via llvm-dev Sent: Friday, October 26, 2018 2:52 AM To: Dennis Luehring <dl.soluz at gmx.net> Cc: llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 But building the LLVM and Clang is no problem at all. The problem occurs when I use the generated LLVM lib files in a project, which I compile with Clang. -----Original Message----- From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Dennis Luehring via llvm-dev Sent: Freitag, 26. Oktober 2018 11:41 To: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 something i expirenced when i added the IRParser lib to the Fibonacci example (using cmakelists.txt) - in a clean first build after the change i was unable to build the project (with masses of errors) rebuilding on the console with cmake build "repaired" the sln Am 26.10.2018 um 11:25 schrieb Gaier, Bjoern via llvm-dev:> Hello everyone, > > so there is something that really bothers me. In the past I build LLVM and Clang via the source code and Visual Studio 2015. > In my project I used then the freshly new build Clang and the LLVM. > > But now, since I compiled with Visual Studio 2017 this is not possible anymore. I'm able to compile both, the LLVM and clang, but when I then use clang as the compiler and the LLVM in my project, I get undefined references to: "__std_reverse_trivially_swappable_4" > And other functions like this. > > I also tried, when CMake has generated the Solution file, to change the compiler to LLVM. Clang is executed then, but still - the same error will occur in my project or different projects when they are compiled with Clang. > > What am I doing wrong? It prevents me from continuing my project... > > Kind greetings > Bj rn > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0_______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0
Stefan Gränitz via llvm-dev
2018-Nov-16 00:10 UTC
[llvm-dev] Building LLVM with VisualStudio 2017
Hi Björn, hi Stella Sorry, didn't notice this thread earlier. In January I had a similar issue with LLVM 3.8 on Window 10. I couldn't solve it, but my workaround at least unblocked development: I simply defined an external C function with that exact name myself :-) Something like: external "C" void __std_reverse_trivially_swappable_8() {} With that the linker was happy. I put an explicit breakpoint instruction in there and it was never actually hit. In case you want to investigate further, there are more people with this problem here: https://github.com/protocolbuffers/protobuf/issues/4129 Cheers Stefan Am 14.11.18 um 23:41 schrieb Stella Stamenova via llvm-dev:> Hey Bjorn, > > Were you able to figure this out or is it still broken for you? > > Our scenario is a little bit different, but I have a theory as to what may be going wrong. What linker are you using when you compile your project with clang-cl? I am wondering whether the version of the linker and/or the libraries that you are using is too old in comparison to the one used for the clang compilation. > > Thanks, > -Stella > > -----Original Message----- > From: Gaier, Bjoern <Bjoern.Gaier at horiba.com> > Sent: Sunday, October 28, 2018 11:48 PM > To: Stella Stamenova <stilis at microsoft.com>; Dennis Luehring <dl.soluz at gmx.net> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 > > Hey Stella, > > (Gaier is my last name :0) > > I do the same steps as you do! The resulting Clang compiler is indeed working. I have problems with the LLVM library. > > When I build the LLVM7 I use the libraries of it in a different project - a JIT client. > When I compile this solution with Visual Studio 2017 and the MSVC compiler, then I get no problems. > > But, when I switch to the Clang-cl compiler in Visual Studio 2017, then I get suddenly these undefined references. > The strange thing is, that this also happens when I compile the LLVM with a preinstalled Clang. > > Kind greetings > Björn > > -----Original Message----- > From: Stella Stamenova <stilis at microsoft.com> > Sent: Freitag, 26. Oktober 2018 21:02 > To: Gaier, Bjoern <Bjoern.Gaier at horiba.com>; Dennis Luehring <dl.soluz at gmx.net> > Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 > > Hey Gaier, > > Can you give a few more details on your scenario? We use build LLVM with VS 2017 and we can successfully compile programs with clang afterwards. > > At a high level, what we do is: > 1) Call Cmake to generate VS2017 Solution > 2) Build the solution > 3) Now use clang to compile other programs > > Thanks, > -Stella > > -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Gaier, Bjoern via llvm-dev > Sent: Friday, October 26, 2018 2:52 AM > To: Dennis Luehring <dl.soluz at gmx.net> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 > > But building the LLVM and Clang is no problem at all. > The problem occurs when I use the generated LLVM lib files in a project, which I compile with Clang. > > -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Dennis Luehring via llvm-dev > Sent: Freitag, 26. Oktober 2018 11:41 > To: llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 > > something i expirenced when i added the IRParser lib to the Fibonacci example (using cmakelists.txt) - in a clean first build > > after the change i was unable to build the project (with masses of errors) > > rebuilding on the console with cmake build "repaired" the sln > > > Am 26.10.2018 um 11:25 schrieb Gaier, Bjoern via llvm-dev: >> Hello everyone, >> >> so there is something that really bothers me. In the past I build LLVM and Clang via the source code and Visual Studio 2015. >> In my project I used then the freshly new build Clang and the LLVM. >> >> But now, since I compiled with Visual Studio 2017 this is not possible anymore. I'm able to compile both, the LLVM and clang, but when I then use clang as the compiler and the LLVM in my project, I get undefined references to: "__std_reverse_trivially_swappable_4" >> And other functions like this. >> >> I also tried, when CMake has generated the Solution file, to change the compiler to LLVM. Clang is executed then, but still - the same error will occur in my project or different projects when they are compiled with Clang. >> >> What am I doing wrong? It prevents me from continuing my project... >> >> Kind greetings >> Bj rn >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=QgdhluvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- https://weliveindetail.github.io/blog/ https://cryptup.org/pub/stefan.graenitz at gmail.com
Gaier, Bjoern via llvm-dev
2018-Nov-19 07:58 UTC
[llvm-dev] Building LLVM with VisualStudio 2017
Hello Stella and Stefan, I actually worked around the problem by installing the LLVM plug-in for Visual Studio - now I was able to successfully link the LLVM libraries in projects where I used clang as the compiler. As a linker I always used the MSVC linker - for building LLVM/Clang and the said project. Kind greetings Björn -----Original Message----- From: Stefan Gränitz <stefan.graenitz at gmail.com> Sent: Freitag, 16. November 2018 01:11 To: Stella Stamenova <stilis at microsoft.com>; Gaier, Bjoern <Bjoern.Gaier at horiba.com>; Dennis Luehring <dl.soluz at gmx.net> Cc: llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 Hi Björn, hi Stella Sorry, didn't notice this thread earlier. In January I had a similar issue with LLVM 3.8 on Window 10. I couldn't solve it, but my workaround at least unblocked development: I simply defined an external C function with that exact name myself :-) Something like: external "C" void __std_reverse_trivially_swappable_8() {} With that the linker was happy. I put an explicit breakpoint instruction in there and it was never actually hit. In case you want to investigate further, there are more people with this problem here: https://github.com/protocolbuffers/protobuf/issues/4129 Cheers Stefan Am 14.11.18 um 23:41 schrieb Stella Stamenova via llvm-dev:> Hey Bjorn, > > Were you able to figure this out or is it still broken for you? > > Our scenario is a little bit different, but I have a theory as to what may be going wrong. What linker are you using when you compile your project with clang-cl? I am wondering whether the version of the linker and/or the libraries that you are using is too old in comparison to the one used for the clang compilation. > > Thanks, > -Stella > > -----Original Message----- > From: Gaier, Bjoern <Bjoern.Gaier at horiba.com> > Sent: Sunday, October 28, 2018 11:48 PM > To: Stella Stamenova <stilis at microsoft.com>; Dennis Luehring > <dl.soluz at gmx.net> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 > > Hey Stella, > > (Gaier is my last name :0) > > I do the same steps as you do! The resulting Clang compiler is indeed working. I have problems with the LLVM library. > > When I build the LLVM7 I use the libraries of it in a different project - a JIT client. > When I compile this solution with Visual Studio 2017 and the MSVC compiler, then I get no problems. > > But, when I switch to the Clang-cl compiler in Visual Studio 2017, then I get suddenly these undefined references. > The strange thing is, that this also happens when I compile the LLVM with a preinstalled Clang. > > Kind greetings > Björn > > -----Original Message----- > From: Stella Stamenova <stilis at microsoft.com> > Sent: Freitag, 26. Oktober 2018 21:02 > To: Gaier, Bjoern <Bjoern.Gaier at horiba.com>; Dennis Luehring > <dl.soluz at gmx.net> > Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017 > > Hey Gaier, > > Can you give a few more details on your scenario? We use build LLVM with VS 2017 and we can successfully compile programs with clang afterwards. > > At a high level, what we do is: > 1) Call Cmake to generate VS2017 Solution > 2) Build the solution > 3) Now use clang to compile other programs > > Thanks, > -Stella > > -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Gaier, > Bjoern via llvm-dev > Sent: Friday, October 26, 2018 2:52 AM > To: Dennis Luehring <dl.soluz at gmx.net> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 > > But building the LLVM and Clang is no problem at all. > The problem occurs when I use the generated LLVM lib files in a project, which I compile with Clang. > > -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Dennis > Luehring via llvm-dev > Sent: Freitag, 26. Oktober 2018 11:41 > To: llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017 > > something i expirenced when i added the IRParser lib to the Fibonacci > example (using cmakelists.txt) - in a clean first build > > after the change i was unable to build the project (with masses of > errors) > > rebuilding on the console with cmake build "repaired" the sln > > > Am 26.10.2018 um 11:25 schrieb Gaier, Bjoern via llvm-dev: >> Hello everyone, >> >> so there is something that really bothers me. In the past I build LLVM and Clang via the source code and Visual Studio 2015. >> In my project I used then the freshly new build Clang and the LLVM. >> >> But now, since I compiled with Visual Studio 2017 this is not possible anymore. I'm able to compile both, the LLVM and clang, but when I then use clang as the compiler and the LLVM in my project, I get undefined references to: "__std_reverse_trivially_swappable_4" >> And other functions like this. >> >> I also tried, when CMake has generated the Solution file, to change the compiler to LLVM. Clang is executed then, but still - the same error will occur in my project or different projects when they are compiled with Clang. >> >> What am I doing wrong? It prevents me from continuing my project... >> >> Kind greetings >> Bj rn >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists >> .llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01% >> 7Cstilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988b >> f86f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=Qgdh >> luvmS5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists. > llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7C > stilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86 > f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=Qgdhluvm > S5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists. > llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7C > stilis%40microsoft.com%7Ce829d66f0e004587cd7508d63d6a81e1%7C72f988bf86 > f141af91ab2d7cd011db47%7C1%7C0%7C636763925003133498&sdata=Qgdhluvm > S5HM3wmALque4cFXh8gM4SJJclAD5HM8laM%3D&reserved=0 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- https://weliveindetail.github.io/blog/ https://cryptup.org/pub/stefan.graenitz at gmail.com Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
Reasonably Related Threads
- build bot mails
- [LLVMdev] the clang 3.5 loop optimizer seems to jump in unintentional for simple loops
- [LLVMdev] Memory Allocation Optimized away with new by not with ::operator new
- [LLVMdev] Adding PDB support to lib\DebugInfo
- JIT - Resolve obj file without a main