Problem with using CMake on Windows with Visual Studio 2017

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with using CMake on Windows with Visual Studio 2017

Osman Zakir
Hi again, everyone.

I'm asking again.  If the reason I didn't get a reply last time was because I didn't ask the right way for "hackers" to give me a satisfactory answer, please let me know.  But if it was just because not enough people saw it, then that's all the more reason for me to do this (right?).  

Anyway, I'm having problem using CMake to build a library on Windows.  The library is Jinja2Cpp.  I asked on their GitHub page as well and they said it might be a problem with VS or Windows itself since there's something in the output that shouldn't be there in a normal build process.  I tried asking on MSDN after that, but they just said to ask the library authors.  So I decided to ask here instead, after that.  

This is the issue thread on the Jinja2Cpp GitHub page: https://github.com/flexferrum/Jinja2Cpp/issues/75 .  

I'm also attaching the CMake logs to this message for you guys' reference.  

I tried building it more than once.  The command I used (on the command line) was "cmake .. -DCMAKE_INSTALL_PREFIX=../install".  I was able to build it successfully with VS2017 before.  This is only a recent problem.  


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

CMakeError.log (27K) Download Attachment
CMakeOutput.log (44K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with using CMake on Windows with Visual Studio 2017

Frank Tocci
 How do I unsubscribe from these emails? 

-Frank 

On Fri, Oct 26, 2018 at 9:48 AM Osman Zakir <[hidden email]> wrote:
Hi again, everyone.

I'm asking again.  If the reason I didn't get a reply last time was because I didn't ask the right way for "hackers" to give me a satisfactory answer, please let me know.  But if it was just because not enough people saw it, then that's all the more reason for me to do this (right?).  

Anyway, I'm having problem using CMake to build a library on Windows.  The library is Jinja2Cpp.  I asked on their GitHub page as well and they said it might be a problem with VS or Windows itself since there's something in the output that shouldn't be there in a normal build process.  I tried asking on MSDN after that, but they just said to ask the library authors.  So I decided to ask here instead, after that.  

This is the issue thread on the Jinja2Cpp GitHub page: https://github.com/flexferrum/Jinja2Cpp/issues/75 .  

I'm also attaching the CMake logs to this message for you guys' reference.  

I tried building it more than once.  The command I used (on the command line) was "cmake .. -DCMAKE_INSTALL_PREFIX=../install".  I was able to build it successfully with VS2017 before.  This is only a recent problem.  
Just now, just to check, I tried to build the library on Windows again by cloning fresh into Jinja2Cpp, updating the submodule, and then running cmake -DCMAKE_INSTALL_PREFIX=../install and got this...

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Problem with using CMake on Windows with Visual Studio 2017

Michael Ellery
In reply to this post by Osman Zakir
look at the error message specifically:    LDFLAGS=-static-libstdc++ -static-libgcc

Did you add something to your environment recently? Those look like gcc/clang flags - msvc is not going to like them.  Also, have you wiped your CMakeCache completely (clean configure)?  I’d have a look at your env variables to start with. Not generally needed, but you should also try building in a visual studio command prompt as it might properly set some of these ENV vars, just in case there is any confusion.

-Mike

> On Oct 26, 2018, at 9:48 AM, Osman Zakir <[hidden email]> wrote:
>
> Hi again, everyone.
>
> I'm asking again.  If the reason I didn't get a reply last time was because I didn't ask the right way for "hackers" to give me a satisfactory answer, please let me know.  But if it was just because not enough people saw it, then that's all the more reason for me to do this (right?).  
>
> Anyway, I'm having problem using CMake to build a library on Windows.  The library is Jinja2Cpp.  I asked on their GitHub page as well and they said it might be a problem with VS or Windows itself since there's something in the output that shouldn't be there in a normal build process.  I tried asking on MSDN after that, but they just said to ask the library authors.  So I decided to ask here instead, after that.  
>
> This is the issue thread on the Jinja2Cpp GitHub page: https://github.com/flexferrum/Jinja2Cpp/issues/75 .  
>
> I'm also attaching the CMake logs to this message for you guys' reference.  
>
> I tried building it more than once.  The command I used (on the command line) was "cmake .. -DCMAKE_INSTALL_PREFIX=../install".  I was able to build it successfully with VS2017 before.  This is only a recent problem.  
>
> Can't Build Jinja2Cpp on Windows with Visual Studio 2017 Anymore · Issue #75 · flexferrum/Jinja2Cpp
> Just now, just to check, I tried to build the library on Windows again by cloning fresh into Jinja2Cpp, updating the submodule, and then running cmake -DCMAKE_INSTALL_PREFIX=../install and got this...
> github.com
>
> <CMakeError.log><CMakeOutput.log>--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Problem with using CMake on Windows with Visual Studio 2017

Bill Hoffman

Yes, if you could run "set" from the command prompt and post the output here.

C:\Jinja2Cpp\build>set

That might show if you have something odd in your environment.  I am guessing you have LDFLAGS  set which CMake picks up and uses as a linker flag.

On 10/26/2018 1:16 PM, Michael Ellery wrote:
look at the error message specifically:    LDFLAGS=-static-libstdc++ -static-libgcc

Did you add something to your environment recently? Those look like gcc/clang flags - msvc is not going to like them.  Also, have you wiped your CMakeCache completely (clean configure)?  I’d have a look at your env variables to start with. Not generally needed, but you should also try building in a visual studio command prompt as it might properly set some of these ENV vars, just in case there is any confusion.

-Mike


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake