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

chendan edited comment on ARROW-17265 at 8/2/22 12:29 PM:
----------------------------------------------------------

[~rokm] 

Thanks! I did cmake command successfully in X86 platform. Then I did compiling 
with ARMv8 c compiler. After I set the c compiler and cxx compiler to be my own 
arm complier and did cmake,  an error occured:

Error: unknown architecture `nocona'

I know that the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS should be set in cmake 
command. When I set it, the cmake is succuessful with armv8 cross compier.

Then I run "make -j4". It was failed:

(pyarrow-dev) [root@localhost build]# make -j4
[  0%] Built target toolchain
[  0%] Performing configure step for 'jemalloc_ep'
[  4%] Built target arrow_dataset_objlib
CMake Error at 
/root/build/arrow/cpp/build/jemalloc_ep-prefix/src/jemalloc_ep-stamp/jemalloc_ep-configure-DEBUG.cmake:37
 (message):
  Command failed: 77

   './configure' 
'AR=/opt/aarch64-kedacom-linux/bin/aarch64-kedacom-linux-gnu-ar' 
'CC=/opt/aarch64-kedacom-linux/bin/aarch64-kedacom-linux-gnu-gcc' 
'--prefix=/root/build/arrow/cpp/build/jemalloc_ep-prefix/src/jemalloc_ep/dist/' 
'--with-jemalloc-prefix=je_arrow_' '--with-private-namespace=je_arrow_private_' 
'--without-export' '--disable-shared' '--disable-cxx' '--disable-libdl' 
'--disable-initial-exec-tls'

  See also

    
/root/build/arrow/cpp/build/jemalloc_ep-prefix/src/jemalloc_ep-stamp/jemalloc_ep-configure-*.log


-- stdout output is:
checking for xsltproc... /usr/bin/xsltproc
1
checking for x86_64-conda-linux-gnu-gcc... 2
/opt/aarch64-kedacom-linux/bin/aarch64-kedacom-linux-gnu-gcc
write conftest
checking whether the C compiler works... no

-- stderr output is:
configure: error: in 
`/root/build/arrow/cpp/build/jemalloc_ep-prefix/src/jemalloc_ep':
configure: error: C compiler cannot create executables
See `config.log' for more details

CMake Error at 
/root/build/arrow/cpp/build/jemalloc_ep-prefix/src/jemalloc_ep-stamp/jemalloc_ep-configure-DEBUG.cmake:47
 (message):
  Stopping after outputting logs.


make[2]: *** [CMakeFiles/jemalloc_ep.dir/build.make:92: 
jemalloc_ep-prefix/src/jemalloc_ep-stamp/jemalloc_ep-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:725: CMakeFiles/jemalloc_ep.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I checked the configure file, the checking command is : $CC -o 
conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5. There 
should be some error in these variable. I add "echo" into the configure file. 
The CC is right. The CFLAGS is wrong:

-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong 
-fno-plt -O2 -ffunction-sections -pipe -isystem 
/root/anaconda3/envs/pyarrow-dev/include

The "-march=nocona -mtune=haswell " is wrong again for my arm cross compiler. 
How to set it correctly for the whole "make -j4" command? What kind of config 
parameters should be set?

Thanks!


was (Author: JIRAUSER283005):
[~rokm] 

Thanks! I did cmake command successfully in X86 platform. Then I did compiling 
with ARMv8 c compiler. After I set the c compiler and cxx compiler to be my own 
arm complier and did cmake,  an error occured:

I did not know where did this "nocona" come from. I grep the string "nocona" in 
the whole arrow folder and did not find out where to set it. It seems that the 
"-march" was set in cmake_modules/SetupCxxFlags.cmake, but after set it to be 
armv8-a in this cmake file the error still occured.

And same error for "haswell" as well.

 

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /opt/aarch64-kedacom-linux/bin/aarch64-kedacom-linux-gnu-gcc 
Build flags: 
-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/root/anaconda3/envs/pyarrow-dev/include
Id flags:  

The output was:
1
Assembler messages:
Error: unknown architecture `nocona'

Error: unrecognized option -march=nocona
cc1: error: unknown value ‘nocona’ for -march
cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a
cc1: error: unknown value ‘haswell’ for -mtune
cc1: note: valid arguments are: cortex-a35 cortex-a53 cortex-a57 cortex-a72 
cortex-a73 thunderx thunderxt88p1 thunderxt88 thunderxt81 thunderxt83 xgene1 
falkor qdf24xx exynos-m1 thunderx2t99p1 vulcan thunderx2t99 cortex-a55 
cortex-a75 saphira cortex-a57.cortex-a53 cortex-a72.cortex-a53 
cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 generic


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /opt/aarch64-kedacom-linux/bin/aarch64-kedacom-linux-gnu-gcc 
Build flags: 
-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/root/anaconda3/envs/pyarrow-dev/include
Id flags: -c 

The output was:
1
Assembler messages:
Error: unknown architecture `nocona'

 

 

> build python lib failed on both X86 and ARMv8
> ---------------------------------------------
>
>                 Key: ARROW-17265
>                 URL: https://issues.apache.org/jira/browse/ARROW-17265
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 2.0.0, 8.0.0
>         Environment: os: centos 7.9
> CPU: X86_64
>            Reporter: chendan
>            Priority: Critical
>              Labels: RedHat
>         Attachments: CMakeError.log, CMakeOutput-1.log, CMakeOutput.log
>
>
> I want to build pyarrow lib in ARM platform. I download pyarrow source code 
> version 8.0.0 and run "python setup.py install". An error occur:
> Using ld linker
> Configured for RELEASE build (set with cmake 
> -DCMAKE_BUILD_TYPE=\{release,debug,...})
> -- Build Type: RELEASE
> -- Generator: Unix Makefiles
> -- Build output directory: 
> /root/build/pyarrow-8.0.0/build/temp.linux-x86_64-3.6/release
> -- Found Python3: /root/anaconda3/envs/py36test/bin/python (found version 
> "3.6.13") found components: Interpreter Development.Module NumPy 
> -- Found Python3Alt: /root/anaconda3/envs/py36test/bin/python  
> -- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") 
> -- Could NOT find Arrow (missing: Arrow_DIR)
> -- Checking for module 'arrow'
> --   No package 'arrow' found
> CMake Error at 
> /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 
> (message):
>   Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR
>   ARROW_FULL_SO_VERSION ARROW_SO_VERSION)
> Call Stack (most recent call first):
>   /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 
> (_FPHSA_FAILURE_MESSAGE)
>   cmake_modules/FindArrow.cmake:450 (find_package_handle_standard_args)
>   cmake_modules/FindArrowPython.cmake:46 (find_package)
>   CMakeLists.txt:231 (find_package)
> -- Configuring incomplete, errors occurred!
>  
> This error always occur no matter what version I choose(pyarrow 8.0.0 or 
> 2.0.0) and no matter what platform (X86 or ARM c complier) I choose. When I 
> downloaded arrow source code and enter python folder and run "python setup.py 
> install" the same error occur.
> It seems that it's an bug on cmake files. I could not build python lib for my 
> ARM plarform.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to