Open mewmew opened 6 years ago
Additional info:
u@x220 ~/D/n/nupic_core_aur> gcc --version
gcc (GCC) 7.3.1 20180312
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
u@x220 ~/D/n/nupic_core_aur> clang --version
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Note, a comment states that throwing an exception from within the destructor is intended, even if "not good".
Output::~Output() {
// If we have any outgoing links, then there has been an
// error in the shutdown process. Not good to thow an exception
// from a destructor, but we need to catch this error, and it
// should never occur if nupic internal logic is correct.
NTA_CHECK(links_.size() == 0) << "Internal error in region deletion";
delete data_;
}
WIth -Wno-error=terminate
added, the build finishes successfully.
diff --git a/CommonCompilerConfig.cmake b/CommonCompilerConfig.cmake
index a2b2a534..05eed935 100644
--- a/CommonCompilerConfig.cmake
+++ b/CommonCompilerConfig.cmake
@@ -260,8 +260,8 @@ else()
endif()
set(shared_compile_flags "${shared_compile_flags} ${stdlib_common} -fdiagnostics-show-option")
- set (internal_compiler_warning_flags "${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers")
- set (external_compiler_warning_flags "${external_compiler_warning_flags} -Wno-unused-variable -Wno-unused-parameter -Wno-incompatible-pointer-types -Wno-deprecated-declarations")
+ set (internal_compiler_warning_flags "${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-error=terminate -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers")
+ set (external_compiler_warning_flags "${external_compiler_warning_flags} -Wno-error=terminate -Wno-unused-variable -Wno-unused-parameter -Wno-incompatible-pointer-types -Wno-deprecated-declarations")
CHECK_CXX_COMPILER_FLAG(-m${BITNESS} compiler_supports_machine_option)
if (compiler_supports_machine_option)
I don't know the history here. This has not been failing in any of our CI builds. What OS is this? I'm not sure adding this option is the right thing to do. @lscheinkman?
Hi Matthew,
I don't know the history here. This has not been failing in any of our CI builds. What OS is this? I'm not sure adding this option is the right thing to do. @lscheinkman?
My guess is that it has to do with never versions of GCC. My version of GCC outputs a warning (7.3.1 20180312
) since an exception is thrown in a destructor, and the build is set to treat warnings as errors; thus causing the build to fail.
As for OS, I'm running Arch Linux,
u@x220 ~> uname -a
Linux x220 4.15.15-1-ARCH #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018 x86_64 GNU/Linux
Let me know if you require any additional information.
Cheers /u
P.S. Thanks Matthew for putting the HTM school videos up on YouTube, they've been fun to follow.
I'll keep an eye out for GCC failures like this being reported. Thanks for writing this up.
Btw, duplicate of #1000
:-1: for the proposed fix with Wno-error=terminate
, the culpit is in NTA_CHECK (can throw) in ~destructor! That should be solved.
There's an issue already about that topic.. #1317
When trying to build nupic.core at rev 7d66fc32c65358d3759c6794c6ddb1ce7d33ab79, I received the following error message: