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

Build errors with gcc 10 #105

Open
robegan21 opened this issue Sep 9, 2021 · 2 comments
Open

Build errors with gcc 10 #105

robegan21 opened this issue Sep 9, 2021 · 2 comments

Comments

@robegan21
Copy link

Posting this in relation to supporting users running HipMer which requires Berkeley UPC to use the Clang UPC2C translator.

3.9.1-1 builds and works fine with gcc 7.5, but fails with some newer versions, I chose 10.3.0 to demonstrate.
In both builds there are a ton of warnings, but it actually errors with 10.3.0:

/usr/bin/g++-10 -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/dev/shm/bupc-regan-hipmer-builds/build_clangupc/tools/lli -I/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/tools/lli -I/dev/shm/bupc-regan-hipmer-builds/build_clangupc/include -I/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -o CMakeFiles/lli.dir/lli.cpp.o -c /dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/tools/lli/lli.cpp
In file included from /dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include/llvm/CodeGen/LinkAllCodegenComponents.h:20,
from /dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/tools/lli/lli.cpp:22:
/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include/llvm/CodeGen/SchedulerRegistry.h: In constructor ‘llvm::RegisterScheduler::RegisterScheduler(const char*, const char*, llvm::RegisterScheduler::FunctionPassCtor)’:
/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include/llvm/CodeGen/SchedulerRegistry.h:42:35: warning: cast between incompatible function types from ‘llvm::RegisterScheduler::FunctionPassCtor’ {aka ‘llvm::ScheduleDAGSDNodes* ()(llvm::SelectionDAGISel, llvm::CodeGenOpt::Level)’} to ‘llvm::MachinePassCtor’ {aka ‘void* ()()’} [-Wcast-function-type]
42 | : MachinePassRegistryNode(N, D, (MachinePassCtor)C)
| ^~~~~~~~~~~~~~~~~~
In file included from /dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/tools/lli/lli.cpp:30:
/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h: In member function ‘llvm::Expected<std::vector > llvm::orc::remote::OrcRemoteTargetClient::readMem(char
, llvm::JITTargetAddress, uint64_t)’:
/dev/shm/bupc-regan-hipmer-builds/clang-upc-3.9.1-1/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h:696:26: error: could not convert ‘((llvm::orc::remote::OrcRemoteTargetClient*)this)->callBllvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem(Src, Size)’ from ‘Expected<vector<unsigned char,allocator>>’ to ‘Expected<vector<char,allocator>>’
696 | return callB(Src, Size);
| ~~~~~~~~~~~~~~^~~~~~~~~~~
| |
| Expected<vector<unsigned char,allocator>>

@Ghepardo
Copy link

Ghepardo commented Jan 6, 2022

I too have this problem, and I also need clang-upc for HipMer. The HipMer helper script for this uses the following CMake options:

-DCMAKE_INSTALL_PREFIX:PATH=(install destination) -DLLVM_TARGETS_TO_BUILD:=host -DCMAKE_BUILD_TYPE:=Release

I tried GCC 11.2.0, GCC 9.3.0 and GCC 8.2.0, all with similar results to @robegan21 .

I did a successful build using GCC 7.3.0-2.30 and CMake 3.12.1 (as provided by EasyBuild). There is still "a ton of warnings", but at least it completes.

Is this fork still maintained?

@PHHargrove
Copy link
Collaborator

@Ghepardo
Our team is currently in the process of completing the paperwork that will enable us to take over maintenance of this project. I don't have a concrete time estimate, but a release that builds with modern versions of GCC and Clang should appear soon after those formalities are completed.

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

3 participants