Opened 18 months ago

Last modified 5 months ago

#62406 assigned defect

lablgtk2 @2.18.9: error: use of undeclared identifier 'caml_young_end'

Reported by: bestlem Owned by: pmetzger (Perry E. Metzger)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: lablgtk2

Description

On macOS 11.2 and macports 2.6.4 this fails to compile.

It looks like it is looking for macOS 11.0 SDK which don't exist. I do get the warning

Warning: The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

But I have done all the steps and a manual install of the command line tools

Attachments (3)

main.log (547.0 KB) - added by bestlem 18 months ago.
Log of failed build
main.2.log (117.6 KB) - added by bestlem 16 months ago.
Updated log
main3.log (138.7 KB) - added by bestlem 16 months ago.

Download all attachments as: .zip

Change History (17)

Changed 18 months ago by bestlem

Attachment: main.log added

Log of failed build

comment:1 Changed 18 months ago by mf2k (Frank Schima)

In the future, please add the port maintainer(s) to Cc (port info --maintainers lablgtk2), if any.

comment:2 Changed 18 months ago by mf2k (Frank Schima)

Owner: set to pmetzger
Port: lablgtk2 added; labgtk2 removed
Status: newassigned

comment:3 Changed 18 months ago by pmetzger (Perry E. Metzger)

I strongly suspect it's going to take some time to make lablgtk work correctly again.

For the original poster, what is the package you need lablgtk working with? Is it okay if lablgtk3 is made to work and not the gtk2 version?

comment:4 Changed 18 months ago by jmroot (Joshua Root)

The issue appears to be that ocaml is recording the SDK it was built against and trying to use that exact SDK to compile other things.

comment:5 Changed 18 months ago by bestlem

In general I am not using ocaml directly and wanted it for a minor end program I can live without so for me it is not a high priority problem.

But I dod a bit more digging

I was trying to build mldonkey (which probably has other issues #62014) so fixing this probably won't be the only thing. mldonkey does have an issue to move it to gtk3 but I suspect noone is working on it.

Both lablgtk and mldonkey have later builds and from https://github.com/ocaml/opam-repository/issues/14718#issuecomment-558198350 the lablgtk developer develops using macports

Making mldonkey a web only build might be quicker (#27386) and the best way for that.

However given jmroot's comment will all ocaml builds will have this problem - if so that might be worth fixing.

comment:6 Changed 18 months ago by pmetzger (Perry E. Metzger)

The issue appears to be that ocaml is recording the SDK it was built against and trying to use that exact SDK to compile other things.

I have no idea what that means?

comment:7 Changed 18 months ago by kencu (Ken)

This:

clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-sysroot]

somewhere, somehow, this was recorded in a build script somewhere but it no longer exists:

MacOSX11.0.sdk

comment:8 Changed 18 months ago by pmetzger (Perry E. Metzger)

Perhaps I don't notice such things because I build from source, but generally, that would be the least of the things broken with the lablgtk2 port. It's way way out of date, and it isn't clear that that version of lablgtk is really being seriously maintained any more either, though there's much newer available.

comment:9 Changed 18 months ago by pmetzger (Perry E. Metzger)

BTW, it's not impossible that OCaml is recording the SDK it was built against but I would find that surprising. I can check if that's true.

comment:10 Changed 16 months ago by bestlem

Looking again I note that thius does build under BigSur - but under Homebrew As per recent issue upsteam https://github.com/garrigue/lablgtk/issues/120 The maintainer says it does work and he uses macports (but as a guess not for the ocaml bits)

Thus it is still maintained

I have a newer log after selfupdate (attached) - still I think the same error

:info:build ocamlc.opt -c -ccopt '-DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS -fno-unwind-tables -D_REENTRANT -I/opt/local/include/libglade-2.0 -I/opt/local/include/libxml2 -I/opt/local/include/libgnomecanvas-2.0 -I/opt/local/include/gail-1.0 -I/opt/local/include/libart-2.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -imacros ml_domain.h -O -DHAS_GTKQUARTZ' -verbose ml_gdkpixbuf.c
:info:build + /usr/bin/clang -arch arm64 -O2 -fno-strict-aliasing -fwrapv  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch arm64 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk   -c  -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS -fno-unwind-tables -D_REENTRANT -I/opt/local/include/libglade-2.0 -I/opt/local/include/libxml2 -I/opt/local/include/libgnomecanvas-2.0 -I/opt/local/include/gail-1.0 -I/opt/local/include/libart-2.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -imacros ml_domain.h -O -DHAS_GTKQUARTZ  -I'/opt/local/lib/ocaml' 'ml_gdkpixbuf.c'
:info:build clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-sysroot]
:info:build ml_gdkpixbuf.c:25:10: fatal error: 'string.h' file not found
:info:build #include <string.h>
:info:build          ^~~~~~~~~~
:info:build 1 error generated.

It looks like macports ocamlc.opt is injecting -isysroot into the C compilation

The upstream build instructions use ocaml's dune to build. I tried macports' ocaml-dune but that failed with the same error. SO I think the issue is with our ocaml stack.

As I don't know ocaml I can't look further

Changed 16 months ago by bestlem

Attachment: main.2.log added

Updated log

comment:11 Changed 16 months ago by bestlem

And today's work was done after a port selfupdate - but that one just missed aa180331953d6c92044553666d74a70b9bc4f4e1/macports-ports fixing something in ocaml build - so another selfupdate

So have another log with different errors

Last edited 5 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

Changed 16 months ago by bestlem

Attachment: main3.log added

comment:12 Changed 16 months ago by bestlem

And I think it is just now needed to use the latest version 2.18.11 (the app I wanted still has other issues as expected so I have not actually run lablgtk2 yet)

The checksums are

checksums           rmd160  f119068f330f0c481a5e9ea3ef4014d04e10141d \
                    sha256  ff3c551df4e220b0c0fb9a3da6429413bff14f8fc93f4dd6807a35463982c863 \
                    size    1068587

comment:13 Changed 11 months ago by someuser12

Maybe it is solved by the recent update(s) of lablgtk2 to 2.18.11? (See https://github.com/macports/macports-ports/pull/12436 and https://github.com/macports/macports-ports/pull/12472).

comment:14 Changed 5 months ago by ryandesign (Ryan Schmidt)

Summary: labgtk2 Big Surlablgtk2 @2.18.9: error: use of undeclared identifier 'caml_young_end'

Does this problem still happen with lablgtk2 @2.18.11?

Note: See TracTickets for help on using tickets.