| Summary: | heaptrack fails to build on Ubuntu-18.04.3 | ||
|---|---|---|---|
| Product: | [Applications] Heaptrack | Reporter: | Dominique Pelle <dominique.pelle> |
| Component: | general | Assignee: | Milian Wolff <mail> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Dominique Pelle
2019-10-05 08:57:57 UTC
I fixed (or worked around) the compilation error using:
diff --git a/src/analyze/gui/parser.cpp b/src/analyze/gui/parser.cpp
index 3197a5e..fbdec81 100644
--- a/src/analyze/gui/parser.cpp
+++ b/src/analyze/gui/parser.cpp
@@ -37,11 +37,10 @@ struct CacheSymbolHash
{
std::size_t operator()(const Symbol &symbol) const noexcept
{
- size_t seed = 0;
- boost::hash_combine(seed, std::hash<QString>{}(symbol.symbol));
- boost::hash_combine(seed, std::hash<QString>{}(symbol.binary));
- boost::hash_combine(seed, std::hash<QString>{}(symbol.path));
- return seed;
+ std::size_t h1 = qHash(symbol.symbol);
+ std::size_t h2 = qHash(symbol.binary);
+ std::size_t h3 = qHash(symbol.path);
+ return h1 ^ (h2 << 1) ^ (h3 << 2);
}
};
Hopefully that's still a good hash.
But then I still get another build error:
[ 37%] Linking CXX executable ../../../bin/heaptrack_gui
/pkg/lib/libpng16.so.16: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
/pkg/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'
collect2: error: ld returned 1 exit status
src/analyze/gui/CMakeFiles/heaptrack_gui.dir/build.make:306: recipe for target 'bin/heaptrack_gui' failed
make[2]: *** [bin/heaptrack_gui] Error 1
CMakeFiles/Makefile2:643: recipe for target 'src/analyze/gui/CMakeFiles/heaptrack_gui.dir/all' failed
make[1]: *** [src/analyze/gui/CMakeFiles/heaptrack_gui.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
The link error in my previous comment was a problem on my side. I finally built successfully after removing a /pkg/bin/ directory from my path. But consider the patch in my previous comment to fix the compilation with the hash function. the build error should be fixed now, please double check and reopen otherwise thanks for the report! |