Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JustinButler700 opened this issue May 15, 2024 · 1 comment

Comments

@JustinButler700
Copy link

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 { ^

@JustinButler700
Copy link
Author

To fix this, i installed homebrew, and installed through homebrew outside of my docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant