1

I am having the following issue when making HSAIL:

[  3%] Built target libhsail-includes
[  6%] Building CXX object libHSAIL/CMakeFiles/hsail.dir/HSAILScannerRules.cpp.o
In file included from /home/Computador/hsail/HSAIL-Tools-master/libHSAIL/HSAILScannerRules.cpp:46:0:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp: In member function ‘HSAIL_ASM::ETokens HSAIL_ASM::Scanner::scanModifier(HSAIL_ASM::EScanContext, HSAIL_ASM::Scanner::Token&)’:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp:271:17: error: unused variable ‘ctxMarker’ [-Werror=unused-variable]
 const char *ctxMarker = NULL;
             ^~~~~~~~~
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp: In member function ‘HSAIL_ASM::ETokens HSAIL_ASM::Scanner::scanDefault(HSAIL_ASM::EScanContext, HSAIL_ASM::Scanner::Token&)’:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp:14065:17: error: unused variable ‘ctxMarker’ [-Werror=unused-variable]
 const char *ctxMarker = NULL;
             ^~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [libHSAIL/CMakeFiles/hsail.dir/build.make:248: libHSAIL/CMakeFiles/hsail.dir/HSAILScannerRules.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: libHSAIL/CMakeFiles/hsail.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

with make executing the following the commands (make --just-print)

make CXXFLAGS+=-Wno-error=unused-variable -f HSAILAsm/CMakeFiles/HSAILasm.dir/build.make HSAILAsm/CMakeFiles/HSAILasm.dir/depend
cd /home/Computador/hsail/build && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Computador/hsail/HSAIL-Tools-master /home/Computador/hsail/HSAIL-Tools-master/HSAILAsm /home/Computador/hsail/build /home/Computador/hsail/build/HSAILAsm /home/Computador/hsail/build/HSAILAsm/CMakeFiles/HSAILasm.dir/DependInfo.cmake --color=
make CXXFLAGS+=-Wno-error=unused-variable -f HSAILAsm/CMakeFiles/HSAILasm.dir/build.make HSAILAsm/CMakeFiles/HSAILasm.dir/build
/usr/bin/cmake.exe -E cmake_echo_color --switch= --green --progress-dir=/home/Computador/hsail/build/CMakeFiles --progress-num=1 "Building CXX object HSAILAsm/CMakeFiles/HSAILasm.dir/HSAILAsm.cpp.o"
cd /home/Computador/hsail/build/HSAILAsm && /usr/bin/c++.exe  -DAMD_EXTENSIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/Computador/hsail/HSAIL-Tools-master/libHSAIL -I/home/Computador/hsail/build/libHSAIL/generated -I/home/Computador/hsail/HSAIL-Tools-master/libHSAIL-AMD -I/home/Computador/hsail/build/libHSAIL-AMD/generated  -fpic -Wall -Werror -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden -o CMakeFiles/HSAILasm.dir/HSAILAsm.cpp.o -c /home/Computador/hsail/HSAIL-Tools-master/HSAILAsm/HSAILAsm.cpp

I already know, I can pass the command -Wno-error=unused-variable, to disable the error, probably mostly used for the developer and uselles for me but just passing it with CXXFLAGS on the makefile, it includes it on all make commands executed and probably to GCC -- By the way on the makefile I included it just before the last make commands before the errors given on build.make (from where the error advances to other makefiles) -- but when it executes the program c++.exe, you can see that it does not present the -Wno-error I am trying to pass. How Should I pass it to the c++.exe program successfuly. It is c++.exe because I am under cygwin

  • Guess: Add $(CXXFLAGS) to the line in your Makefile which invokes c++. bin. To avoid guesses: edit your question to include the Makefile. – rici Jul 23 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.