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

Error while building gtk3 #1298

Closed
doadin opened this issue Mar 26, 2024 · 12 comments
Closed

Error while building gtk3 #1298

doadin opened this issue Mar 26, 2024 · 12 comments

Comments

@doadin
Copy link
Contributor

doadin commented Mar 26, 2024

"Program gtk4-update-icon-cache gtk-update-icon-cache found: NO
meson.build:49:24: ERROR: Program 'gtk4-update-icon-cache gtk-update-icon-cache' not found or not executable"

@doadin
Copy link
Contributor Author

doadin commented Mar 26, 2024

@danyeaw
Copy link
Member

danyeaw commented Mar 27, 2024

Hi @doadin, thanks for the issue report. Adwaita-icon-theme supports both gtk-update-icon-cache and gtk4-update-icon-cache, so it should still support GTK3.

What command are you using, what version of Gvsbuild do you have and how did you install it, and can you provide the larger portion of the build log where you got the failure? Thanks!

@doadin
Copy link
Contributor Author

doadin commented Mar 27, 2024

@danyeaw https://github.com/doadin/gvsbuild-release/blob/main/.github/workflows/release.yml is the workflow file so you can see the whole process.
- name: Build run: > gvsbuild build --platform=${{ matrix.arch }} --vs-ver=${{ matrix.vstudio }} --enable-gi --py-wheel gtk3 pygobject lz4 enchant

https://github.com/doadin/gvsbuild-release/actions/runs/8443289392/job/23126574349

that is the step used to run the build. Everything else seems to build fine other than pycairo, with the same messon issue with python I reported here like 6 months ago. I just reported the issue to them have not got a responce yet. ( I mention this because thats what the "# Delete unused python versions to avoid meson issue in cairo." is for in the workflow file. Thoughh this did not help that issue either. That being said one issue at a time.

@danyeaw
Copy link
Member

danyeaw commented Mar 28, 2024

Hi @doadin, I updated our official CI build to also build pygobject with GTK3 at #1299 and it builds fine. Some differences I noticed from our build:

1, Starting with Gvsbuild 2024.2.0, moving the Git bin folder out of the way is no longer required
2. We are passing the -j2 option, since we have seen GitHub Action runners run out of memory
3. We are using VS version 17, and not passing in the --vs-ver
4. We aren't getting the cairo meson errors causing you to have to delete other Python versions

@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

ok, I am running a new build now to test I adjusted for
1
2
3 im assuming it defaults to vs17 if you dont specify --vs-ver?, for this test I only removed that arg
4 still have it deleting python for now as it should not hurt, as they should be unused anyways. but if I still have issue I will remove or if it works I will try and remove for testing.

The only other difference I saw was use of poetry, I wouldnt think that should cause errors though?

@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

@danyeaw ok that test did not get far, it errored :

"Run gvsbuild build --platform=x86 --ninja-opts -j2 --enable-gi --py-wheel gtk3 pygobject lz4 enchant
Build type is debug-optimized
Cleaning up the build environment
Checking msys tool
Using C:\msys64 for msys installation
Checking Msvc tool

Visual Studio installation(s) found:
Visual Studio Enterprise 2019 @ C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise

Error: Unable to find Visual Studio, try using --vs-ver or --vs-install-path to
specify Visual Studio version or install location"

Visual Studio installation(s) found .....proceded by Unable to find Visual Studio, seems it can't mkae up its mind.

Edit: I think Visual Studio Enterprise 2019 is vsver 16? maybe you are using runner windows-2022 I think that has Visual Studio Enterprise 2022 on it which is 17-19 compatible?

Edit2: Visual Studio Enterprise 2022 is version 17.9.34701.34

@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

@danyeaw still same error after changing runner to windows-2022 to get vs 17.

https://github.com/doadin/gvsbuild-release/actions/runs/8461761735/workflow

x64 build works fine because meson "finds" x86_64" but 32-bit build fails.

I also tried changing to using poetry but still x86 messeon error.
https://github.com/doadin/gvsbuild-release/actions/runs/8462399966
https://github.com/doadin/gvsbuild-release/actions/runs/8462399966/workflow

@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

@danyeaw so, I was able to I guess workaround the issue by using the same method as other projects( meson_params="-Dpython=%s\python.exe -Dcairo_libname=cairo-gobject-2.dll") and specifying the meson python param, doadin@5e241a4
after that commit
gvsbuild build --platform=x64 --ninja-opts -j2 --enable-gi --py-wheel gtk3 pygobject lz4 enchant is successful

I have not tested Adwaita-icon-theme yet.

Edit: Adwaita-icon-theme worked now too.

@danyeaw
Copy link
Member

danyeaw commented Mar 28, 2024

Ok great, do you want to please submit a PR?

doadin added a commit to doadin/gvsbuild that referenced this issue Mar 28, 2024
In some cases meson does not find python or python for the right arch, fix this by using the projects meson param to specify the python installation currently being used.

https://github.com/doadin/gvsbuild/blob/acd2a4a9faee3d987cfc36b48fa8e7d7d3e52ec8/gvsbuild/projects/gobject_introspection.py#L64

wingtk#1298
doadin added a commit to doadin/gvsbuild that referenced this issue Mar 28, 2024
In some cases meson does not find python or python for the right arch, fix this by using the projects meson param to specify the python installation currently being used.

https://github.com/doadin/gvsbuild/blob/acd2a4a9faee3d987cfc36b48fa8e7d7d3e52ec8/gvsbuild/projects/gobject_introspection.py#L64

wingtk#1298
@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

@danyeaw sure.

doadin added a commit to doadin/gvsbuild that referenced this issue Mar 28, 2024
In some cases meson does not find python or python for the right arch, fix this by using the projects meson param to specify the python installation currently being used.

https://github.com/wingtk/gvsbuild/blob/acd2a4a9faee3d987cfc36b48fa8e7d7d3e52ec8/gvsbuild/projects/gobject_introspection.py#L64

wingtk#1298
@doadin
Copy link
Contributor Author

doadin commented Mar 28, 2024

@danyeaw looks like gtk3 and 4 both built in the PR so no regression in adding this change even for your builds so thats nice!

@danyeaw
Copy link
Member

danyeaw commented Mar 28, 2024

Closed by #1301.

@danyeaw danyeaw closed this as completed Mar 28, 2024
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

No branches or pull requests

2 participants