[ 
https://issues.apache.org/jira/browse/ARROW-14188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436213#comment-17436213
 ] 

Ian Cook commented on ARROW-14188:
----------------------------------

Yes this looks like a vcpkg-related problem.

Here's a self-contained repro of the problem, using the [minimal C++ build 
example|https://github.com/apache/arrow/tree/master/cpp/examples/minimal_build]:
{code:java}
docker pull ubuntu:18.04
docker run -it ubuntu:18.04 bash{code}
Then in the container:
{code:java}
apt update
apt install -y build-essential software-properties-common tar curl zip unzip 
git wget
apt purge --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | 
gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
apt install -y cmake ninja-build pkg-config flex bison

git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -useSystemBinaries
./vcpkg/vcpkg integrate install
./vcpkg/vcpkg install arrow

wget 
https://github.com/apache/arrow/raw/master/cpp/examples/minimal_build/CMakeLists.txt
wget 
https://github.com/apache/arrow/raw/master/cpp/examples/minimal_build/example.cc
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake 
-DVCPKG_TARGET_TRIPLET=x64-linux -DARROW_LINK_SHARED=OFF ..
cmake --build .{code}

> link error on ubuntu
> --------------------
>
>                 Key: ARROW-14188
>                 URL: https://issues.apache.org/jira/browse/ARROW-14188
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 4.0.0, 5.0.0
>         Environment: Ubuntu 18.04, gcc-9, and vcpkg installation of arrow
>            Reporter: Amir Ghamarian
>            Priority: Major
>         Attachments: completerr.txt, linkerror.txt
>
>
> I used vcpkg to install arrow versions 4 and 5, trying to build my code that 
> uses parquet fails by giving link errors of undefined reference.
> The same code works on OSX but fails on ubuntu.
> My cmake snippet is as follows:
>  
> {code:java}
> find_package(Arrow CONFIG REQUIRED)
> get_filename_component(MY_SEARCH_DIR ${Arrow_CONFIG} DIRECTORY)
> find_package(Parquet CONFIG REQUIRED PATHS ${MY_SEARCH_DIR})
> find_package(Thrift CONFIG REQUIRED)
> {code}
> and the linking: 
>  
> {code:java}
> target_link_libraries(vision_obj PUBLIC .... thrift::thrift re2::re2 
> arrow_static parquet_static )
> {code}
>  
>  I get a lot of errors
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to