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

GTKMM3 related error while installing Cadabra on Windows #35627

Closed
Fajeux opened this issue Dec 12, 2023 · 10 comments
Closed

GTKMM3 related error while installing Cadabra on Windows #35627

Fajeux opened this issue Dec 12, 2023 · 10 comments
Assignees
Labels
category:question This issue is a question

Comments

@Fajeux
Copy link

Fajeux commented Dec 12, 2023

Operating system

Windows

Compiler

No response

Steps to reproduce the behavior

I'm trying to install Cadabra on Windows. Following the instructions (written below), I inevitably get stuck near the very end, after cloning the repository and whilst using cmake.

git clone https://github.com/Microsoft/vcpkg

cd vcpkg
bootstrap-vcpkg.bat

vcpkg install mpir:x64-windows glibmm:x64-windows sqlite3:x64-windows
vcpkg install boost-system:x64-windows boost-asio:x64-windows boost-uuid:x64-windows boost-program-options:x64-windows boost-signals2:x64-windows boost-property-tree:x64-windowsboost-date-time:x64-windows boost-filesystem:x64-windows boost-ublas:x64-windows

vcpkg install gtkmm:x64-windows
vcpkg integrate install

cd ..
git clone https://github.com/kpeeters/cadabra2
cd cadabra2
mkdir build
cd build

cmake -DCMAKE_TOOLCHAIN_FILE=[the path obtained in the last step] -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX=C:\Cadabra -G "Visual Studio 17 2022" -A x64 ..

which results in an error - namely, the library called 'gdkmm' missing.

Failure logs

CMake Error at cmake/windows.cmake:197 (message):
Could NOT find library gdkmm required for GTKMM3_LIBRARIES
Call Stack (most recent call first):
cmake/modules/FindGTKMM3.cmake:3 (windows_find_library)
C:/codestuf/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
frontend/CMakeLists.txt:24 (find_package)

Additional context

Previously, I've had the exact same error pop up for two other libraries, 'atkmm' and 'gdk', but solved these two by typing the following into the terminal:

vcpkg install atkmm:x64-windows
vcpkg install gtk3:x64-windows

respectively. (The first one might be redundant, I am not sure.)
This caveman-mentality approach to solving the issue was inspired by the directions themselves, as one of the previous steps utilizes vcpkg install gtkmm:x64-windows, which should (I guess?) install everything necessary, but it doesn't seem to do so.

My question, then, is how can I download/install/build gdkmm on my Windows OS? I have tried using similar commands like:

vcpkg install gdkmm:x64-windows

but what I'm met with is another error, stating that this does not exist. My guess is that all of the above were somehow and somewhere located in my vcpkg folder locally, whereas the one from above is missing.

@Fajeux Fajeux added the category:port-bug The issue is with a library, which is something the port should already support label Dec 12, 2023
@jimwang118 jimwang118 added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Dec 13, 2023
@jimwang118
Copy link
Contributor

You install gtk3 in vcpkg and then try to compile cadabra2.
./vcpkg install gtk3

@Fajeux
Copy link
Author

Fajeux commented Dec 13, 2023

I have done that as well, but I am still met with the same error. 'gdkmm' seems to be missing

@dg0yt
Copy link
Contributor

dg0yt commented Dec 13, 2023

Port gtkmm is for gtk which is version 4.
For gtk3, you would probably need (to add) gtkmm3.
(gtk3 isn't a first class citizen. It was added back a while after upgrading gtk because some ports really need that version, e.g. wxwidgets.)

@Fajeux
Copy link
Author

Fajeux commented Dec 13, 2023

Forgive me for not understanding as I am quite new to this whole shebang, but I've installed everything that you've mentioned. What I am missing (or what the error states that I am missing) is gDkmm.

When I open up cadabra's 'FindGTKMM3' CMake Source File, these are the libraries it searches for:

windows_find_library(GTKMM3_LIBRARIES
	gtk gdk gdk_pixbuf pangocairo pango atk gio gobject
	gmodule glib cairo-gobject cairo intl atkmm cairomm
	**gdkmm** giomm glibmm gtkmm pangomm
  )

The rest have been both installed and found successfully.

@dg0yt
Copy link
Contributor

dg0yt commented Dec 13, 2023

Let me summarize it differently:

@Fajeux
Copy link
Author

Fajeux commented Dec 13, 2023

I think I understand now, thanks.
Is it then possible to maybe rollback somehow to the previous version of gtkmm or am I out of options?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 13, 2023

The easiest way to start might be to write a vcpkg.json manifest to define the dependencies, including version requirements. See documentation on vcpkg manifest mode.
But this will be using build recipes from April 2021 at least for some ports. I don't know if this configuration will work well today. That's why I didn't add a recommendation to my other post.

I also added a note to kpeeters/cadabra2#233, to give upstream a chance to look at the issue again (or at least remove the instructions when it is verified that they are no longer working).

@Fajeux
Copy link
Author

Fajeux commented Dec 14, 2023

I'll try dabbling with that for a bit, but I'm a little doubtful because I've never done anything like it before. Thank you for your input!

@jimwang118
Copy link
Contributor

@Fajeux Did the compilation go normally after you added gtkmm version 3 using manifest mode?

@jimwang118
Copy link
Contributor

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.

@jimwang118 jimwang118 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

3 participants