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

[Documantation] Invalid C++ compiler version stated in GetStartedGuide.md #10796

Closed
artemrad opened this issue Aug 11, 2023 · 2 comments · Fixed by #10783
Closed

[Documantation] Invalid C++ compiler version stated in GetStartedGuide.md #10796

artemrad opened this issue Aug 11, 2023 · 2 comments · Fixed by #10783
Labels
bug Something isn't working

Comments

@artemrad
Copy link
Contributor

Describe the bug
The GetStartedGuide.md states that the minimal perquisite C++ compiler required to compile the project from source is the same compiler as host compiler toolchain requirements, which states gcc 7.1.

Compiling the project with gcc 7.2.0 produces weird errors such as the one below...

[113/3063] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o 
/p/psg/ctools/gcc/7.2.0/1/linux64/bin/g++ -DENABLE_OPAQUE_POINTERS=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/build/lib/Support -I/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/lib/Support -I/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/build/include -I/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++1z -UNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o -c /nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/lib/Support/Process.cpp
In file included from /nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/lib/Support/Process.cpp:107:0:
/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/lib/Support/Unix/Process.inc: In static member function ‘static std::error_code llvm::sys::Process::FixupStandardFileDescriptors()’:
/nfs/site/disks/swuser_work_aradzikh/external/llvm-intel/llvm/lib/Support/Unix/Process.inc:211:54: error: invalid initialization of reference of type ‘int (&)(int, stat*) noexcept’ from expression of type ‘int(int, stat*) noexcept’
     if (RetryAfterSignal(-1, ::fstat, StandardFD, &st) < 0) {

Compiling with gcc 12.2.0 does not produce any of these errors. Where in between the two versions is the actual minimal supported compiler, I do not know, but the one that is documented is definitely wrong.

Please also add into the instructions on how to specify the path to the C++ compiler, if it doesn't happen to be in the default OS location. I had to modify the buildbot/configure.py file to add the following lines, in order to convince cmake to use the right compiler.

        "-DCMAKE_C_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/gcc",
        "-DCMAKE_CXX_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/g++",

Thank you :)

@artemrad artemrad added the bug Something isn't working label Aug 11, 2023
@bader
Copy link
Contributor

bader commented Aug 16, 2023

The GetStartedGuide.md states that the minimal perquisite C++ compiler required to compile the project from source is the same compiler as host compiler toolchain requirements, which states gcc 7.1.

@artemrad the statement is still correct. You found a bug in llvm-project, which is not related to SYCL. It was also discussed here: https://discourse.llvm.org/t/require-gcc-7-4-as-gcc-7-3-cannot-build-llvm-16-x-or-main/72310 and fixed by 1e06b82. This commit will be merged to the sycl branch with #10783.

@bader bader linked a pull request Aug 16, 2023 that will close this issue
@bader
Copy link
Contributor

bader commented Aug 16, 2023

Please also add into the instructions on how to specify the path to the C++ compiler, if it doesn't happen to be in the default OS location. I had to modify the buildbot/configure.py file to add the following lines, in order to convince cmake to use the right compiler.

        "-DCMAKE_C_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/gcc",
        "-DCMAKE_CXX_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/g++",

You can pass addition CMake options via

  --cmake-opt CMAKE_OPT
                        Additional CMake option not configured via script parameters

For example: add following options to configure.py script --cmake-opt=-DCMAKE_C_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/gcc --cmake-opt=-DCMAKE_CXX_COMPILER=/p/psg/ctools/gcc/12.2.0/3/linux64/suse12/bin/g++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants