Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when trying to build with Intel compiler #3477

Closed
void-512 opened this issue May 10, 2024 · 2 comments
Closed

Problem when trying to build with Intel compiler #3477

void-512 opened this issue May 10, 2024 · 2 comments

Comments

@void-512
Copy link

Describe the bug
log.txt

To Reproduce

Added the following code in ./cmake/flags.cmake:

elseif (CMAKE_CXX_COMPILER_ID MATCHES Intel)

    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Ofast -mkl -march=native -mfma -Xclang -target-feature -Xclang +vaes")
    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast -mkl -march=native -mfma -Xclang -target-feature -Xclang +vaes")

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -mkl -march=native -mfma -Xclang -target-feature -Xclang +vaes")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -mkl -march=native -mfma -Xclang -target-feature -Xclang +vaes")

and use the following compile command:
cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx

Expected behavior
Should compile successfully

Required data

  • XMRig 6.21.3
  • OS: Ubuntu2404
@SChernykh
Copy link
Contributor

Intel compiler is not supported. Since you already started modifying CMake files, you should also add HAVE_ROTR check to flags.cmake

        check_symbol_exists("_rotr" "x86intrin.h" HAVE_ROTR)
        if (HAVE_ROTR)
            add_definitions(-DHAVE_ROTR)
        endif()

@void-512
Copy link
Author

Thank you, compiled successfully with HAVE_ROTR above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants