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

Error building ROCmBinaries.cpp #32

Closed
brentmsmith opened this issue Aug 26, 2020 · 6 comments
Closed

Error building ROCmBinaries.cpp #32

brentmsmith opened this issue Aug 26, 2020 · 6 comments

Comments

@brentmsmith
Copy link

The make build call gets to 20% then dies on building ROCmBinaries.cpp:

[ 20%] Building CXX object amdbin/CMakeFiles/CLRXAmdBin.dir/ROCmBinaries.cpp.o 
~/CLRX-mirror/amdbin/ROCmBinaries.cpp:128:29: error: call to 'ULEV'
      is ambiguous
                            ULEV(size_t(sym.st_value)) });                     
                            ^~~~
~/CLRX-mirror/CLRX/utils/MemAccess.h:94:16: note: candidate function
inline uint8_t ULEV(const uint8_t& t);
               ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:96:15: note: candidate function
inline int8_t ULEV(const int8_t& t);
              ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:232:16: note: candidate       
      function
inline uint8_t ULEV(uint8_t t)
               ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:235:15: note: candidate       
      function
inline int8_t ULEV(int8_t t)
              ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:455:17: note: candidate       
      function
inline uint16_t ULEV(const uint16_t& t)
                ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:458:16: note: candidate       
      function
inline int16_t ULEV(const int16_t& t)
               ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:492:17: note: candidate       
      function
inline uint32_t ULEV(const uint32_t& t)
                ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:495:16: note: candidate       
      function
inline int32_t ULEV(const int32_t& t)
               ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:499:17: note: candidate       
      function
inline uint64_t ULEV(const uint64_t& t)
                ^
~/CLRX-mirror/CLRX/utils/MemAccess.h:502:16: note: candidate       
      function
inline int64_t ULEV(const int64_t& t)
               ^
1 error generated.
make[2]: *** [amdbin/CMakeFiles/CLRXAmdBin.dir/ROCmBinaries.cpp.o] Error 1     
make[1]: *** [amdbin/CMakeFiles/CLRXAmdBin.dir/all] Error 2                    
make: *** [all] Error 2

using Make 3.81

@matszpk
Copy link
Member

matszpk commented Aug 27, 2020

I can't reproduce this error. Can you give me an operating system, a compiler and its version and a CPU?

@brentmsmith
Copy link
Author

Yes, thanks for your help:

OS: OS X 10.12.6, Darwin Kernel Version 16.7.0
Compiler:

Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix

CPU: Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

@matszpk
Copy link
Member

matszpk commented Aug 28, 2020

I committed some changes in ROCmBinaries in that line with issue. Maybe issue doesn't exists in latest commit. Please, report about it status.

@brentmsmith
Copy link
Author

Thanks @matszpk that issue did go away. Some others did come up though. Linking libCLRXAmdBin.dylib emits an undefined symobls error:

[ 51%] Linking CXX shared library libCLRXAmdBin.dylib
Undefined symbols for architecture x86_64:
  "std::__1::vector<CLRX::ROCmSymbolInput, std::__1::allocator<CLRX::ROCmSymbolInp
ut> >::~vector()", referenced from:
      CLRX::ROCmBinGenerator::ROCmBinGenerator(CLRX::GPUDeviceType, unsigned int, 
unsigned int, unsigned long, unsigned char const*, unsigned long, unsigned char co
nst*, std::__1::vector<CLRX::ROCmSymbolInput, std::__1::allocator<CLRX::ROCmSymbol
Input> > const&) in ROCmBinaries.cpp.o
      CLRX::ROCmBinGenerator::ROCmBinGenerator(CLRX::GPUDeviceType, unsigned int, 
unsigned int, unsigned long, unsigned char const*, unsigned long, unsigned char co
nst*, std::__1::vector<CLRX::ROCmSymbolInput, std::__1::allocator<CLRX::ROCmSymbol
Input> >&&) in ROCmBinaries.cpp.o
      CLRX::ROCmInput::~ROCmInput() in ROCmBinaries.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [amdbin/libCLRXAmdBin.0.1.9.dylib] Error 1
make[1]: *** [amdbin/CMakeFiles/CLRXAmdBin.dir/all] Error 2

Then the make run dies at 63% on CLRXAmdAsmStatic:

[ 63%] Linking CXX static library libCLRXAmdAsm.a
[ 63%] Built target CLRXAmdAsmStatic
make: *** [all] Error 2
[mac:~/CLRX-mirror/build] user% 

@matszpk
Copy link
Member

matszpk commented Sep 2, 2020

The building under Linux and Windows didn't report such errors. Some sources (nlohmann/json#285) suggest to change compiler from clang to clang++. Maybe that can help. To change compiler, use CXX environment variable (call CXX=clang++ cmake .. ...) or change in cmake-gui variable CMAKE_CXX_COMPILER.

@brentmsmith
Copy link
Author

Thanks @matszpk I think it didn't like using clang for the c compiler as well. I just used gcc 6.5 in both cases and it compiled without any complaints.

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