Opened 4 years 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: cooljeanius (Eric Gallager)
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 4 years ago.
Log of failed build
main.2.log (117.6 KB) - added by bestlem 4 years ago.
Updated log
main3.log (138.7 KB) - added by bestlem 4 years ago.

Download all attachments as: .zip

Change History (19)

Changed 4 years ago by bestlem

Attachment: main.log added

Log of failed build

comment:1 Changed 4 years 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 4 years ago by mf2k (Frank Schima)

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

comment:3 Changed 4 years 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 4 years 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 4 years 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 4 years 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 4 years 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 4 years 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 4 years 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 4 years 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 4 years ago by bestlem

Attachment: main.2.log added

Updated log

comment:11 Changed 4 years 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 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 4 years ago by bestlem

Attachment: main3.log added

comment:12 Changed 4 years 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 3 years 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 3 years ago by ryandesign (Ryan Carsten 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?

comment:15 in reply to:  14 Changed 5 months ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

Does this problem still happen with lablgtk2 @2.18.11?

Not seeing this specific problem happening with it, but I am seeing:

ocamlmklib -verbose -ocamlc "ocamlc.opt" -ocamlopt "ocamlopt.opt" -o lablgtk -oc lablgtk2 ml_gdkpixbuf.o ml_gdk.o ml_glib.o ml_gobject.o ml_gpointer.o ml_gvaluecaml.o wrappers.o ml_gtk.o ml_pango.o ml_gtkaction.o ml_gtkbin.o ml_gtkbroken.o ml_gtkbutton.o ml_gtkassistant.o ml_gtkedit.o ml_gtkfile.o ml_gtklist.o ml_gtkmenu.o ml_gtkmisc.o ml_gtkpack.o ml_gtkrange.o ml_gtkstock.o ml_gtktext.o ml_gtktree.o gaux.cmo gpointer.cmo gutf8.cmo glib.cmo gobject.cmo gdkEnums.cmo pangoEnums.cmo gtkEnums.cmo pango.cmo gdk.cmo gdkEvent.cmo gdkKeysyms.cmo gdkPixbuf.cmo gtk.cmo gtkSignal.cmo gtkStock.cmo gtkObject.cmo gtkBaseProps.cmo gtkBinProps.cmo gtkButtonProps.cmo gtkEditProps.cmo gtkListProps.cmo gtkMenuProps.cmo gtkMiscProps.cmo gtkPackProps.cmo gtkRangeProps.cmo gtkTextProps.cmo gtkTreeProps.cmo gtkFileProps.cmo gtkActionProps.cmo gtkBrokenProps.cmo gtkAssistantProps.cmo gtkData.cmo gtkBase.cmo gtkPack.cmo gtkButton.cmo gtkAssistant.cmo gtkMenu.cmo gtkMisc.cmo gtkWindow.cmo gtkList.cmo gtkBin.cmo gtkEdit.cmo gtkRange.cmo gtkText.cmo gtkTree.cmo gtkFile.cmo gtkMain.cmo gtkBroken.cmo gPango.cmo gDraw.cmo gObj.cmo ogtkBaseProps.cmo gData.cmo ogtkBinProps.cmo ogtkButtonProps.cmo ogtkEditProps.cmo ogtkListProps.cmo ogtkMenuProps.cmo ogtkMiscProps.cmo ogtkPackProps.cmo ogtkRangeProps.cmo ogtkTextProps.cmo ogtkTreeProps.cmo ogtkFileProps.cmo ogtkActionProps.cmo ogtkBrokenProps.cmo ogtkAssistantProps.cmo gMain.cmo gContainer.cmo gPack.cmo gButton.cmo gText.cmo gMenu.cmo gMisc.cmo gTree.cmo gList.cmo gFile.cmo gWindow.cmo gAssistant.cmo gBin.cmo gEdit.cmo gRange.cmo gAction.cmo gBroken.cmo gUtil.cmo gToolbox.cmo -L/opt/local/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -framework Cocoa -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
+ /usr/bin/clang -arch x86_64 -shared                    -flat_namespace -undefined suppress -Wl,-no_compact_unwind                    -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64  -o ./dlllablgtk2.so ml_gdkpixbuf.o ml_gdk.o ml_glib.o ml_gobject.o ml_gpointer.o ml_gvaluecaml.o wrappers.o ml_gtk.o ml_pango.o ml_gtkaction.o ml_gtkbin.o ml_gtkbroken.o ml_gtkbutton.o ml_gtkassistant.o ml_gtkedit.o ml_gtkfile.o ml_gtklist.o ml_gtkmenu.o ml_gtkmisc.o ml_gtkpack.o ml_gtkrange.o ml_gtkstock.o ml_gtktext.o ml_gtktree.o -framework Cocoa   -L/opt/local/lib -lgtk-quartz-2.0 -lgdk-quartz-2.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl 
ld: file not found: /usr/lib/libauto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [lablgtk.cma] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_lablgtk2/lablgtk2/work/lablgtk-2.18.11/src'
make: *** [world] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_lablgtk2/lablgtk2/work/lablgtk-2.18.11'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_lablgtk2/lablgtk2/work/lablgtk-2.18.11" && /usr/bin/make -w world 
Exit code: 2
Error: Failed to build lablgtk2: command execution failed
DEBUG: Error code: CHILDSTATUS 73666 2

comment:16 Changed 5 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.