Bug 394330 - Heaptrack 1.1.0 fails to build on 32bit
Summary: Heaptrack 1.1.0 fails to build on 32bit
Status: RESOLVED FIXED
Alias: None
Product: Heaptrack
Classification: Applications
Component: general (show other bugs)
Version: 1.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Milian Wolff
URL:
Keywords:
: 394613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-16 14:07 UTC by Wolfgang Bauer
Modified: 2018-05-29 09:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2018-05-16 14:07:45 UTC
This is the error:
In file included from /home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/interpret/heaptrack_interpret.cpp:41:0:
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h: In instantiation of 'static char* LineWriter::writeHexNumber(char*, V) [with V = long long unsigned int]':
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h:208:32:   required from 'static char* LineWriter::writeHexNumbers(char*, V, T ...) [with V = long long unsigned int; T = {unsigned int}]'
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h:141:33:   required from 'bool LineWriter::writeHexLine(char, T ...) [with T = {long long unsigned int, unsigned int}]'
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/interpret/heaptrack_interpret.cpp:480:63:   required from here
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h:170:46: error: call of overloaded 'clz(long long unsigned int&)' is ambiguous
         const unsigned zeroBits = value ? clz(value) : numBits;
                                           ~~~^~~~~~~
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h:151:28: note: candidate: static unsigned int LineWriter::clz(unsigned int)
     inline static unsigned clz(unsigned V)
                            ^~~
/home/abuild/rpmbuild/BUILD/heaptrack-1.1.0/src/util/linewriter.h:156:28: note: candidate: static unsigned int LineWriter::clz(long unsigned int)
     inline static unsigned clz(long unsigned V)
                            ^~~
Comment 1 Milian Wolff 2018-05-17 11:34:00 UTC
Git commit 76fd2e84ba133e96d2cfdf90cb715e66e923eb8f by Milian Wolff.
Committed on 17/05/2018 at 11:32.
Pushed by mwolff into branch '1.1'.

Fix compile on 32bit

M  +5    -0    src/util/linewriter.h

https://commits.kde.org/heaptrack/76fd2e84ba133e96d2cfdf90cb715e66e923eb8f
Comment 2 Fabian Vogt 2018-05-23 15:23:30 UTC
*** Bug 394613 has been marked as a duplicate of this bug. ***
Comment 3 David Geiger 2018-05-29 04:18:36 UTC
Here on Mageia Cauldron it still fails to build on 32bit even with the applied patch:

[ 43%] Building CXX object tests/auto/CMakeFiles/tst_io.dir/tst_io.cpp.o
cd /home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/build/tests/auto && /usr/bin/c++  -DCATCH_CONFIG_MAIN -I/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/build/tests/auto -I/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/../.. -I/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/../../src -I/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/build/tests/auto/../../src -I/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/../../src/track  -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -std=c++11 -Wall -Wpedantic -g   -o CMakeFiles/tst_io.dir/tst_io.cpp.o -c /home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/tst_io.cpp
/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/tst_io.cpp: In function 'void ____C_A_T_C_H____T_E_S_T____112()':
/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/tst_io.cpp:127:86: error: unable to deduce 'std::initializer_list<_Tp>&&' from '{8746901101568, 0, 223316, 2320472, 9984}'
     for (uint64_t expected : {0x7f48beedc00ul, 0x0ul, 0x36854ul, 0x236858ul, 0x2700ul}) {
                                                                                      ^
/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/tests/auto/tst_io.cpp:127:86: note:   deduced conflicting types for parameter '_Tp' ('long long unsigned int' and 'long unsigned int')
make[2]: *** [tests/auto/CMakeFiles/tst_io.dir/build.make:66: tests/auto/CMakeFiles/tst_io.dir/tst_io.cpp.o] Error 1
make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/heaptrack-1.1.0/build'
make[1]: *** [CMakeFiles/Makefile2:1373: tests/auto/CMakeFiles/tst_io.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 4 Milian Wolff 2018-05-29 08:47:52 UTC
commit c456f6a1575fb2834238a1f693e7c7787d768d42
Author: Milian Wolff <milian.wolff@kdab.com>
Date:   Tue May 29 10:45:53 2018 +0200

    Fix compile warnings about format type mismatch on 32bit
    
    Use PRIu64 instead of hardcoding %lu for the std::chrono::milliseconds
    representation.
    
    CCBUG: 394330

commit 49577e019ea791ee63962cdfe7e9c0c5b5c6ea4b
Author: Milian Wolff <milian.wolff@kdab.com>
Date:   Tue May 29 10:41:10 2018 +0200

    Fix another compile error on 32bit
    
    Introduce a user-defined _u64 literal for uint64_t
    and use that instead of ul/ull.
    
    BUG: 394330
Comment 5 David Geiger 2018-05-29 09:15:02 UTC
Confirmed! Now heaptrack built fine without issue!

Thanks!