You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by parthchandra <gi...@git.apache.org> on 2016/11/18 23:28:33 UTC

[GitHub] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

GitHub user parthchandra opened a pull request:

    https://github.com/apache/drill/pull/659

    DRILL-5050: C++ client library has symbol resolution issues

    when loaded by a process that already uses boost::asio
    
    Build with Boost static libs and drill_boost namespace on mac. Added
    readme with instructions

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

    $ git pull https://github.com/parthchandra/drill DRILL-5050

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

    https://github.com/apache/drill/pull/659.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 #659
    
----
commit 49dc23f101bdcf4b97e10e355486f98c5d54a6c9
Author: Parth Chandra <pa...@apache.org>
Date:   2016-11-14T22:01:29Z

    DRILL-5050: C++ client library has symbol resolution issues
    when loaded by a process that already uses boost::asio
    
    Build with Boost static libs and drill_boost namespace on mac. Added
    readme with instructions

----


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88966387
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    +$ cd $BOOST_BUILD_DIR/boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/boost_1_60_0/
    +$ ./b2 tools/bcp
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +
    +# Use boost bcp to rename the boost namespace to drill_boost
    +# the following builds a subset of boost without icu. You may need to add more modules to include icu. 
    +# bcp documentation can be found here: http://www.boost.org/doc/libs/1_60_0/tools/bcp/doc/html/index.html
    +
    +$ $BOOST_BUILD_DIR/boost_1_60_0/dist/bin/bcp --namespace=drill_boost --namespace-alias --boost=$BOOST_BUILD_DIR/boost_1_60_0/ shared_ptr random context chrono date_time regex system timer thread asio smart_ptr bind config build regex config assign $BOOST_BUILD_DIR/drill_boost_1_60_0 
    --- End diff --
    
    according to my tests with boost 1.55 (which is the minimum boost version we require), multiprecision and functional are missing


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88766028
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Dill on MacOs
    +--------------------------------
    +
    +These instreuctions are using Boost version 1.60.0 which is recommended
    --- End diff --
    
    instructions


