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

[Bug] IMHEX_OFFLINE_BUILD not working properly #2054

Open
1 task done
xoores opened this issue Jan 5, 2025 · 2 comments
Open
1 task done

[Bug] IMHEX_OFFLINE_BUILD not working properly #2054

xoores opened this issue Jan 5, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@xoores
Copy link

xoores commented Jan 5, 2025

Operating System

Linux

What's the issue you encountered?

I'm adding the latest version of ImHex (1.36.2) to my portage overlay so Gentoo users can install it using standard package manager and the current version fails to build in the Gentoo sandbox even when I have IMHEX_OFFLINE_BUILD=ON-

How can the issue be reproduced?

Build from the latest sources in network sandbox.

ImHex Version

1.36.2

ImHex Build Type

  • Nightly or built from sources

Installation type

Portage

Additional context?

Used CMAKEARGS:

-D CMAKE_BUILD_TYPE="Release" \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_FLAGS="-fuse-ld=lld" \
-D CMAKE_CXX_FLAGS="-fuse-ld=lld" \
-D CMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-D CMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_SKIP_RPATH=ON \
-D IMHEX_USE_BUNDLED_CA=OFF \
-D IMHEX_PLUGINS_IN_SHARE=OFF \
-D IMHEX_STRIP_RELEASE=OFF \
-D IMHEX_OFFLINE_BUILD=ON \
-D IMHEX_IGNORE_BAD_CLONE=ON \
-D IMHEX_PATTERNS_PULL_MASTER=OFF \
-D IMHEX_IGNORE_BAD_COMPILER=OFF \
-D IMHEX_USE_GTK_FILE_PICKER=OFF \
-D IMHEX_DISABLE_STACKTRACE=OFF \
-D IMHEX_VERSION="${PV}" \
-D PROJECT_VERSION="${PV}" \
-D USE_SYSTEM_CAPSTONE=ON \
-D USE_SYSTEM_CURL=ON \
-D USE_SYSTEM_FMT=ON \
-D USE_SYSTEM_LLVM=ON \
-D USE_SYSTEM_NFD=OFF \
-D USE_SYSTEM_NLOHMANN_JSON=ON \
-D USE_SYSTEM_YARA=ON

Error, where some plugin seems to try & pull something from the internet during the compilation despite having OFFLINE_BUILD=ON:

/opt/dotnet-sdk-bin-8.0/sdk/8.0.107/NuGet.targets(156,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/var/tmp/portage/app-misc/imhex-1.36.2/work/ImHex/plugins/script_loader/support/dotnet/AssemblyLoader/AssemblyLoader.csproj]
/opt/dotnet-sdk-bin-8.0/sdk/8.0.107/NuGet.targets(156,5): error :   Resource temporarily unavailable (api.nuget.org:443) [/var/tmp/portage/app-misc/imhex-1.36.2/work/ImHex/plugins/script_loader/support/dotnet/AssemblyLoader/AssemblyLoader.csproj]
/opt/dotnet-sdk-bin-8.0/sdk/8.0.107/NuGet.targets(156,5): error :   Resource temporarily unavailable [/var/tmp/portage/app-misc/imhex-1.36.2/work/ImHex/plugins/script_loader/support/dotnet/AssemblyLoader/AssemblyLoader.csproj]
@xoores xoores added the bug Something isn't working label Jan 5, 2025
@WerWolv
Copy link
Owner

WerWolv commented Jan 5, 2025

Hey! Interesting, I'm not sure there's much I can do about that besides just disabling script support entirely. Are there any other packages that build .NET applications? How do they handle Nuget?

As a workaround for now, the easiest you can do is disable the script loader plugin using the following cmake variable:
-DIMHEX_EXCLUDE_PLUGINS="script_loader"

@xoores
Copy link
Author

xoores commented Jan 5, 2025

Aah, nice - I just deleted the offending folder and it build correctly without it 🙂 Thanks, definietly is a cleaner way to do it.

I'm not really sure - I will check that out. Normally things like that are done by "pre-downloading" all the packages/files necessary for the compilation. There also seems to be a nuget.eclass that (probably) might help with that, I will explore that for sure & let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants