oneapi-src / oneapi-src/oneAPI-samples

cmake does not recognize icpx as a valid compiler

Đang mở
#1,343 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
C++
Star
1.2k
Fork
745
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Summary

when running cmake configuration stage, I get the follwing error:

master) tcohen@tcohen:build $ cmake ..
-- The CXX compiler identification is IntelLLVM 2023.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler

"/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/tcohen/code/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/simple-add/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_9dafe/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_9dafe.dir/build.make CMakeFiles/cmTC_9dafe.dir/build
gmake[1]: Entering directory '/home/tcohen/code/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/simple-add/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_9dafe.dir/testCXXCompiler.cxx.o
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx    -MD -MT CMakeFiles/cmTC_9dafe.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_9dafe.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_9dafe.dir/testCXXCompiler.cxx.o -c /home/tcohen/code/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/simple-add/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_9dafe
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9dafe.dir/link.txt --verbose=1
/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx CMakeFiles/cmTC_9dafe.dir/testCXXCompiler.cxx.o -o cmTC_9dafe 
/usr/bin/ld: cannot find -lstdc++: No such file or directory
icpx: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_9dafe.dir/build.make:100: cmTC_9dafe] Error 1
gmake[1]: Leaving directory '/home/tcohen/code/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/simple-add/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_9dafe/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:14 (project)

-- Configuring incomplete, errors occurred!

Version

Latest OneAPI toolkit and samples.

Environment

Ubuntu 22.04

Steps to reproduce

Install Tools kit according to Intel instructions:
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=aptpackagemanager

Download the samples and run cmake config stage.

Observed behavior

cmake config stage fails

Expected behavior

came config stage is successful.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với lệnh gọi project trong CMakeLists.txt ở dòng 14 và tái hiện cấu hình bằng icpx trên Ubuntu 22.04. Kiểm tra đầu ra kiểm thử trình biên dịch của CMake, bao gồm CMakeTestCXXCompiler.cmake và lỗi thiếu -lstdc++, để xác định tại sao thiết lập trình biên dịch này không thành công. Công việc được xem là hoàn tất khi cấu hình CMake của mẫu hoàn tất thành công với bản cài đặt oneAPI được ghi trong tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cmake, cpp
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.