intel / llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Other
1.26k stars 741 forks source link

python3 %DPCPP_HOME%\llvm\buildbot\compile.py failed in ubuntu arm64 #13319

Open adi-lb-phoenix opened 7 months ago

adi-lb-phoenix commented 7 months ago

Describe the bug

Thank you for building and maintaining this repo as it will help me in learning parallel programming . I followed the guide of installing dpc++ from https://intel.github.io/llvm-docs/GetStartedGuide.html#create-dpc-workspace I have run this in a ubuntu arm_64 machine installed in UTM (https://mac.getutm.app/) which is installed in a macbook pro m1 with chip Apple M1 and macOS ventura 13.1

here is some more info about the ubuntu virtual machine

uname -a
Linux phoenix 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 19:16:50 UTC 2 aarch64 aarch64 aarch64 GNU/Linux ```

the following code execute with no issues 
export DPCPP_HOME=~/sycl_workspace
mkdir $DPCPP_HOME
cd $DPCPP_HOME

git clone https://github.com/intel/llvm -b sycl 

the next command executed with no issues . 
~/sycl_workspace$  python $DPCPP_HOME/llvm/buildbot/configure.py --cmake-gen "Unix Makefiles" 

the next command is where I get the error 
~/sycl_workspace$ python3 /home/phoenix/sycl_workspace/llvm/buildbot/compile.py -j 3

the error displayed is error: unknown target triple 'unknown' In file included from /home/phoenix/sycl_workspace/llvm/build/./lib/libdevice/imf_bf16_fallback.cpp:10: In file included from /home/phoenix/sycl_workspace/llvm/libdevice/imf/../device_imf.hpp:13: In file included from /home/phoenix/sycl_workspace/llvm/libdevice/imf/../imf_bf16.hpp:13: /home/phoenix/sycl_workspace/llvm/libdevice/imf/../imf_impl_utils.hpp:12:10: fatal error: 'cstddef' file not found 12 | #include | ^~~~~ 2 errors generated. gmake[3]: [tools/libdevice/CMakeFiles/imf_fallback_bf16_spv.dir/build.make:77: lib/libsycl-fallback-imf-bf16.spv] Error 1 gmake[2]: [CMakeFiles/Makefile2:106775: tools/libdevice/CMakeFiles/imf_fallback_bf16_spv.dir/all] Error 2 gmake[2]: Waiting for unfinished jobs.... [ 96%] Built target sycl-preview_object [ 98%] Built target sycl_object gmake[1]: [CMakeFiles/Makefile2:100044: tools/sycl/CMakeFiles/deploy-sycl-toolchain.dir/rule] Error 2 gmake: *** [Makefile:21900: deploy-sycl-toolchain] Error 2 Traceback (most recent call last): File "/home/phoenix/sycl_workspace/llvm/buildbot/compile.py", line 71, in ret = main() File "/home/phoenix/sycl_workspace/llvm/buildbot/compile.py", line 67, in main return do_compile(args) File "/home/phoenix/sycl_workspace/llvm/buildbot/compile.py", line 42, in do_compile subprocess.check_call(cmake_cmd, cwd=abs_obj_dir) File "/usr/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '/home/phoenix/sycl_workspace/llvm/build', '--', 'deploy-sycl-toolchain', '-j', '3']' returned non-zero exit status 2.

I have also run the command : sudo apt install libstdc++-12-dev

after this I ran the command , ~/sycl_workspace$ python3 /home/phoenix/sycl_workspace/llvm/buildbot/compile.py -j 3 I happened to get the same error as displayed above

To reproduce

export DPCPP_HOME=~/sycl_workspace

mkdir $DPCPP_HOME

cd $DPCPP_HOME

git clone https://github.com/intel/llvm -b sycl

~/sycl_workspace$ python3 /home/phoenix/sycl_workspace/llvm/buildbot/compile.py -j 3 

~/sycl_workspace$  python $DPCPP_HOME/llvm/buildbot/configure.py --cmake-gen "Unix Makefiles" 

Environment


uname -a
Linux phoenix 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 19:16:50 UTC 2 aarch64 aarch64 aarch64 GNU/Linux ```

### Additional context

this system is ubuntu 22.04 arm_64 version run in an UMT (https://mac.getutm.app/) virtual machine using virtualization on apple mac book pro m1 with CHIP : Apple M1 and macOS version : Ventura 13.1 
steffenlarsen commented 6 months ago

Hi @adi-lb-phoenix ! Could you please share which C++ compiler and its version is being use to build the sources? It should appear as CMAKE_CXX_COMPILER in the CMakeCache.txt in the build folder.

dm-vodopyanov commented 4 months ago

Hello @adi-lb-phoenix, is the issue still actual for you? If yes, could you please provide the the info above? If not, can the issue be closed?