You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by jeking3 <gi...@git.apache.org> on 2017/01/20 16:23:30 UTC

[GitHub] thrift pull request #1162: THRIFT-3973: Provide some tools to make it easier...

GitHub user jeking3 opened a pull request:

    https://github.com/apache/thrift/pull/1162

    THRIFT-3973: Provide some tools to make it easier to build thrift C++ on Windows

    As a contributor and committer on the project with a focus on C++ and CMake, I needed a way to build thrift C++ on windows with all the bells and whistles.  While cmake is a great tool for generating build environments on different platforms, there is still an ecosystem of third party libraries surrounding thrift that need to be acquired or built.
    
    I was not certain if these files should end up in build/wincpp or in contrib/wincpp.  These files are not used in any of our CI builds.  They simply exist as a guide to make it easier to build thrift C++ on windows, including how to build a redistributable thrift compiler for windows without any dependencies, and how to generate Visual Studio projects for thrift on windows.
    
    As part of this effort, the current C++ MSVC projects that are distributed with the project will be removed once folks are happy with this toolset.
    
    The README.md file contains information that can eventually be posted on:
    https://thrift.apache.org/docs/install/windows
    and the content there will be split into "older build information" and this would be the current.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jeking3/thrift story/THRIFT-3973-winbuild

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1162.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1162
    
----
commit d39c35a5ce8a79814b0294f110553c8097853c31
Author: James E. King, III <ji...@simplivity.com>
Date:   2017-01-20T16:15:25Z

    THRIFT-3973: Provide some tools to make it easier to build thrift C++ on Windows

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request #1162: THRIFT-3973: Provide some tools to make it easier...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/thrift/pull/1162


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request #1162: THRIFT-3973: Provide some tools to make it easier...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1162#discussion_r97203010
  
    --- Diff: build/wincpp/build-thrift-compiler.bat ---
    @@ -0,0 +1,80 @@
    +::
    +:: Licensed under the Apache License, Version 2.0 (the "License");
    +:: you may not use this file except in compliance with the License.
    +:: You may obtain a copy of the License at
    +:: 
    +::     http://www.apache.org/licenses/LICENSE-2.0
    +:: 
    +:: Unless required by applicable law or agreed to in writing, software
    +:: distributed under the License is distributed on an "AS IS" BASIS,
    +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +:: See the License for the specific language governing permissions and
    +:: limitations under the License.
    +:: 
    +
    +::
    +:: Produces a production thrift compiler suitable for redistribution.
    +:: The compiler is linked to runtime statically for maximum portability.
    +:: Assumes the thirdparty files for "winflexbison" have been placed
    +:: according to the README.md instructions.
    +::
    +:: Open a Visual Studio Command Prompt of your choosing and then
    +:: run this script.  
    +
    +@ECHO OFF
    +SETLOCAL EnableDelayedExpansion
    +
    +IF NOT DEFINED CMAKE_ROOT      SET CMAKE_ROOT=C:\Program Files\CMake
    +IF NOT DEFINED PACKAGE_NAME    SET PACKAGE_NAME=thrift
    +IF NOT DEFINED PACKAGE_VERSION SET PACKAGE_VERSION=dev
    +IF NOT DEFINED SOURCE_DIR      SET SOURCEDIR=%~dp0%PACKAGE_NAME%
    +IF NOT DEFINED WIN3P_ROOT      SET WIN3P_ROOT=%~dp0thirdparty
    +
    +:: Set COMPILER to (vc100 - vc140) depending on the current environment
    +CALL scripts\cl_setcompiler.bat || EXIT /B
    +
    +:: Set ARCH to either win32 or x64 depending on the current environment
    +CALL scripts\cl_setarch.bat || EXIT /B
    +
    +:: Set GENERATOR for CMake depending on the current environment
    +CALL scripts\cl_setgenerator.bat || EXIT /B
    +
    +IF NOT DEFINED BUILDTYPE (
    +  SET BUILDTYPE=Release
    +)
    +
    +  SET BUILDDIR=%~dp0build\%PACKAGE_NAME%-compiler\%PACKAGE_VERSION%\%COMPILER%\
    +  SET OUTDIR=%~dp0dist\%PACKAGE_NAME%-compiler-%PACKAGE_VERSION%\%COMPILER%\%ARCH%\%BUILDTYPE%\
    +  SET BOOST_LIBDIR=lib%ARCH:~-2,2%-msvc-%COMPILER:~-3,2%.0
    +  IF "%BUILDTYPE%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d)
    +
    +  ECHO/
    +  ECHO =========================================================================
    +  ECHO     Configuration: %PACKAGE_NAME% %PACKAGE_VERSION% %COMPILER%:%ARCH%:%BUILDTYPE% "%GENERATOR%"
    +IF DEFINED COMPILERONLY (
    +  ECHO                    COMPILER ONLY
    +)
    +  ECHO   Build Directory: %BUILDDIR%
    +  ECHO Install Directory: %OUTDIR%
    +  ECHO  Source Directory: %SOURCEDIR%
    +  ECHO =========================================================================
    +  ECHO/
    +
    +  MKDIR "%BUILDDIR%"
    +  CD "%BUILDDIR%" || EXIT /B
    +
    +  "C:\Program Files\CMake\bin\cmake.exe" %~dp0thrift ^
    --- End diff --
    
    This should just be "cmake.exe" and let the path pick it up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift pull request #1162: THRIFT-3973: Provide some tools to make it easier...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1162#discussion_r97203001
  
    --- Diff: build/wincpp/build-thrift-compiler.bat ---
    @@ -0,0 +1,80 @@
    +::
    +:: Licensed under the Apache License, Version 2.0 (the "License");
    +:: you may not use this file except in compliance with the License.
    +:: You may obtain a copy of the License at
    +:: 
    +::     http://www.apache.org/licenses/LICENSE-2.0
    +:: 
    +:: Unless required by applicable law or agreed to in writing, software
    +:: distributed under the License is distributed on an "AS IS" BASIS,
    +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +:: See the License for the specific language governing permissions and
    +:: limitations under the License.
    +:: 
    +
    +::
    +:: Produces a production thrift compiler suitable for redistribution.
    +:: The compiler is linked to runtime statically for maximum portability.
    +:: Assumes the thirdparty files for "winflexbison" have been placed
    +:: according to the README.md instructions.
    +::
    +:: Open a Visual Studio Command Prompt of your choosing and then
    +:: run this script.  
    +
    +@ECHO OFF
    +SETLOCAL EnableDelayedExpansion
    +
    +IF NOT DEFINED CMAKE_ROOT      SET CMAKE_ROOT=C:\Program Files\CMake
    --- End diff --
    
    I need to remove this, since it can confuse CMAKE.  We'll assume that CMAKE is in the path, like the other top level batch does.  With this here I was getting errors with CMAKE-3.7 so I will fix in the next push.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] thrift issue #1162: THRIFT-3973: Provide some tools to make it easier to bui...

Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:

    https://github.com/apache/thrift/pull/1162
  
    Build failure here cannot be related to the pull request because it is not used in any Travis CI job.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---