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

Wes McKinney commented on ARROW-1048:
-------------------------------------

It looks like the issue is that the {{$LD_LIBRARY_PATH}}, if any, is not 
visible during the link step

{code}
/usr/bin/ld: warning: libboost_system.so.1.64.0, needed by 
/home/wesm/code/arrow/tmp-apache-arrow/cpp/install/lib/libarrow.so.0, not found 
(try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_filesystem.so.1.64.0, needed by 
/home/wesm/code/arrow/tmp-apache-arrow/cpp/install/lib/libarrow.so.0, not found 
(try using -rpath or -rpath-link)
/home/wesm/code/arrow/tmp-apache-arrow/cpp/install/lib/libarrow.so.0: undefined 
reference to `boost::system::system_category()'
/home/wesm/code/arrow/tmp-apache-arrow/cpp/install/lib/libarrow.so.0: undefined 
reference to `boost::system::generic_category()'
/home/wesm/code/arrow/tmp-apache-arrow/cpp/install/lib/libarrow.so.0: undefined 
reference to `boost::filesystem::path::operator/=(boost::filesystem::path 
const&)'
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command '['/bin/bash', '../libtool', 
'--mode=link', '--tag=CC', '--silent', 
'/home/wesm/code/native-toolchain/build/gcc-4.9.2/bin/gcc', '-o', 
'/home/wesm/code/arrow/tmp-apache-arrow/c_glib/arrow-glib/tmp-introspectFpRYOO/Arrow-1.0',
 '-export-dynamic', 
'/home/wesm/code/arrow/tmp-apache-arrow/c_glib/arrow-glib/tmp-introspectFpRYOO/Arrow-1.0.o',
 '-L.', 'libarrow-glib.la', '-Wl,--export-dynamic', '-pthread', '-lgio-2.0', 
'-lgmodule-2.0', '-lgobject-2.0', '-lglib-2.0']' returned non-zero exit status 1
make[3]: *** [Arrow-1.0.gir] Error 1
make[3]: Leaving directory 
`/home/wesm/code/arrow/tmp-apache-arrow/c_glib/arrow-glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory 
`/home/wesm/code/arrow/tmp-apache-arrow/c_glib/arrow-glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wesm/code/arrow/tmp-apache-arrow/c_glib'
make: *** [all] Error 2
{code}

but

{code}
$ ldd tmp-apache-arrow/cpp/install/lib/libarrow.so      linux-vdso.so.1 =>  
(0x00007fff4a557000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2f9fcde000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007f2f9fabf000)
        libboost_system.so.1.64.0 => 
/home/wesm/cpp-toolchain/lib/libboost_system.so.1.64.0 (0x00007f2f9f8bc000)
        libboost_filesystem.so.1.64.0 => 
/home/wesm/cpp-toolchain/lib/libboost_filesystem.so.1.64.0 (0x00007f2f9f6a4000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 
(0x00007f2f9f391000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2f9f08b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 
(0x00007f2f9ee74000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f9eaab000)
        /lib64/ld-linux-x86-64.so.2 (0x00005617c7d1a000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2f9e8a3000)
{code}

If you would like to reproduce, you can run (though I haven't tested this, if 
it doesn't work I'll fix it for you)

{code}
wget -O miniconda.sh 
https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh

MINICONDA=$HOME/test_miniconda
bash miniconda.sh -b -p $MINICONDA
export PATH=$MINICONDA/bin:$PATH

export TOOLCHAIN=$HOME/cpp-toolchain
conda create -p  boost-cpp
export LD_LIBRARY_PATH=$TOOLCHAIN/lib:$LD_LIBRARY_PATH
export BOOST_ROOT=$TOOLCHAIN
{code}

> [GLib] Provide environment variable to configure toolchain boost
> ----------------------------------------------------------------
>
>                 Key: ARROW-1048
>                 URL: https://issues.apache.org/jira/browse/ARROW-1048
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: GLib
>    Affects Versions: 0.4.0
>            Reporter: Wes McKinney
>
> If user is developing Arrow C++ using {{$BOOST_ROOT}} for CMake, GLib will 
> use the system Boost if it is installed, causing linker errors (I have run 
> into this when creating source releases). We should provide a way to use the 
> same toolchain dependencies when compiling arrow-glib as well



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to