-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Comments
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: |
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. |
You have to build the related assembly loader independently from cmake due to how gentoo's dotnet eclass handles things. This is how I resolved it in my overlay (common eclass requirements like rdeps, src_uri=nuget_uris are omitted in the following snippet, and my ebuild is not sane as it is a live git ebuild.) DOTNET_PKG_COMPAT="8.0"
NUGETS="
[email protected]
[email protected]
[email protected]
[email protected]
"
inherit dotnet-pkg
DOTNET_PKG_PROJECTS=( "${S}/plugins/script_loader/support/dotnet/AssemblyLoader/AssemblyLoader.csproj" )
pkg_setup() {
default
dotnet-pkg-base_setup
}
src_prepare() {
# build dotnet script loader separately.
sed -e "s|^add_dotnet_assembly|#|g" -i plugins/script_loader/support/dotnet/CMakeLists.txt || die
sed -e "s|add_dependencies|#|g" -i plugins/script_loader/CMakeLists.txt || die
}
src_configure() {
local mycmakeargs=(
...
-D IMHEX_OFFLINE_BUILD=ON \
-D IMHEX_PLUGINS_IN_SHARE=ON
...
)
cmake_src_configure
dotnet-pkg_src_configure
}
src_compile() {
cmake_src_compile
dotnet-pkg_src_compile
}
src_install() {
cmake_src_install
dotnet-pkg-base_install "/usr/share/imhex/plugins/"
} For the cmake files to support this layout properly, there needs to be some way to override where nugets are stored since portage dumps them all in one place. dotnet allows for you to specify the nuget cache location but I don't know if cmake itself can handle that at all. There are also some issues with using both dotnet-pkg/nuget and cmake in the same ebuild. |
I'm happy to adjust some things in the build script if it helps you guys package ImHex more easily. |
I need to investigate further how nuget.eclass/dotnet-pkg.eclass functions but I think most of it can be resolved with a bunch of environment variables judging by the msdn article about nuget folders |
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
Installation type
Portage
Additional context?
Used CMAKEARGS:
Error, where some plugin seems to try & pull something from the internet during the compilation despite having OFFLINE_BUILD=ON:
The text was updated successfully, but these errors were encountered: