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

Cannot configure on macOS with GCC. #1556

Open
Jhuighuy opened this issue Nov 11, 2024 · 0 comments
Open

Cannot configure on macOS with GCC. #1556

Jhuighuy opened this issue Nov 11, 2024 · 0 comments
Labels

Comments

@Jhuighuy
Copy link

Jhuighuy commented Nov 11, 2024

Summary

Hi everyone,

I cannot compile the latest oneTBB on macOS using g++ as the compiler. The issues comes from the gas version identification, but the assembler is not gas (but the LLVM one), so, the version string cannot be parsed correctly.

Version

master branch (commit d1d43adf6af117d3ab4ee3a14a5fa129e0690290).

Environment

  • Hardware: Mac with Apple Silicone.
  • OS name and version: macOS 15.1, g++-14 from Homebrew.
  • Compiler version: Homebrew GCC 14.2.0_1 (the latest GCC from Homebrew, however, this is not imporant).

Observed Behavior

~/oneTBB (master) » CXX=g++-14 cmake .                                                                                                                                                  -- The CXX compiler identification is GNU 14.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/bin/g++-14 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE is not specified. Using default: RelWithDebInfo
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for one of the modules 'hwloc'
-- Looking for getcontext
-- Looking for getcontext - found
-- IPO enabled
CMake Error at cmake/compilers/GNU.cmake:65 (math):
  math cannot parse the expression: "Apple clang version 16.0.0
  (clang-1600.0.26.4)

  Target: arm64-apple-darwin24.1.0

  Thread model: posix

  InstalledDir: /Library/Developer/CommandLineTools/usr/bin

   "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1as -triple arm64-apple-macosx15.0.0 -target-sdk-version=15.1 -filetype obj -main-file-name ccXJeF1z.s -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -fdebug-compilation-dir=/Users/jhuighuy/oneTBB -dwarf-debug-producer "Apple clang version 16.0.0 (clang-1600.0.26.4)" -dwarf-version=5 -mrelocation-model pic -o /dev/null /var/folders/z2/7_mr1_kx70gbtk522gjh56700000gn/T//ccXJeF1z.s * 1000 + Apple clang version 16.0.0 (clang-1600.0.26.4)

  Target: arm64-apple-darwin24.1.0

  Thread model: posix

  InstalledDir: /Library/Developer/CommandLineTools/usr/bin

   "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1as -triple arm64-apple-macosx15.0.0 -target-sdk-version=15.1 -filetype obj -main-file-name ccXJeF1z.s -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -fdebug-compilation-dir=/Users/jhuighuy/oneTBB -dwarf-debug-producer "Apple clang version 16.0.0 (clang-1600.0.26.4)" -dwarf-version=5 -mrelocation-model pic -o /dev/null /var/folders/z2/7_mr1_kx70gbtk522gjh56700000gn/T//ccXJeF1z.s": syntax error, unexpected exp_NUMBER, expecting end of file (25).
Call Stack (most recent call first):
  CMakeLists.txt:252 (include)


-- GNU Assembler version: Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1as -triple arm64-apple-macosx15.0.0 -target-sdk-version=15.1 -filetype obj -main-file-name ccXJeF1z.s -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -fdebug-compilation-dir=/Users/jhuighuy/oneTBB -dwarf-debug-producer "Apple clang version 16.0.0 (clang-1600.0.26.4)" -dwarf-version=5 -mrelocation-model pic -o /dev/null /var/folders/z2/7_mr1_kx70gbtk522gjh56700000gn/T//ccXJeF1z.s.Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1as -triple arm64-apple-macosx15.0.0 -target-sdk-version=15.1 -filetype obj -main-file-name ccXJeF1z.s -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -fdebug-compilation-dir=/Users/jhuighuy/oneTBB -dwarf-debug-producer "Apple clang version 16.0.0 (clang-1600.0.26.4)" -dwarf-version=5 -mrelocation-model pic -o /dev/null /var/folders/z2/7_mr1_kx70gbtk522gjh56700000gn/T//ccXJeF1z.s  (ERROR)
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created
-- HWLOC target HWLOC::hwloc_2 doesn't exist. The tbbbind_2_0 target cannot be created
-- HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created
-- Performing Test LINKER_HAS_NO_AS_NEEDED
-- Performing Test LINKER_HAS_NO_AS_NEEDED - Failed
-- Configuring incomplete, errors occurred!

Expected Behavior

oneTBB to configure and compile 😄 .

I can suggest adding a CI pipeline for macOS and GCC.

Steps To Reproduce

$ brew install gcc
$ git clone https://github.com/oneapi-src/oneTBB 
$ cd oneTBB 
$ CXX=g++-14 cmake . 
$ # or cmake -DCMAKE_CXX_COMPILER=g++-14 .
@Jhuighuy Jhuighuy added the bug label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant