help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: running GTK:: trying to compile gnu-smalltalk for Mac M1 with your s


From: etienne delacroix
Subject: Re: running GTK:: trying to compile gnu-smalltalk for Mac M1 with your script
Date: Mon, 17 Oct 2022 00:50:04 +0200

I used your wonderful script to try compiling. gnu-smalltalk ( the previous
version. from the current one ) .   on my Mac air M1 laptop.    I worked
much better than my previous attempt with existing scripts,  yet.
eventually interrupted with the error:

ld: the target architecture doesn't support executable stacks

clang: *error: **linker command failed with exit code 1 (use -v to see
invocation)*

that's beyond me....does this mean that there is no hope to compile
gnu-smalltalk for the Mac M1.  ?????




On Sun, Oct 16, 2022 at 11:36 PM <c4t0@riseup.net> wrote:

> Hi!
>
> I've checkouted last commit a couple of days ago:
> dfe4b5660037c4d178853ee00458a75e51a88563
>
> compiled with this script:
>
> #!/bin/bash
>
> dst_dir="$(pwd)/build"
>
> export CFLAGS="$CFLAGS -ffat-lto-objects -Wl,--allow-multiple-definition
> -w"
> autoreconf -iv
> ./configure \
>     --prefix="${dst_dir}" \
>     --enable-gtk=yes \
>     --enable-preemption \
>     --with-readline \
>     --with-libltdl \
>     --with-system-libffi \
>     --with-system-libsigsegv \
>     --with-tk \
>     --with-tcl \
>     --with-x \
>     --without-emacs \
>     --enable-static
> echo '#define USE_INTERP_RESULT 1' >> config.h
> make -j6
> make install
>
> Then tried to run gst-browser and it failed, so I tried to debug it, by
> first making a minimal test:
>
> $ echo "PackageLoader fileInPackage: 'GTK'." > test.st
> $ build/bin/gst test.st
>
> and that gives:
>
> "Global garbage collection... done"
> Loading package GLib
> Loading package Cairo
> Loading package GTK
> Object: Namespace new: 32 "<0x7f97f519fa20>" error: Invalid argument
> #GtkTreeModel: key not found
> SystemExceptions.NotFound(Smalltalk.Exception)>>signal
> (ExcHandling.st:254)
> SystemExceptions.NotFound(Smalltalk.Exception)>>signal:
> (ExcHandling.st:264)
> SystemExceptions.NotFound class>>signalOn:what: (SysExcept.st:736)
> [] in Smalltalk.Namespace(Smalltalk.Dictionary)>>at: (Dictionary.st:139)
> Smalltalk.Namespace>>at:ifAbsent: (Namespace.st:160)
> Smalltalk.Namespace(Smalltalk.Dictionary)>>at: (Dictionary.st:138)
> [] in Smalltalk.CType class>>from: (CType.st:126)
> Smalltalk.IdentityDictionary(Smalltalk.LookupTable)>>at:ifAbsent:
> (LookupTable.st:86)
> Smalltalk.CType class>>from: (CType.st:126)
> Smalltalk.CPtrCType class>>from: (CType.st:327)
> Smalltalk.CType class>>computeAggregateType: (CType.st:140)
> Smalltalk.CType class>>from: (CType.st:121)
> [] in GtkTreeModelPointer class(Smalltalk.CCompound
> class)>>declaration:inject:into: (CStruct.st:153)
> Smalltalk.Array(Smalltalk.SequenceableCollection)>>do:
> (SeqCollect.st:826)
> GtkTreeModelPointer class(Smalltalk.CCompound
> class)>>declaration:inject:into: (CStruct.st:169)
> GtkTreeModelPointer class(Smalltalk.CStruct class)>>declaration:
> (CStruct.st:249)
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/MoreFuncs.st:15: key
> GtkAccelGroup not found
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/MoreFuncs.st:15: expected
> Eval, Namespace or class definition
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/MoreFuncs.st:22: expected
> expression
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:1: key
> GtkTextBuffer not found
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:1: expected
> Eval, Namespace or class definition
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:8: expected
> expression
>
>
> It seems to be quite broken :(
>
> After tweaking around with build/share/smalltalk/GTK.star, namely
> commenting some of the <filein>
>
> <package>
>   <name>GTK</name>
>   <namespace>GTK</namespace>
>   <prereq>Cairo</prereq>
>   <prereq>GLib</prereq>
>   <module>gst-gtk</module>
>
>   <filein>GtkDecl.st</filein>
>   <filein>GtkImpl.st</filein>
> </package>
>
> I can reduce the errors:
>
> $ build/bin/gst test.st
> "Global garbage collection... done"
> Loading package GLib
> Loading package Cairo
> Loading package GTK
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:1: key
> GtkTextBuffer not found
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:1: expected
> Eval, Namespace or class definition
> ./build/share/smalltalk/GTK.star#VFS.ZipFile/GtkImpl.st:8: expected
> expression
>
> The first error can be "solved" by adding the class definition in
> GtkDecl.st:
>
> Object subclass: GtkTextBuffer [
>     <category: 'Gtk'>
>     <comment: nil>
> ]
>
> and so on with the other errors that pop ups... obviously I'm shooting
> in the dark here and something is missing, be it configuration,
> compilation options, libraries or code I don't quite know. It seems that
> all the libraries, headers and binaries are in place and the problems
> are to be found in ST code.
> Where are the cCalls of all those classes? For instance, where are all
> the bindings for GtkTextBuffer?
>
> https://developer-old.gnome.org/gtk2/stable/GtkTextBuffer.html
>
> I found out of this project a while ago and I find rather interesting
> the idea to use Emacs for smalltalk programming, building apps with gtk
> support, and using a graphical browser to aid development instead of
> being forced to use it. Emacs could use Smalltalk-in-Smalltalk package
> to provide auto-completion via company-mode, etc. It a shame that this
> project is so abandoned.
>
> So any help to get GTK bindings working or understanding the code base
> and what needs to be done in case that more coding is needed, as well at
> what setup do dev use for GST coding, would be appreciated.
>
> Bye!
>
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]