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

GTK2 build: error when compiling guiUtf8.ml: Unbound module Glib #111

Closed
barracuda156 opened this issue Aug 15, 2024 · 5 comments
Closed

Comments

@barracuda156
Copy link
Contributor

ocamlc -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70   -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/gtk2/gui  -I src/gtk2/gui/x11  -I src/gtk2/gui/win32  -I icons/rsvg  -I +lablgtk2  -I src/networks/direct_connect  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -I +camlp4 -I /opt/local/lib/ocaml/site-lib/num -c src/gtk2/gui/guiUtf8.mli
ocamlc -w +a-3-4-6-27-29-32-35-37-41-44-45-48-60-70   -I src/utils/extlib  -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/gtk2/gui  -I src/gtk2/gui/x11  -I src/gtk2/gui/win32  -I icons/rsvg  -I +lablgtk2  -I src/networks/direct_connect  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -I +camlp4 -I /opt/local/lib/ocaml/site-lib/num -c src/gtk2/gui/guiUtf8.ml
File "src/gtk2/gui/guiUtf8.ml", line 180, characters 19-43:
180 | let (_, charset) = Glib.Convert.get_charset ()
                         ^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Glib
gmake: *** [Makefile:5447: src/gtk2/gui/guiUtf8.cmo] Error 2

@ygrek Could you suggest what may be going wrong here?

Single-core build, and I have rebuilt lablgtk2 just in case (same error before and after).

@barracuda156
Copy link
Contributor Author

Non-GUI build looks fine though:

mldonkey

@ygrek
Copy link
Owner

ygrek commented Aug 16, 2024

show full configure and build log (always when reporting build errors)

afaik currently newgui2 build is working only with lablgtk2 downloaded and built by configure. If you installed lablgtk2 separately (via system packages or via opam) then it will not work (but it shouldn't be even detected, so idk what is your specific problem here)
I have a wip patch to make it work with opam packaged lablgtk2 but it will have to wait after the release of current state.

@lulol
Copy link

lulol commented Aug 16, 2024

afaik currently newgui2 build is working only with lablgtk2 downloaded and built by configure. If you installed lablgtk2 separately (via system packages or via opam) then it will not work (but it shouldn't be even detected, so idk what is your specific problem here)

@ygrek newgui2 build works with the ubuntu packaged lablgtk2-2.18.12-1 and is detected, as previously reported. #99 (comment)

The AppImageBuilder PR #80 workflow builds mlnet, mlgui and mlnet+gui on ubuntu-22.04 and package mlnet+gui (with 20.04 also worked IIRC). The resulting app seems to run fine, although didn't try to download any file, just connect to servers, some searches and check logs.

What newgui2 build is not working?

@barracuda156
Copy link
Contributor Author

barracuda156 commented Aug 16, 2024

show full configure and build log (always when reporting build errors)

afaik currently newgui2 build is working only with lablgtk2 downloaded and built by configure. If you installed lablgtk2 separately (via system packages or via opam) then it will not work (but it shouldn't be even detected, so idk what is your specific problem here)

I have a wip patch to make it work with opam packaged lablgtk2 but it will have to wait after the release of current state.

I have fixed the detection: configure simply looks into a wrong path using a wrong lib name. See the related issue.

Since we have lablgtk2 in MacPorts, it is undesirable to build a duplicate. What is specifically the issue, why externally built lib fails with mldonkey? That should not be the case: whatever we have OCaml in MacPorts uses our libs, everything works. If the upstream lablgtk2 has a bug which you fix locally, then we can borrow a patch to use for our port.

P. S. I will share the log tomorrow, away from the PowerMac now, and do not have prerequisites to build this on another machine.

@ygrek
Copy link
Owner

ygrek commented Aug 17, 2024

Oh yes, I stand corrected, it builds with debian packaged lablgtk2. The bug is in mldonkey build scripts, too much assumptions that don't hold anymore. Documented what I figured in README. Continue in #107 . Will not delay release for newgui2 issues, will target in next release.

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

3 participants