---
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] drill issue #659: DRILL-5050: C++ client library has symbol resolution issue...

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

    https://github.com/apache/drill/pull/659
  
    LGTM


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88966881
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    +$ cd $BOOST_BUILD_DIR/boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/boost_1_60_0/
    +$ ./b2 tools/bcp
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +
    +# Use boost bcp to rename the boost namespace to drill_boost
    +# the following builds a subset of boost without icu. You may need to add more modules to include icu. 
    +# bcp documentation can be found here: http://www.boost.org/doc/libs/1_60_0/tools/bcp/doc/html/index.html
    +
    +$ $BOOST_BUILD_DIR/boost_1_60_0/dist/bin/bcp --namespace=drill_boost --namespace-alias --boost=$BOOST_BUILD_DIR/boost_1_60_0/ shared_ptr random context chrono date_time regex system timer thread asio smart_ptr bind config build regex config assign $BOOST_BUILD_DIR/drill_boost_1_60_0 
    +
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/drill_boost_1_60_0/
    +
    +# change the variant to debug for a debug build
    +$ ./b2 --build-dir=$BOOST_BUILD_DIR/drill_boost_1_60_0/build variant=release link=static threading=multi
    --- End diff --
    
    for linux (I guess that's an ELF thing), you need to add cxxflags='-fPIC' as the default drill build generates a dynamic library (I guess it would not be needed if we were to build a static lib instead)


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88948500
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    +
    +2.1) Install protobuf
    +  $> brew install protobuf
    --- End diff --
    
    The APIs are compatible too. I had been using an older version without any problems.  Brew will install a new version anyway, so I updated the notes.


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88763707
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    --- End diff --
    
    I think CMake3 and higher is required...


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88952888
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -88,19 +88,28 @@ if(MSVC)
         set(Boost_USE_STATIC_LIBS ON)
         set(Boost_USE_MULTITHREADED ON)
         set(Boost_USE_STATIC_RUNTIME OFF)
    +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    +    set(Boost_USE_STATIC_LIBS ON)
    +    set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for the mac and rebuild boost. Then
    +    #    uncomment the line below to build
    +    #    set(Boost_NAMESPACE drill_boost)
    --- End diff --
    
    nice for aliases ,I'll check the linux portion


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88763555
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    +
    +2.1) Install protobuf
    +  $> brew install protobuf
    +
    +2.2) Install zookeeper
    +  $> brew install zookeeper
    +
    +2.3) Install boost
    +  $> brew install boost
    +
    +2.3.1) For production builds, see the readme.boost file  
    +  
    +  
    +(Optional) Refresh protobuf source files
    +----------------------------------------
    +When changes have been introduced to the protocol module, you might need to refresh the protobuf C++ source files too.
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target fixProtobufs
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target cpProtobufs
    +
    +Open a pull request with the changes to DRILL_DIR/contrib/native/client/src/protobuf
    +
    +Build drill client
    +-------------------
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target ALL_BUILD
    +
    +
    +XCode IDE
    +---------
    +  You can open the drillclient.xcodeproj file in the XCode ide and run/debug as with any other command line app
    +
    +Test
    +----
    +Run query submitter from the command line
    +  $> querySubmitter query='select * from dfs.`/Users/pchandra/work/data/tpc-h/customer.parquet`' type=sql connectStr=local=10.250.0.146:31010 api=async logLevel=trace user=yourUserName password=yourPassWord
    +
    +Valgrind
    +--------
    +  If you can get valgrind to build and run on macos, please update the instuctions here
    --- End diff --
    
    you can use brew (I personally used it without issue)


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88947360
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    --- End diff --
    
    Added to the instructions


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88989249
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    --- End diff --
    
    True. I made it 1.6.0 because the Tableau version I was using also built with 1.6.0. Removed the recommendation.


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88765954
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    +
    +2.1) Install protobuf
    +  $> brew install protobuf
    +
    +2.2) Install zookeeper
    +  $> brew install zookeeper
    +
    +2.3) Install boost
    +  $> brew install boost
    +
    +2.3.1) For production builds, see the readme.boost file  
    +  
    +  
    +(Optional) Refresh protobuf source files
    +----------------------------------------
    +When changes have been introduced to the protocol module, you might need to refresh the protobuf C++ source files too.
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target fixProtobufs
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target cpProtobufs
    +
    +Open a pull request with the changes to DRILL_DIR/contrib/native/client/src/protobuf
    +
    +Build drill client
    +-------------------
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target ALL_BUILD
    +
    +
    +XCode IDE
    +---------
    +  You can open the drillclient.xcodeproj file in the XCode ide and run/debug as with any other command line app
    +
    +Test
    +----
    +Run query submitter from the command line
    +  $> querySubmitter query='select * from dfs.`/Users/pchandra/work/data/tpc-h/customer.parquet`' type=sql connectStr=local=10.250.0.146:31010 api=async logLevel=trace user=yourUserName password=yourPassWord
    +
    +Valgrind
    +--------
    +  If you can get valgrind to build and run on macos, please update the instuctions here
    --- End diff --
    
    instruction


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88965524
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -99,6 +99,11 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     else()
         set(Boost_USE_STATIC_LIBS OFF)
         set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for  linux and rebuild boost. Then
    --- End diff --
    
    double space


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88764054
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -88,19 +88,28 @@ if(MSVC)
         set(Boost_USE_STATIC_LIBS ON)
         set(Boost_USE_MULTITHREADED ON)
         set(Boost_USE_STATIC_RUNTIME OFF)
    +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    +    set(Boost_USE_STATIC_LIBS ON)
    +    set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for the mac and rebuild boost. Then
    +    #    uncomment the line below to build
    +    #    set(Boost_NAMESPACE drill_boost)
    --- End diff --
    
    if the boost namespace is changed, I guess the code should be changed too? But it means that all boost symbols are changed too (included boost::shared_ptr<> which are part of the public API), correct?
    
    In any case, can you also provide the changes to the source files?


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88765929
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    --- End diff --
    
    install


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88763696
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    --- End diff --
    
    not sure why not using brew here (it worked for me, binary is named cmake3)


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88991123
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    +$ cd $BOOST_BUILD_DIR/boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/boost_1_60_0/
    +$ ./b2 tools/bcp
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +
    +# Use boost bcp to rename the boost namespace to drill_boost
    +# the following builds a subset of boost without icu. You may need to add more modules to include icu. 
    +# bcp documentation can be found here: http://www.boost.org/doc/libs/1_60_0/tools/bcp/doc/html/index.html
    +
    +$ $BOOST_BUILD_DIR/boost_1_60_0/dist/bin/bcp --namespace=drill_boost --namespace-alias --boost=$BOOST_BUILD_DIR/boost_1_60_0/ shared_ptr random context chrono date_time regex system timer thread asio smart_ptr bind config build regex config assign $BOOST_BUILD_DIR/drill_boost_1_60_0 
    --- End diff --
    
    Good catch. I started with the required components, let bcp figure out the dependencies, compiled the client (using only the files included by bcp) and added the dependencies that bcp didn't find. So multiprecision and functional are probably included, but it's probably better to include them explicitly.



---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88966670
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    --- End diff --
    
    Linux instructions refers to boost 1.53, windows instructions to boost 1.55. I don't think we specifically need boost 1.60 or higher


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88988769
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -88,19 +88,28 @@ if(MSVC)
         set(Boost_USE_STATIC_LIBS ON)
         set(Boost_USE_MULTITHREADED ON)
         set(Boost_USE_STATIC_RUNTIME OFF)
    +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    +    set(Boost_USE_STATIC_LIBS ON)
    +    set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for the mac and rebuild boost. Then
    +    #    uncomment the line below to build
    +    #    set(Boost_NAMESPACE drill_boost)
    --- End diff --
    
    Done. Merged the Clang and Gnu sections and made them both use static libs



---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88765875
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Dill on MacOs
    --- End diff --
    
    Drill


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88948137
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    --- End diff --
    
    Added an option to use brew. I had used the dmg from the link I provided. 


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88956264
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -67,13 +72,37 @@ XCode IDE
     ---------
       You can open the drillclient.xcodeproj file in the XCode ide and run/debug as with any other command line app
     
    -Test
    -----
    +2.3.1.2 Build using MAKE
    +========================
    +(Optional) Refresh protobuf source files
    +----------------------------------------
    +When changes have been introduced to the protocol module, you might need to refresh the protobuf C++ source files too.
    +    $> cd DRILL_DIR/contrib/native/client
    +    $> mkdir build
    +    $> cd build && cmake3 -G "Unix Makefiles" ..
    +    $> make cpProtobufs
    +
    +Open a pull request with the changes to DRILL_DIR/contrib/native/client/src/protobuf
    +
    +Build drill client
    +-------------------
    +    $> cd DRILL_DIR/contrib/native/client
    +    $> mkdir build
    +    $> cd build && cmake3 -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..
    +    $> make
    +
    +
    +2.4 Test
    +--------
     Run query submitter from the command line
       $> querySubmitter query='select * from dfs.`/Users/pchandra/work/data/tpc-h/customer.parquet`' type=sql connectStr=local=10.250.0.146:31010 api=async logLevel=trace user=yourUserName password=yourPassWord
     
    -Valgrind
    ---------
    -  If you can get valgrind to build and run on macos, please update the instuctions here
    +2.5 Valgrind
    +------------
    +  Valgrind is available only for MacOs 10.11 or earlier. Install valgrind using brew
    --- End diff --
    
    According to valgrind website, 3.12.0 release (available through brew) has limited support for 10.11 and 10.12. I haven't tested it yet (my main laptop is still on 10.11)


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88947891
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Dill on MacOs
    +--------------------------------
    +
    +These instreuctions are using Boost version 1.60.0 which is recommended
    --- End diff --
    
    fixed


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88947835
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -88,19 +88,28 @@ if(MSVC)
         set(Boost_USE_STATIC_LIBS ON)
         set(Boost_USE_MULTITHREADED ON)
         set(Boost_USE_STATIC_RUNTIME OFF)
    +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    +    set(Boost_USE_STATIC_LIBS ON)
    +    set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for the mac and rebuild boost. Then
    +    #    uncomment the line below to build
    +    #    set(Boost_NAMESPACE drill_boost)
    --- End diff --
    
    There is no change needed to the source. The bcp option namespace-alias aliases the boost namespace to the namespace you provide, so no code change is needed. (Someone at boost thought this thru!) 
    Added a linux portion. Can you please doubecheck?


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88966101
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -88,19 +88,28 @@ if(MSVC)
         set(Boost_USE_STATIC_LIBS ON)
         set(Boost_USE_MULTITHREADED ON)
         set(Boost_USE_STATIC_RUNTIME OFF)
    +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    +    set(Boost_USE_STATIC_LIBS ON)
    +    set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for the mac and rebuild boost. Then
    +    #    uncomment the line below to build
    +    #    set(Boost_NAMESPACE drill_boost)
    --- End diff --
    
    there's nothing specific to Clang, so it might be better to have a more generic flag to trigger a namespaced-boost build (Linux also needs needs to use static libs if drill-boost was only build statically per instructions)


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88763623
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    --- End diff --
    
    typo: install
    
    Also XCode is available from the app store too...


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r89011813
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Drill on MacOs/Linux
    +--------------------------------
    +
    +These instructions are using Boost version 1.60.0 which is recommended
    +
    +Assuming there is a BOOST_BUILD_DIR 
    +
    +$ cd $BOOST_BUILD_DIR
    +$ tar zxf boost_1_60_0.tar.gz
    +$ cd $BOOST_BUILD_DIR/boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/boost_1_60_0/
    +$ ./b2 tools/bcp
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +
    +# Use boost bcp to rename the boost namespace to drill_boost
    +# the following builds a subset of boost without icu. You may need to add more modules to include icu. 
    +# bcp documentation can be found here: http://www.boost.org/doc/libs/1_60_0/tools/bcp/doc/html/index.html
    +
    +$ $BOOST_BUILD_DIR/boost_1_60_0/dist/bin/bcp --namespace=drill_boost --namespace-alias --boost=$BOOST_BUILD_DIR/boost_1_60_0/ shared_ptr random context chrono date_time regex system timer thread asio smart_ptr bind config build regex config assign $BOOST_BUILD_DIR/drill_boost_1_60_0 
    +
    +$ cd $BOOST_BUILD_DIR/drill_boost_1_60_0
    +$ ./bootstrap.sh --prefix=$BOOST_BUILD_DIR/drill_boost_1_60_0/
    +
    +# change the variant to debug for a debug build
    +$ ./b2 --build-dir=$BOOST_BUILD_DIR/drill_boost_1_60_0/build variant=release link=static threading=multi
    --- End diff --
    
    Good point. I was assuming the b2/bjam would do the right thing. It does, but only for the shared library build. Adding -fPIC. 



