[Bug] Error when build
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/bindiff
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
question
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
refinedmods/refinedstorage2#1414 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
In Java's `LongBoundedSum`, setting `lower` to `Long.MIN_VALUE` under-estimates the sensitivityOpen
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
google/differential-privacy#489 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
link-check link-check:manual
Difficulty 2/5 1-3 hours Newbie friendliness 85/100