arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Centos7 Build error

Open g302ge opened this issue 1 year ago • 2 comments

When I want to build the arrow using the command

plasma:
	mkdir -p dist
	mkdir -p cpp/build
	cd cpp/build && \
	cmake -DCMAKE_INSTALL_PREFIX=$(ARROW_HOME) \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DARROW_BUILD_TESTS=ON \
		-DARROW_CXXFLAGS="-ldl" \
		-DCMAKE_BUILD_TYPE=Debug \
		-DARROW_PLASMA=ON \
		-DARROW_PYTHON=ON \
		.. \
	&& make -j 8\
	&& make install

Before this command executing , I have installed the requirements-build.txt in python directory.

But I met this error from cmake

-- Creating bundled static library target arrow_bundled_dependencies at /root/bigquant/arrow/cpp/build/debug/libarrow_bundled_dependencies.a
CMake Error at /usr/local/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS Interpreter
  NumPy) (found suitable version "3.8.3", minimum required is "3.7")

      Reason given by package:
          Interpreter: Cannot run the interpreter "/usr/local/bin/python3"

Call Stack (most recent call first):
  /usr/local/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.24/Modules/FindPython/Support.cmake:3245 (find_package_handle_standard_args)
  /usr/local/share/cmake-3.24/Modules/FindPython3.cmake:490 (include)
  cmake_modules/FindPython3Alt.cmake:53 (find_package)
  src/arrow/python/CMakeLists.txt:22 (find_package)

How to fix it ?

thx for ur reply :)

g302ge avatar Oct 12 '22 11:10 g302ge

If you want to build the current HEAD from the repo be aware that we now require C++17, so you will need to install devtoolset and enable it prior to building. Here is an SO post explaining the cause (no solution though :()

assignUser avatar Oct 12 '22 13:10 assignUser

Could you show the output of the followings?

  • /usr/local/bin/python3 --version
  • /usr/local/bin/python3 -c 'import numpy; print(numpy.__version__)'

kou avatar Oct 12 '22 21:10 kou

On a different note and just for your information, as I see you are building with plasma, plasma is being deprecated in future releases: https://issues.apache.org/jira/browse/ARROW-17860

raulcd avatar Oct 13 '22 08:10 raulcd

If you want to build the current HEAD from the repo be aware that we now require C++17, so you will need to install devtoolset and enable it prior to building. Here is an SO post explaining the cause (no solution though :()

I have enable it before building

g302ge avatar Oct 13 '22 09:10 g302ge

  • /usr/local/bin/python3 --version

/usr/local/bin/python3 --version result is

Python 3.8.3

/usr/local/bin/python3 -c 'import numpy; print(numpy.version) result is

1.17.3

g302ge avatar Oct 13 '22 09:10 g302ge

Thanks. Could you also show the followings?

  • /usr/local/bin/python3 -c 'import numpy; print(numpy.get_include())'
  • ls -lR $(/usr/local/bin/python3 -c 'import numpy; print(numpy.get_include())')

kou avatar Oct 14 '22 00:10 kou

  • /usr/local/bin/python3 -c 'import numpy; print(numpy.get_include())'

the first result is

/usr/local/lib/python3.8/site-packages/numpy/core/include

and the second is

/usr/local/lib/python3.8/site-packages/numpy/core/include:
total 4
drwxr-xr-x 3 root root 4096 Oct 12 18:41 numpy

/usr/local/lib/python3.8/site-packages/numpy/core/include/numpy:
total 384
-rw-r--r-- 1 root root   164 Oct 12 18:41 arrayobject.h
-rw-r--r-- 1 root root  3509 Oct 12 18:41 arrayscalars.h
-rw-r--r-- 1 root root  1878 Oct 12 18:41 halffloat.h
-rw-r--r-- 1 root root 61098 Oct 12 18:41 __multiarray_api.h
-rw-r--r-- 1 root root 56456 Oct 12 18:41 multiarray_api.txt
-rw-r--r-- 1 root root 11496 Oct 12 18:41 ndarrayobject.h
-rw-r--r-- 1 root root 65018 Oct 12 18:41 ndarraytypes.h
-rw-r--r-- 1 root root  1861 Oct 12 18:41 _neighborhood_iterator_imp.h
-rw-r--r-- 1 root root  6786 Oct 12 18:41 noprefix.h
-rw-r--r-- 1 root root  4715 Oct 12 18:41 npy_1_7_deprecated_api.h
-rw-r--r-- 1 root root 14666 Oct 12 18:41 npy_3kcompat.h
-rw-r--r-- 1 root root 37899 Oct 12 18:41 npy_common.h
-rw-r--r-- 1 root root  3879 Oct 12 18:41 npy_cpu.h
-rw-r--r-- 1 root root  2596 Oct 12 18:41 npy_endian.h
-rw-r--r-- 1 root root  3439 Oct 12 18:41 npy_interrupt.h
-rw-r--r-- 1 root root 21014 Oct 12 18:41 npy_math.h
-rw-r--r-- 1 root root   567 Oct 12 18:41 npy_no_deprecated_api.h
-rw-r--r-- 1 root root   817 Oct 12 18:41 npy_os.h
-rw-r--r-- 1 root root  1010 Oct 12 18:41 _numpyconfig.h
-rw-r--r-- 1 root root  1207 Oct 12 18:41 numpyconfig.h
-rw-r--r-- 1 root root  6306 Oct 12 18:41 old_defines.h
-rw-r--r-- 1 root root   708 Oct 12 18:41 oldnumeric.h
drwxr-xr-x 2 root root    22 Oct 12 18:41 random
-rw-r--r-- 1 root root 12143 Oct 12 18:41 __ufunc_api.h
-rw-r--r-- 1 root root  6889 Oct 12 18:41 ufunc_api.txt
-rw-r--r-- 1 root root 13171 Oct 12 18:41 ufuncobject.h
-rw-r--r-- 1 root root   729 Oct 12 18:41 utils.h

g302ge avatar Oct 17 '22 11:10 g302ge

I have solve this problem over reinstall the python make altinstall . Thx for ur help and replies

g302ge avatar Oct 17 '22 11:10 g302ge