[ https://issues.apache.org/jira/browse/ARROW-1661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462745#comment-16462745 ]
Antoine Pitrou commented on ARROW-1661: --------------------------------------- I ran into linking issues while trying to compile Arrow against a self-compiled Python 3.7: {code} [3/3] Linking CXX executable debug/python-test FAILED: : && /usr/bin/ccache /usr/bin/c++ -ggdb -O0 -Wall -std=c++11 -msse3 -g src/arrow/python/CMakeFiles/python-test.dir/python-test.cc.o -o debug/python-test -rdynamic debug/libarrow_python_test_main.a debug/libarrow_python.so.10.0.0 debug/libarrow.so.10.0.0 /home/antoine/cpython/37/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a googletest_ep-prefix/src/googletest_ep/lib/libgtest.a -lpthread -ldl zstd_ep-prefix/src/zstd_ep/lib/libzstd.a zlib_ep/src/zlib_ep-install/lib/libz.a snappy_ep/src/snappy_ep-install/lib/libsnappy.a lz4_ep-prefix/src/lz4_ep/lib/liblz4.a brotli_ep/src/brotli_ep-install/lib/x86_64-linux-gnu/libbrotlidec.a brotli_ep/src/brotli_ep-install/lib/x86_64-linux-gnu/libbrotlienc.a brotli_ep/src/brotli_ep-install/lib/x86_64-linux-gnu/libbrotlicommon.a -lpthread -Wl,-rpath,/home/antoine/t/ttarrow/cpp/build/debug:/home/antoine/miniconda3/envs/pyarrow/lib -Wl,-rpath-link,/home/antoine/miniconda3/envs/pyarrow/lib && : /home/antoine/cpython/37/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a(posixmodule.o): In function `os_openpty_impl': /home/antoine/cpython/37/./Modules/posixmodule.c:6140: undefined reference to `openpty' /home/antoine/cpython/37/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a(posixmodule.o): In function `os_forkpty_impl': /home/antoine/cpython/37/./Modules/posixmodule.c:6234: undefined reference to `forkpty' {code} The problem here is that Python needs to link against {{libutil}} on Linux. This can be queried using the {{sysconfig}} module: {code} >>> sysconfig.get_config_var('LIBS') '-lpthread -ldl -lutil' >>> sysconfig.get_config_var('SHLIBS') '-lpthread -ldl -lutil' {code} However we need to turn those command-line arguments into library arguments for CMake. Just passing the linker flags to the {{ADD_ARROW_LIB}} call doesn't seem to work. > [Python] Compile and test with Python 3.7 > ----------------------------------------- > > Key: ARROW-1661 > URL: https://issues.apache.org/jira/browse/ARROW-1661 > Project: Apache Arrow > Issue Type: Bug > Components: Python > Reporter: Wes McKinney > Priority: Major > Labels: pull-request-available > Fix For: 0.10.0 > > > See discussion in https://github.com/apache/arrow/issues/1125 -- This message was sent by Atlassian JIRA (v7.6.3#76005)