[Vm-dev] Minheadless trial

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Dec 5 10:45:24 UTC 2018


Hi Ben,
I did not follow all the thread in detail, but a lot of missing definitions
like alloca  were in platform specific support headers:

https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/win32/vm/sqPlatformSpecific.h

The fact that minheadless seems a (better ?) re-organisation of sources (I
guess with a better separation of concerns) does not mean that we have to
re-invent everything.
It's just there under our hands.

Le mar. 14 août 2018 à 07:46, Ben Coman <btc at openinworld.com> a écrit :

>
> Hi Ronie, Esteban,
>
> Could you do a quick review of my CMakeLists.txt change for any obvious
> blunder.
> This may be my last post on this thread for a short while.
>
>
> On 8 August 2018 at 21:39, Ben Coman <btc at openinworld.com> wrote:
>
>>
>> Well thats enough for one post!
>> Success running a MSVC compiled Spur Stack "minheadless" VM.
>>
>> Next I'll try...    option(COG_JIT "Cog JIT" ON)
>>
>
> I did that, and then...
>   "CMakeLists.txt > Cache(x64-Debug only) > Delete cache folder..."
>   "CMake > Build All"
> then started "x64-Debug" , "pharo.exe minImage+eval"
> and a console window opens that reports...
>     "linking callsite to invalid address"
>
> Well I'm not sure how ready is the Windows 64bit JIT is,
> so lets try with 32bit JIT.
> In VS selecting "x86-Debug" , "pharo.exe minImage+eval"
> and "Cmake > Build All"
> reports... "Severity Code Description Project File Line Suppression State
> Error C1189 #error:  As yet no Cogit implementation appears to exist for
> your platform.
> C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\CMakeLists.txt
> C:\#Repos\OpenSmalltalk\opensmalltalk-vm\spur64src\vm\cogit.c
>
> In the CMake variables
>     SourceFolderName=spur64src
> because..
>      VM_64BITS=TRUE
> which is set here...
>     if(SQUEAK_PLATFORM_X86_64)
> if(BUILD_I386_VERSION)
>         set(SQUEAK_PLATFORM_X86_32 True)
>     set(SQUEAK_PLATFORM_X86_64 False)
> else()
> set(VM_64BITS TRUE)
> set(SourceFolderName "${SourceFolderName}64")
> if(WIN32)
> set(FFI_VARIANT_X64_WIN64 True)
> else()
> set(FFI_VARIANT_X64_SYSV True)
> endif()
>         set(VM_TARGET_CPU "x86_64")
> endif()
>     else()
> set(VM_64BITS False)
>     endif()
>
> which I'm not clear how that logic works,
> since it seems  BUILD_I386_VERSION  doesn't prevent  VM_64BITS=True
>
> Rearranging like...
>
>     if(BUILD_I386_VERSION)
>         set(SQUEAK_PLATFORM_X86_32 True)
>         set(SQUEAK_PLATFORM_X86_64 False)
>         set(VM_64BITS False)
>     else()
>     endif()
>     if(SQUEAK_PLATFORM_X86_64)
>         set(VM_64BITS TRUE)
>         set(SourceFolderName "${SourceFolderName}64")
>         if(WIN32)
>               set(FFI_VARIANT_X64_WIN64 True)
>         else()
>               set(FFI_VARIANT_X64_SYSV True)
>         endif()
>         set(VM_TARGET_CPU "x86_64")
>     else()
>     endif()
>
> then adding  -DBUILD_I386_VERSION in "CmakeSettings.json" like this...
>   "CMakeLists.txt > Change Cmake Settings"
>         {
>             "name": "x86-Debug",
>             "generator": "Ninja",
>             "configurationType": "Debug",
>             "inheritEnvironments": [ "msvc_x86" ],
>             "buildRoot":
> "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
>             "installRoot":
> "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
>             "cmakeCommandArgs": "-DBUILD_I386_VERSION=ON",
>             "buildCommandArgs": "-v",
>             "ctestCommandArgs": ""
>         },
>
> then refreshing...
>   "CMakeLists.txt > Cache(x64-Debug only) > Delete cache folder..."
>   "CMake > Build All"
>
> leaves these values in the Cmake variables...
>     VM_64BITS=False
>     SourceFolderName=spursrc
>
> and the build completes successfully.
>
> I'm leaving it there for the moment.
> Actually the above sat in unchanged in draft for a week since I've had to
> shift my attention to something else.
>
> Modifications to date here...
> https://github.com/bencoman/opensmalltalk-vm/tree/MinimalisticHeadless-x64-msvc2017
> Next would be to catch up to Esteban's branch...
> https://github.com/estebanlm/opensmalltalk-vm/tree/add-minheadless-vm
>
> cheers -ben
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181205/7e834550/attachment-0001.html>


More information about the Vm-dev mailing list