Skip to content

Conversation

@wesm
Copy link
Member

@wesm wesm commented Apr 18, 2017

Per feedback in bb8514c

…all everything in a single conda environment

Change-Id: I4a655e39df1c3ffe08864e6345f390a2dfd04213
```
export ARROW_BUILD_TYPE=release
export BOOST_ROOT=$CONDA_PREFIX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely should invest into getting all those variables into a single one. Better would be even that we could detect if we're in a conda env and try to prefer the libraries installed there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could e.g. just try and search first for all dependencies in $CMAKE_INSTALL_PREFIX

Copy link
Member Author

@wesm wesm Apr 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we had an $ARROW_BUILD_TOOLCHAIN that automatically set all of the *_HOME variables?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is in scope I would hope for :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see ARROW-849 and PARQUET-957

Change-Id: Ib38249c4a85ed414ef4a9c669c3d5aaa488339fc
@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

I can reproduce @mrocklin problem on a fresh Ubuntu 17.04 installation: https://gist.github.com/xhochy/7bb0e4d47cbe25b6d79a3d6b1db7a9ea

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

Using these latest instructions?

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

Yes, made a JIRA about this as I probably don't have time today to fix it: https://issues.apache.org/jira/browse/ARROW-850

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

If you build with ARROW_BOOST_USE_SHARED=on do things work in this environment? I can set up a VM later to try it out myself

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

This leads to another problem (C++ ABI mismatch): https://gist.github.com/xhochy/01d0a8cbbea3f38cbb85dbb70a5ec2a5

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

Right, you can't use gcc >= 5 with the conda-forge stack (unless you disable the gcc5 ABI), so we'll need to include instructions to either install gcc 4.9 on newer Linuxes or add compiler flags.

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

cmake -DARROW_BOOST_USE_SHARED=on CMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" did the trick.

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

I was using gcc-5 before but on an older Ubuntu version that by default was using the old ABI. The new Ubuntu release switched the default ABI.

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

excellent intel, thanks @xhochy!

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

In my setup, this still needs export LD_LIBRARY_PATH=$CONDA_PREFIX/lib

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

JIRA for the CXX ABI: https://issues.apache.org/jira/browse/ARROW-851

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

@xhochy at what point do you need the LD_LIBRARY_PATH?

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

For running the tests in pyarrow.

@wesm
Copy link
Member Author

wesm commented Apr 18, 2017

Very odd. And the conda environment is activated?

@xhochy
Copy link
Member

xhochy commented Apr 18, 2017

Yes

Change-Id: I964df5aab950061326119fb4672da721afff3382
@wesm
Copy link
Member Author

wesm commented Apr 19, 2017

@xhochy I figured out the problem -- after the libarrow_python refactor, for conda-based setups, we do not need to modify the Cython module RPATH. I think you still need to do this for manylinux1 builds. I found that removing

    if(APPLE)
        set(module_install_rpath "@loader_path")
    else()
        set(module_install_rpath "\$ORIGIN")
    endif()
    list(LENGTH directories i)
    while(${i} GREATER 0)
        set(module_install_rpath "${module_install_rpath}/..")
        math(EXPR i "${i} - 1" )
    endwhile(${i} GREATER 0)

    set_target_properties(${module_name} PROPERTIES
      INSTALL_RPATH ${module_install_rpath})

solved the problem. I'm opening a new JIRA about this

asfgit pushed a commit that referenced this pull request Apr 19, 2017
See discussion in #562. Modifying RPATH is no longer needed when libarrow/libarrow_python are installed someplace else in the loader path.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #564 from wesm/ARROW-853 and squashes the following commits:

262f43a [Wes McKinney] Only set RPATH when bundling the shared libraries
conda create -y -q -p $CPP_TOOLCHAIN \
flatbuffers rapidjson boost-cpp thrift-cpp snappy zlib brotli jemalloc
```shell
export CC=gcc-4.9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be export CC=$(which gcc-4.9)? (and same for CXX)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either work, but I'll change to the more explicit variety.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output of $(which FOO) doesn't produce an executable command for me when FOO is found multiple times in the path. I'll leave this as is for now

$ which gcc
gcc is /home/wesm/.conda/envs/$NAME/bin/gcc
gcc is /usr/bin/gcc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

-DCMAKE_INSTALL_PREFIX=$CPP_TOOLCHAIN \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DARROW_PYTHON=on \
-DARROW_BUILD_TESTS=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit: Maybe make the case consistent here.

export ARROW_BUILD_TYPE=release
export BOOST_ROOT=$CONDA_PREFIX
export BOOST_LIBRARYDIR=$CONDA_PREFIX/lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this need to be lib64 when the system is 64 bit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.

@wesm
Copy link
Member Author

wesm commented Apr 19, 2017

+1. We can improve after adding the *_TOOLCHAIN variables

@asfgit asfgit closed this in 391242a Apr 19, 2017
@wesm wesm deleted the conda-quickstart-iterate branch April 19, 2017 19:49
jeffknupp pushed a commit to jeffknupp/arrow that referenced this pull request Jun 3, 2017
See discussion in apache#562. Modifying RPATH is no longer needed when libarrow/libarrow_python are installed someplace else in the loader path.

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#564 from wesm/ARROW-853 and squashes the following commits:

262f43a [Wes McKinney] Only set RPATH when bundling the shared libraries
jeffknupp pushed a commit to jeffknupp/arrow that referenced this pull request Jun 3, 2017
Per feedback in apache@bb8514c

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes apache#562 from wesm/conda-quickstart-iterate and squashes the following commits:

881a44d [Wes McKinney] Add system requirements notes about gcc 4.9, use boost shared libs
8c95705 [Wes McKinney] Install cmake in conda env
8c2885e [Wes McKinney] Another pass on conda dev guide, do not require LD_LIBRARY_PATH. Install everything in a single conda environment
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…apache#562)

Bumps com.gradle:develocity-maven-extension from 1.23 to 1.23.1.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants