Closed nicolaipre closed 6 months ago
This is odd - the referenced Binary Ninja commit exists, but GitHub seems to think that it is not part of the projects history.
Can you try to replace it with 59e569906828e91e4884670c2bba448702f5a31d
in BinExportDeps.cmake
?
After that change it now builds successfully:
$ cmake -S . -B build/out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/out -DBINDIFF_BINEXPORT_DIR=build/binexport "-DIdaSdk_ROOT_DIR=${PWD}/build/idasdk/idasdk_pro84"
--
-- 25.2.0
-- Found Binary Ninja Core: binaryninjacore
-- Binary Ninja Link Dirs:
-- Binary Ninja Install Dir:
-- Binary Ninja User Plugins Dir: /home/user/.binaryninja/plugins
-- Found IdaSdk: /home/user/Downloads/tmp/bindiff-8/build/idasdk/idasdk_pro84
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Downloads/tmp/bindiff-8/build/out
Also, the idasdk_proNN.zip
contains a folder with the same name, so the cmake command needs a minor change:
5c5
< "-DIdaSdk_ROOT_DIR=${PWD}build/idasdk"
---
> "-DIdaSdk_ROOT_DIR=${PWD}/build/idasdk/idasdk_pro84"
Or better yet just modify the unzip command accordingly.
Thank you for the help!
Edit: Seems like some of the tests are failing too (possibly because of the new unsupported update?):
$ (cd build/out; ctest --build-config Release --output-on-failure)
Test project /home/user/Downloads/tmp/bindiff-8/build/out
Start 1: EmptyCallGraphDeathTest.QueryingVerticesCrashes
1/25 Test #1: EmptyCallGraphDeathTest.QueryingVerticesCrashes ........................ Passed 0.42 sec
Start 2: EmptyCallGraphTest.Construction
2/25 Test #2: EmptyCallGraphTest.Construction ........................................ Passed 0.00 sec
Start 3: EmptyCallGraphTest.AddOrRemoveNullFlowGraphThrows
3/25 Test #3: EmptyCallGraphTest.AddOrRemoveNullFlowGraphThrows ...................... Passed 0.00 sec
Start 4: EmptyCallGraphTest.CrossPlatformFileBasenames
4/25 Test #4: EmptyCallGraphTest.CrossPlatformFileBasenames .......................... Passed 0.00 sec
Start 5: SimpleCallGraphTest.Construction
5/25 Test #5: SimpleCallGraphTest.Construction ....................................... Passed 0.00 sec
Start 6: SimpleCallGraphTest.TopologyValid
6/25 Test #6: SimpleCallGraphTest.TopologyValid ...................................... Passed 0.00 sec
Start 7: ChangeClassifierTest.ChangeDescription
7/25 Test #7: ChangeClassifierTest.ChangeDescription ................................. Passed 0.01 sec
Start 8: ChangeClassifierTest.BasicChange
8/25 Test #8: ChangeClassifierTest.BasicChange ....................................... Passed 0.01 sec
Start 9: DatabaseWriterTest.SimpleDatabaseCreation
9/25 Test #9: DatabaseWriterTest.SimpleDatabaseCreation .............................. Passed 0.05 sec
Start 10: FlowGraphMatchBasicBlockInstructionCountTest.DefaultFlowGraphMatches
10/25 Test #10: FlowGraphMatchBasicBlockInstructionCountTest.DefaultFlowGraphMatches ... Passed 0.01 sec
Start 11: PrimeSignatureTest.IPow32MathEdgeCases
11/25 Test #11: PrimeSignatureTest.IPow32MathEdgeCases ................................. Passed 0.00 sec
Start 12: PrimeSignatureTest.IPow32NonOverflow
12/25 Test #12: PrimeSignatureTest.IPow32NonOverflow ................................... Passed 0.00 sec
Start 13: PrimeSignatureTest.IPow32Overflow
13/25 Test #13: PrimeSignatureTest.IPow32Overflow ...................................... Passed 0.00 sec
Start 14: PrimeSignatureTest.GetPrimeDistinctX86Mnemonics
14/25 Test #14: PrimeSignatureTest.GetPrimeDistinctX86Mnemonics ........................ Passed 0.00 sec
Start 15: PrimeSignatureTest.GetPrimeCheckCollision
15/25 Test #15: PrimeSignatureTest.GetPrimeCheckCollision .............................. Passed 0.00 sec
Start 16: SqliteTest.BasicFunctionality
16/25 Test #16: SqliteTest.BasicFunctionality .......................................... Passed 0.01 sec
Start 17: SqliteTest.InvalidSyntax
17/25 Test #17: SqliteTest.InvalidSyntax ............................................... Passed 0.00 sec
Start 18: SqliteTest.RollbackTransaction
18/25 Test #18: SqliteTest.RollbackTransaction ......................................... Passed 0.01 sec
Start 19: LogWriterTest.Empty
19/25 Test #19: LogWriterTest.Empty .................................................... Passed 0.02 sec
Start 20: WriterTest.EmptyChainDoesNothing
20/25 Test #20: WriterTest.EmptyChainDoesNothing ....................................... Passed 0.01 sec
Start 21: WriterTest.CanChainWriters
21/25 Test #21: WriterTest.CanChainWriters ............................................. Passed 0.01 sec
Start 22: binexport_shared_test_NOT_BUILT
Could not find executable binexport_shared_test_NOT_BUILT
Looked in the following places:
binexport_shared_test_NOT_BUILT
binexport_shared_test_NOT_BUILT
Release/binexport_shared_test_NOT_BUILT
Release/binexport_shared_test_NOT_BUILT
Release/binexport_shared_test_NOT_BUILT
Release/binexport_shared_test_NOT_BUILT
Unable to find executable: binexport_shared_test_NOT_BUILT
22/25 Test #22: binexport_shared_test_NOT_BUILT ........................................***Not Run 0.00 sec
Start 23: idb_export_test_NOT_BUILT
Could not find executable idb_export_test_NOT_BUILT
Looked in the following places:
idb_export_test_NOT_BUILT
idb_export_test_NOT_BUILT
Release/idb_export_test_NOT_BUILT
Release/idb_export_test_NOT_BUILT
Release/idb_export_test_NOT_BUILT
Release/idb_export_test_NOT_BUILT
Unable to find executable: idb_export_test_NOT_BUILT
23/25 Test #23: idb_export_test_NOT_BUILT ..............................................***Not Run 0.00 sec
Start 24: binexport_test_NOT_BUILT
Could not find executable binexport_test_NOT_BUILT
Looked in the following places:
binexport_test_NOT_BUILT
binexport_test_NOT_BUILT
Release/binexport_test_NOT_BUILT
Release/binexport_test_NOT_BUILT
Release/binexport_test_NOT_BUILT
Release/binexport_test_NOT_BUILT
Unable to find executable: binexport_test_NOT_BUILT
24/25 Test #24: binexport_test_NOT_BUILT ...............................................***Not Run 0.00 sec
Start 25: binexport_reader_test_NOT_BUILT
Could not find executable binexport_reader_test_NOT_BUILT
Looked in the following places:
binexport_reader_test_NOT_BUILT
binexport_reader_test_NOT_BUILT
Release/binexport_reader_test_NOT_BUILT
Release/binexport_reader_test_NOT_BUILT
Release/binexport_reader_test_NOT_BUILT
Release/binexport_reader_test_NOT_BUILT
Unable to find executable: binexport_reader_test_NOT_BUILT
25/25 Test #25: binexport_reader_test_NOT_BUILT ........................................***Not Run 0.00 sec
84% tests passed, 4 tests failed out of 25
Total Test time (real) = 0.59 sec
The following tests FAILED:
22 - binexport_shared_test_NOT_BUILT (Not Run)
23 - idb_export_test_NOT_BUILT (Not Run)
24 - binexport_test_NOT_BUILT (Not Run)
25 - binexport_reader_test_NOT_BUILT (Not Run)
Errors while running CTest
After that change it now builds successfully
Glad to hear.
Also, the idasdk_proNN.zip contains a folder with the same name, so the cmake command needs a minor change
Note that the directory names inside the ZIP are different for IDA Home, IDA Pro and IDA Teams, which is rather annoying. I should probably change the command to include a shell glob (idaask_*.zip
).
Seems like some of the tests are failing too (possibly because of the new unsupported update?)
This is expected. The failing tests are all BinExport tests that live in the BinExport repo and are not built by default. Somehow, ctest is still picking them up as tests to be run.
Understandable, and thank you for the information.
Bindiff built successfully. I also built Binexport and had to apply the same changes to the BinExportDeps.cmake
file there, but after that everything works.
Feel free to close the issue.
Installing BinDiff from source according to building instructions in README currently fails due to binaryninjaapi git error.
Environment (please complete the following information):
Building from Source (From README.md):
The following build dependencies are optional:
IDA Pro only: IDA SDK 8.0 or higher (unpack into deps/idasdk) The general build steps are the same on Windows, Linux and macOS. The following shows the commands for Linux.
Download dependencies that won't be downloaded automatically:
Next, configure the build directory and generate build files:
Output error