Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Error when build

Open
#84 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cmake, cpp
Domain
build-system

Research direction

Start at main_portable.cc:216 and compare the absl::MutexLock call with the constructor signature shown in the build error. Run cmake --build build/out --config Release on macOS; done means the bindiff target compiles successfully without the MutexLock error.

Written by the indexing model from the issue text.

Description

Describe the bug
I got error when build
tiendoan@M3-Pro bindiff % cmake --build build/out --config Release
[0/2] Re-checking globbed directories...
[571/578] Building CXX object CMakeFiles/bindiff.dir/main_portable.cc.o
FAILED: [code=1] CMakeFiles/bindiff.dir/main_portable.cc.o
/usr/bin/c++ -I/Users/tiendoan/bindiff/build/out/_deps/absl-src -I/Users/tiendoan/bindiff/build/binexport -I/Users/tiendoan/bindiff/build/binexport/stubs -I/Users/tiendoan/bindiff/build/out/_deps/binexport-build/gen_include -I/Users/tiendoan/bindiff/build/out/_deps/binexport-build/src_include -I/Users/tiendoan/bindiff/build/binexport/boost_parts -I/Users/tiendoan/bindiff/build/out/_deps/protobuf-src/src -I/Users/tiendoan/bindiff/build/out/_deps/protobuf-src/third_party/utf8_range -I/Users/tiendoan/bindiff/build/out/src_include -I/Users/tiendoan/bindiff/build/out/gen_include -I/Users/tiendoan/bindiff -O3 -DNDEBUG -std=c++17 -flto=thin -arch arm64 -fPIE -Wno-nullability-completeness -Wno-invalid-noreturn -Wno-deprecated -gfull -MD -MT CMakeFiles/bindiff.dir/main_portable.cc.o -MF CMakeFiles/bindiff.dir/main_portable.cc.o.d -o CMakeFiles/bindiff.dir/main_portable.cc.o -c /Users/tiendoan/bindiff/main_portable.cc
/Users/tiendoan/bindiff/main_portable.cc:216:23: error: no matching constructor for initialization of 'absl::MutexLock'
absl::MutexLock lock(g_queue_mutex);
^ ~~~~~~~~~~~~~
/Users/tiendoan/bindiff/build/out/_deps/absl-src/absl/synchronization/mutex.h:590:12: note: candidate constructor not viable: no known conversion from 'absl::Mutex' to 'Mutex ' for 1st argument; take the address of the argument with &
explicit MutexLock(Mutex
absl_nonnull mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
^
/Users/tiendoan/bindiff/build/out/_deps/absl-src/absl/synchronization/mutex.h:604:3: note: candidate constructor not viable: no known conversion from 'absl::Mutex' to 'const MutexLock' for 1st argument
MutexLock(const MutexLock&) = delete; // NOLINT(runtime/mutex)
^
/Users/tiendoan/bindiff/build/out/_deps/absl-src/absl/synchronization/mutex.h:605:3: note: candidate constructor not viable: no known conversion from 'absl::Mutex' to 'MutexLock' for 1st argument
MutexLock(MutexLock&&) = delete; // NOLINT(runtime/mutex)
^
/Users/tiendoan/bindiff/build/out/_deps/absl-src/absl/synchronization/mutex.h:598:12: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
explicit MutexLock(Mutex* absl_nonnull mu, const Condition& cond)
^
1 error generated.
[573/578] Building C object CMakeFiles/sqlite.dir/_deps/sqlite-src/sqlite3.c.o
ninja: build stopped: subcommand failed.

Environment (please complete the following information):

  • OS and version: MacOS
  • Disassembler and version: SDK IDA 9.1

Additional context
I saw commit b3ba8f81d1296585b710512c3cc2e9697e2c1298 remove & in absl::MutexLock lock. I just add & back and can build

Dominant language
Java
Stars
3.2k
Forks
240
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/bindiff

All issues in google/bindiff

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.