[squeak-dev] Compiling the Squeak Stack vm in FreeBSD

Edwin Ancaer eancaer at gmail.com
Fri Apr 10 23:22:21 UTC 2020


Hello ,

thanks to all whose time I've been using: the stack VM compiled, and
starts:

Image
-----
/usr/home/edwin/Smalltalk5/squeak.image
Squeak5.3
latest update: #19431
Current Change Set: HomeProject
Image format 68021 (64 bit)

Virtual Machine
---------------
/usr/home/edwin/Smalltalk5/opensmalltalk-vm/build.linux64x64/squeak
.stack.spur/build/squeak
Open Smalltalk Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.2736]
Unix built on Apr 10 2020 23:46:44 Compiler: 4.2.1 Compatible Clang 6.0.1
(tags/RELEASE_601/final)
platform sources revision VM: 202004072010-krono/freebsd-fixes
edwin at ottopedi:/usr/home/edwin/Smalltalk5/opensmalltalk-vm Date: Tue Apr 7
22:10:08 2020 CommitHash: 3a6cb0094 Plugins:
202004072010-krono/freebsd-fixes edwin at ottopedi
:/usr/home/edwin/Smalltalk5/opensmalltalk-vm
StackInterpreter VMMaker.oscog-eem.2736 uuid:
1dd4c38f-c0b4-4edd-9165-f4a54a988fe7 Apr 10 2020

A short status for now:

   1. The basic functionality is OK: creating classes, objects works fine,
   opening browsers, workspaces ed. all work.....
   2.  While running the tests, the VM is killed during
   #testOutOfMemorySignal.


For now, I choose to ignore the problem with the test, I will try to have
some fun and  start my my project. Problems will be solved later on.
I also would like to see if it is possible to the existing Smalltalk port
updated to the latest version: there remained 2 manual interventions I had
to do in the makefiles, so I don't know what can be done here.

Again, a big thank you for helping out.

A happy Smalltalk-user

Edwin Ancaer


Op do 9 apr. 2020 om 17:10 schreef Eliot Miranda <eliot.miranda at gmail.com>:

> Hi Edwin,
>
>     VM_LABEL exists to plant a global label in the interpreter at various
> bytecodes so that in a vm profiler one can see where the time is spent.
> Since you’re probably not interested in doing that you can simply change
> the makefiles to define VM_LABEL as zero, eg ‘-D VM_LABEL(foo)=0’
> or -D VM_LABEL\(foo\)=0 (you may need to double the backslashes you pass
> the escape through make to the compiler invocation).
>
> _,,,^..^,,,_ (phone)
>
> On Apr 8, 2020, at 3:35 AM, Edwin Ancaer <eancaer at gmail.com> wrote:
>
> 
> Tobias,
>
> I recompiled the stack vm with clang60, on FreeBSD12 but I get the same
> problem with the definition of the VM_LABEL:. see printout below.
> I ca compile this with gcc however.
>
> But then it seems the changes for iconv are not in the stack vm yet. Is
> that correct?
>
> As for ALSA  or polse or sndio, I think you should just take what works.
>
> Please note that I have not the intention of being pushy, I realise you
> spend some of your free time doing this, so that I can enjoy Squeak on
> FreeBSD.
> Just ignore if it gets too much.
>
> Clang60 is version 6.0.1 here:
> $ clang60 -v
> clang version 6.0.1 (tags/RELEASE_601/final)
> Target: x86_64-portbld-freebsd12.0
> Thread model: posix
> InstalledDir: /usr/local/llvm60/bin
>
> clang60 -g -O1 -DNDEBUG -DDEBUGVM=0 -msse2 -Wall -pthread -DLSB_FIRST=1
> -m64 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value
> -Wno-unused-label -Wno-unused-function -Wno-unused-variable
>  -DHAVE_CONFIG_H  -DSQUEAK_BUILTIN_PLUGIN
>  -I/home/edwin/Smalltalk5/opensmalltalk-vm/build.linux64x64/squeak.stack.spur/build
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/build.linux64x64/squeak.stack.spur/build
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/unix/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/Cross/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/Cross/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/unix/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm
> -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/Cross/plugins/FilePlugin
>  -I/home/edwin/Smalltalk5/opensmalltalk-vm/platforms/unix/plugins/B3DAcceleratorPlugin
> -m64 -Wno-missing-braces -Wno-unknown-pragmas -Wno-unused-value
> -Wno-unused-label -Wno-unused-function -Wno-unused-variable   -c -o
> gcc3x-interp.o
> /home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm/gcc3x-interp.c
> /home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm/gcc3x-interp.c:38695:64:
> warning: format specifies type 'char *' but the argument has type 'sqInt'
> (aka 'long') [-Wformat]
>         printf("\nClass %s does not have the required class index\n",
> className);
>                         ~~
>  ^~~~~~~~~
>                         %ld
> /home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm/gcc3x-interp.c:49593:108:
> warning: passing 'usqInt *' (aka 'unsigned long *') to parameter of type
> 'sqInt *' (aka 'long *') converts between pointers to integer types with
> different sign [-Wpointer-sign]
>         segAddress =
> sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(ammount,
> firstGapOfSizeAtLeast(ammount), (&allocatedSize));
> ...
> ...
> ...
>                               ^
> /home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm/gcc3x-interp.c:2530:5:
> error: invalid symbol redefinition
>                                 VM_LABEL(pushReceiverVariableBytecode);
>                                 ^
> /home/edwin/Smalltalk5/opensmalltalk-vm/platforms/unix/vm/sqPlatformSpecific.h:110:49:
> note: expanded from macro 'VM_LABEL'
> #       define VM_LABEL(foo) asm("\n.globl L" #foo "\nL" #foo ":")
>                                                       ^
> <inline asm>:3:1: note: instantiated into assembly here
> LpushReceiverVariableBytecode:
> ^
> /home/edwin/Smalltalk5/opensmalltalk-vm/spurstack64src/vm/gcc3x-interp.c:2544:5:
> error: invalid symbol redefinition
>                                 VM_LABEL(pushReceiverVariableBytecode1);
>                                 ^
> /home/edwin/Smalltalk5/opensmalltalk-vm/platforms/unix/vm/sqPlatformSpecific.h:110:49:
> note: expanded from macro 'VM_LABEL'
> #       define VM_LABEL(foo) asm("\n.globl L" #foo "\nL" #foo ":")
>                                                       ^
> <inline asm>:3:1: note: instantiated into assembly here
>
>
>
> Op wo 8 apr. 2020 om 10:55 schreef Tobias Pape <Das.Linux at gmx.de>:
>
>> Hi Subbu
>> > On 08.04.2020, at 10:19, K K Subbu <kksubbu.ml at gmail.com> wrote:
>> >
>> > On 08/04/20 3:13 AM, Tobias Pape wrote:
>> >> I have looked at the stackvm issue.
>> >> On FreeBSD 11/clang 6, this does not occur. What clang version do you
>> have?
>> >> Also, I don't think we need to bother with alsa too much.
>> >> OSS should work, the rest_is_  work:)
>> >
>> > Tobias,
>> >
>> > Please make pulse the default audio server. It has wrappers (padsp) to
>> handle legacy apps using for ALSA/OSS.
>> >
>> > David Stes confirmed earlier that pulse audio works fine on his Solaris
>> port and provided the patches. Squeak VM does not work out of the box on my
>> Ubuntu 16.04 (64b). I have to patch squeak.sh to use -vm-audio-pulse to get
>> sound to work.
>>
>> This is a distinct thing.
>> My comments are about compilation problems of Alsa on FreeBSD.
>> I see that pulse is available in FreeBSD ports, but with a lot of
>> dependencies, and
>> I do not think that at the moment it is a good idea to mingle with that.
>>
>> For OpenBSD we have sndio, and if that also works for FreeBSD, at the
>> moment I would go for that.
>>
>> Apart from that, sure, Pulse seems a good option…
>>
>> Best regards
>>         -Tobias
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200411/0bd43a5e/attachment.html>


More information about the Squeak-dev mailing list