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

fix: use find_library() instead of find_file() to find system yara library #1581

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

iTrooz
Copy link
Collaborator

@iTrooz iTrooz commented Mar 2, 2024

@iTrooz
Copy link
Collaborator Author

iTrooz commented Mar 2, 2024

Fix #1547

@iTrooz
Copy link
Collaborator Author

iTrooz commented Mar 2, 2024

@kernaltrap8 Hey, could you try building/running ImHex using the code source of this PR please ?

@kernaltrap8
Copy link

@kernaltrap8 Hey, could you try building/running ImHex using the code source of this PR please ?

sure, would there be any extra deps i'd need or just clone repo and run build commands?

@WerWolv
Copy link
Owner

WerWolv commented Mar 2, 2024

No, same as before. It just looks for libyara in the correct place now

@kernaltrap8
Copy link

No, same as before. It just looks for libyara in the correct place now

i cant get it to build...

:3 ~/g/ImHex[1]>cmake -B build -G "Ninja"                              \                                                              (yara|?) 14:41
                        -DCMAKE_BUILD_TYPE=Release                \
                        -DCMAKE_INSTALL_PREFIX="/usr"             \

-- Configuring ImHex v1.33.0
-- Enabled bundled plugin 'builtin'
-- Enabled bundled plugin 'decompress'
-- Enabled bundled plugin 'diffing'
-- Enabled bundled plugin 'disassembler'
-- Enabled bundled plugin 'fonts'
-- Enabled bundled plugin 'hashes'
-- Enabled bundled plugin 'script_loader'
-- Enabled bundled plugin 'ui'
-- Enabled bundled plugin 'visualizers'
-- Enabled bundled plugin 'windows'
-- Enabled bundled plugin 'yara_rules'
-- Version: 10.2.0
-- Build type: Release
nfd Platform: PLATFORM_LINUX
nfd Compiler: COMPILER_GNU
Using DBUS version: 1.15.8
-- Using the multi-header code from /home/aiden/git/ImHex/lib/third_party/nlohmann_json/include/
CMake Error at lib/external/pattern_language/CMakeLists.txt:53 (add_subdirectory):
  The source directory

    /home/aiden/git/ImHex/lib/external/pattern_language/external/libwolv

  does not contain a CMakeLists.txt file.


-- libpl static library is being created
CMake Error at lib/external/pattern_language/cli/CMakeLists.txt:25 (add_subdirectory):
  The source directory

    /home/aiden/git/ImHex/lib/external/pattern_language/external/cli11

  does not contain a CMakeLists.txt file.


-- Backtrace enabled! Header: execinfo.h
-- Found Zstd: /usr/lib64/libzstd.so
-- Enabling decompression support using ZSTD ()
-- Enabling decompression support using ZLIB (1.3.1)
-- Enabling decompression support using BZip2 ()
-- Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.6.0")
Setting warning flags
Enabling CAPSTONE_ARM_SUPPORT
Enabling CAPSTONE_ARM64_SUPPORT
Enabling CAPSTONE_M68K_SUPPORT
Enabling CAPSTONE_MIPS_SUPPORT
Enabling CAPSTONE_PPC_SUPPORT
Enabling CAPSTONE_SPARC_SUPPORT
Enabling CAPSTONE_SYSZ_SUPPORT
Enabling CAPSTONE_XCORE_SUPPORT
Enabling CAPSTONE_X86_SUPPORT
Enabling CAPSTONE_TMS320C64X_SUPPORT
Enabling CAPSTONE_M680X_SUPPORT
Enabling CAPSTONE_EVM_SUPPORT
Enabling CAPSTONE_MOS65XX_SUPPORT
Enabling CAPSTONE_WASM_SUPPORT
Enabling CAPSTONE_BPF_SUPPORT
Enabling CAPSTONE_RISCV_SUPPORT
Enabling CAPSTONE_SH_SUPPORT
Enabling CAPSTONE_TRICORE_SUPPORT
-- Found matching .NET runtime version '8.0.2' path='/opt/dotnet-sdk-bin-8.0/shared/'
-- Downloading ImHex-Patterns repo branch ImHex-v1.33.0...
-- Finished downloading ImHex-Patterns
-- Configuring incomplete, errors occurred!
:3 ~/g/ImHex[1]>

@iTrooz
Copy link
Collaborator Author

iTrooz commented Mar 2, 2024

Did you clone/update submodules ?

git submodule update --recursive --init

@kernaltrap8
Copy link

Did you clone/update submodules ?

git submodule update --recursive --init

let me try that again

@kernaltrap8
Copy link

compiling with this worked.

@iTrooz
Copy link
Collaborator Author

iTrooz commented Mar 3, 2024

Awesome ! This is good to be merged then

@iTrooz iTrooz changed the title use find_library() instead of find_file() to find system yara library fix: use find_library() instead of find_file() to find system yara library Mar 18, 2024
@iTrooz iTrooz enabled auto-merge (squash) March 18, 2024 08:35
@WerWolv WerWolv disabled auto-merge March 19, 2024 19:23
@WerWolv WerWolv enabled auto-merge (squash) March 19, 2024 19:23
@WerWolv WerWolv disabled auto-merge March 19, 2024 19:23
@WerWolv WerWolv merged commit 0fb43cc into WerWolv:master Mar 19, 2024
14 of 17 checks passed
@iTrooz iTrooz deleted the yara branch March 22, 2024 08:44
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

Successfully merging this pull request may close these issues.

3 participants