---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88949266
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    +
    +2.1) Install protobuf
    +  $> brew install protobuf
    +
    +2.2) Install zookeeper
    +  $> brew install zookeeper
    +
    +2.3) Install boost
    +  $> brew install boost
    +
    +2.3.1) For production builds, see the readme.boost file  
    +  
    +  
    +(Optional) Refresh protobuf source files
    +----------------------------------------
    +When changes have been introduced to the protocol module, you might need to refresh the protobuf C++ source files too.
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target fixProtobufs
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target cpProtobufs
    +
    +Open a pull request with the changes to DRILL_DIR/contrib/native/client/src/protobuf
    +
    +Build drill client
    +-------------------
    +  $> cd DRILL_DIR/contrib/native/client
    +  $> mkdir build
    +  $> cd build && cmake3 -G "XCode" -D CMAKE_BUILD_TYPE=Debug ..
    +  $> xcodebuild -project drillclient.xcodeproj -configuration ${BUILDTYPE} -target ALL_BUILD
    +
    +
    +XCode IDE
    +---------
    +  You can open the drillclient.xcodeproj file in the XCode ide and run/debug as with any other command line app
    +
    +Test
    +----
    +Run query submitter from the command line
    +  $> querySubmitter query='select * from dfs.`/Users/pchandra/work/data/tpc-h/customer.parquet`' type=sql connectStr=local=10.250.0.146:31010 api=async logLevel=trace user=yourUserName password=yourPassWord
    +
    +Valgrind
    +--------
    +  If you can get valgrind to build and run on macos, please update the instuctions here
    --- End diff --
    
    Ah, could never get brew to install it for me. I had tried to build valgrind way back and its uninstall did not clean up leaving me with a system on which the brew install doesn't work either.
    Also, valgrind is not updated for the latest MacOs and there is no valkyrie. :( 
    Can you double check the instructions I wrote down? I just copied the stuff from the linux instructions. 



---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88965552
  
    --- Diff: contrib/native/client/CMakeLists.txt ---
    @@ -99,6 +99,11 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     else()
         set(Boost_USE_STATIC_LIBS OFF)
         set(Boost_USE_MULTITHREADED ON)
    +    #    To build a production version, the macos build must use a shaded version
    +    #    of boost. Arbirtarily, we choose the new namspace to be drill_boost.
    +    #    See the instructions in the readme for  linux and rebuild boost. Then
    --- End diff --
    
    linux?


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88763775
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    +  In Terminal, install the command line tools 
    +    $> xcode-select --install
    +
    +0.2) Install brew following the instructions here: http://brew.sh/
    +
    +1) CMAKE 2.8 or above
    +  Download and install Cmake : https://cmake.org/download/
    +
    +2.1) Install protobuf
    +  $> brew install protobuf
    --- End diff --
    
    we might want to use protobuf-2.5.0 (same as the java version). I believe this is wire-compatible, but I don't know about the APIs.


---
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] drill issue #659: DRILL-5050: C++ client library has symbol resolution issue...

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

    https://github.com/apache/drill/pull/659
  
    +1   based on @laurentgo 's review. 


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88947949
  
    --- Diff: contrib/native/client/readme.macos ---
    @@ -0,0 +1,79 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +
    +MacOS build (tested on OS X El Capitan)
    +
    +Install Prerequisites
    +---------------------
    +
    +0.1) Install XCode 
    +  Download an istall from here: https://developer.apple.com/xcode/downloads/
    --- End diff --
    
    fixed


---
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] drill pull request #659: DRILL-5050: C++ client library has symbol resolutio...

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

    https://github.com/apache/drill/pull/659#discussion_r88947865
  
    --- Diff: contrib/native/client/readme.boost ---
    @@ -0,0 +1,53 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.
    + */
    +
    +Building Boost for Dill on MacOs
    --- End diff --
    
    fixed


---
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.
---