Skip to content

Cannot build bloaty on my Amazon Linux 2 docker image due to dwarf util error #377

Open

Description

On a fresh git clone of bloaty, when i try to compile it, using the following commands, it fails

cmake -B build -G Ninja -S .
cd build
ninja bloaty

the build fails
[21/29] Building CXX object CMakeFiles/libbloaty.dir/src/dwarf/dwarf_util.cc.o FAILED: /usr/bin/g++ -DUSE_RE2 -D_LIBCXXABI_FUNC_VIS="" -I../third_party/re2 -I../third_party/capstone/include -I../. -I../src -I../third_party/abseil-cpp -Isrc -I../third_party/googletest/googletest/include -I../third_party/googletest/googlemock/include -isystem ../third_party/protobuf/src -W -Wall -Wno-sign-compare -fdiagnostics-color=always -O2 -g1 -std=gnu++1z -MD -MT CMakeFiles/libbloaty.dir/src/dwarf/dwarf_util.cc.o -MF CMakeFiles/libbloaty.dir/src/dwarf/dwarf_util.cc.o.d -o CMakeFiles/libbloaty.dir/src/dwarf/dwarf_util.cc.o -c ../src/dwarf/dwarf_util.cc In file included from ../src/dwarf/dwarf_util.h:22:0, from ../src/dwarf/dwarf_util.cc:15: ../src/util.h: In function ‘constexpr T bloaty::_BS(T)’: ../src/util.h:124:6: error: expected ‘(’ before ‘constexpr’ if constexpr (N == 1) { ^ ../src/util.h:126:5: error: ‘else’ without a previous ‘if’ } else { ^ [21/29] Building CXX object CMakeFiles/libbloaty.dir/src/dwarf/attr.cc.o FAILED: /usr/bin/g++ -DUSE_RE2 -D_LIBCXXABI_FUNC_VIS="" -I../third_party/re2 -I../third_party/capstone/include -I../. -I../src -I../third_party/abseil-cpp -Isrc -I../third_party/googletest/googletest/include -I../third_party/googletest/googlemock/include -isystem ../third_party/protobuf/src -W -Wall -Wno-sign-compare -fdiagnostics-color=always -O2 -g1 -std=gnu++1z -MD -MT CMakeFiles/libbloaty.dir/src/dwarf/attr.cc.o -MF CMakeFiles/libbloaty.dir/src/dwarf/attr.cc.o.d -o CMakeFiles/libbloaty.dir/src/dwarf/attr.cc.o -c ../src/dwarf/attr.cc In file included from ../src/dwarf/dwarf_util.h:22:0, from ../src/dwarf/debug_info.h:57, from ../src/dwarf/attr.cc:17: ../src/util.h: In function ‘constexpr T bloaty::_BS(T)’: ../src/util.h:124:6: error: expected ‘(’ before ‘constexpr’ if constexpr (N == 1) { ^ ../src/util.h:126:5: error: ‘else’ without a previous ‘if’ } else { ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions